Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
⌀
Function
large_stringlengths
11
3.45k
Label
list
Linux Kernel
arch/sh/drivers/dma/dma-pvr2.c
static void __exit pvr2_dma_exit(void) { free_dma(PVR2_CASCADE_CHAN); free_irq(HW_EVENT_PVR2_DMA, 0); unregister_dmac(&pvr2_dma_info); }
[ 0, 0 ]
Linux Kernel
arch/sh/drivers/dma/dma-sh.c
static inline unsigned int get_dmte_irq(unsigned int chan) { return dmte_irq_map[chan]; } #endif
[ 0, 0 ]
Linux Kernel
arch/sh/drivers/dma/dma-sh.c
static void sh_dmac_enable_dma(struct dma_channel *chan) { int irq; u32 chcr; chcr = __raw_readl(dma_base_addr(chan->chan) + CHCR); chcr |= CHCR_DE; if (chan->flags & DMA_TEI_CAPABLE) chcr |= CHCR_IE; __raw_writel(chcr, (dma_base_addr(chan->chan) + CHCR)); if (chan->flags & DMA_TEI_CAPABLE) { ...
[ 0, 0 ]
Linux Kernel
arch/sh/drivers/dma/dma-sh.c
static void sh_dmac_disable_dma(struct dma_channel *chan) { int irq; u32 chcr; if (chan->flags & DMA_TEI_CAPABLE) { irq = get_dmte_irq(chan->chan); disable_irq(irq); } chcr = __raw_readl(dma_base_addr(chan->chan) + CHCR); chcr &= ~(CHCR_DE | CHCR_TE | CHCR_IE); __raw_writel(chcr, (dma_base_addr...
[ 0, 0 ]
Linux Kernel
arch/sh/drivers/dma/dma-sh.c
static irqreturn_t dma_err(int irq, void *dummy) { int i; for (i = 0; i < NR_DMAOR; i++) dmaor_reset(i); disable_irq(irq); return IRQ_HANDLED; }
[ 0, 0 ]
Linux Kernel
arch/sh/drivers/dma/dma-sh.c
static int dmae_irq_init(void) { int n; for (n = 0; n < NR_DMAE; n++) { int i = request_irq(get_dma_error_irq(n), dma_err, IRQF_SHARED, dmae_name[n], (void *)dmae_name[n]); if (unlikely(i < 0)) { printk(KERN_ERR "%s request_irq fail\n", dmae_name[n]); return i; } ...
[ 0, 0 ]
Linux Kernel
arch/sh/drivers/dma/dma-sh.c
static int __init sh_dmac_init(void) { struct dma_info *info = &sh_dmac_info; int i, rc; rc = dmae_irq_init(); if (unlikely(rc != 0)) return rc; /* * Initialize DMAOR, and clean up any error flags that may have * been set. */ for (i = 0; i < NR_DMAOR; i++) { rc = dmaor_reset(i); if (u...
[ 0, 0 ]
Linux Kernel
arch/sh/drivers/dma/dmabrg.c
static void dmabrg_enable_irq(unsigned int dmairq) { unsigned long dcr; dcr = __raw_readl(DMABRGCR); dcr |= (1 << ((dmairq > 1) ? dmairq + 22 : dmairq + 8)); __raw_writel(dcr, DMABRGCR); }
[ 0, 0 ]
Linux Kernel
arch/sh/drivers/dma/dmabrg.c
void dmabrg_free_irq(unsigned int dmairq) { if (likely(dmairq < 10)) { dmabrg_disable_irq(dmairq); dmabrg_handlers[dmairq].handler = NULL; dmabrg_handlers[dmairq].data = NULL; } }
[ 0, 0 ]
Linux Kernel
arch/sh/drivers/heartbeat.c
static inline void heartbeat_toggle_bit(struct heartbeat_data *hd, unsigned bit, unsigned int inverted) { unsigned int new; new = (1 << hd->bit_pos[bit]); if (inverted) new = ~new; new &= hd->mask; switch (hd->regsize) { case 32: new |= ioread32(hd->base) ...
[ 1, 0 ]
Linux Kernel
arch/sh/drivers/heartbeat.c
static int __init heartbeat_init(void) { printk(KERN_NOTICE DRV_NAME ": version %s loaded\n", DRV_VERSION); return platform_driver_register(&heartbeat_driver); }
[ 0, 0 ]
Linux Kernel
arch/sh/drivers/pci/common.c
static struct pci_dev *fake_pci_dev(struct pci_channel *hose, int top_bus, int busnr, int devfn) { static struct pci_dev dev; static struct pci_bus bus; dev.bus = &bus; dev.sysdata = hose; dev.devfn = devfn; bus.number = busnr; bus.sysdata = hose; bus.ops = hose->pci...
[ 0, 0 ]
Linux Kernel
arch/sh/drivers/pci/common.c
static void pcibios_enable_err(struct timer_list *t) { struct pci_channel *hose = from_timer(hose, t, err_timer); del_timer(&hose->err_timer); printk(KERN_DEBUG "PCI: re-enabling error IRQ.\n"); enable_irq(hose->err_irq); }
[ 0, 0 ]
Linux Kernel
arch/sh/drivers/pci/common.c
unsigned int pcibios_handle_status_errors(unsigned long addr, unsigned int status, struct pci_channel *hose) { unsigned int cmd = 0; if (status & PCI_STATUS_REC_MASTER_ABORT) { printk(KERN_DEBUG "PCI: master abort, pc=0x%08lx\n...
[ 1, 0 ]
Linux Kernel
arch/sh/drivers/pci/fixups-dreamcast.c
static void gapspci_fixup_resources(struct pci_dev *dev) { struct pci_channel *p = dev->sysdata; struct resource res; struct pci_bus_region region; printk(KERN_NOTICE "PCI: Fixing up device %s\n", pci_name(dev)); switch (dev->device) { case PCI_DEVICE_ID_SEGA_BBA: dev->resource[1].start = p->resource...
[ 1, 0 ]
Linux Kernel
arch/sh/drivers/pci/fixups-landisk.c
int pcibios_map_platform_irq(const struct pci_dev *pdev, u8 slot, u8 pin) { int irq = ((slot + pin - 1) & 0x3) + evt2irq(0x2a0); if ((slot | (pin - 1)) > 0x3) { printk(KERN_WARNING "PCI: Bad IRQ mapping request for slot %d pin %c\n", slot, pin - 1 + 'A'); return -1; } return irq; }
[ 0, 0 ]
Linux Kernel
arch/sh/drivers/pci/fixups-rts7751r2d.c
int pci_fixup_pcic(struct pci_channel *chan) { unsigned long bcr1, mcr; bcr1 = __raw_readl(SH7751_BCR1); bcr1 |= 0x40080000; pci_write_reg(chan, bcr1, SH4_PCIBCR1); /* Enable all interrupts, so we known what to fix */ pci_write_reg(chan, 0x0000c3ff, SH4_PCIINTM); pci_write_reg(chan, 0x0000380f, SH4_PCIA...
[ 1, 0 ]
Linux Kernel
arch/sh/drivers/pci/fixups-sdk7786.c
static int __init sdk7786_pci_init(void) { u16 data = fpga_read_reg(PCIECR); slot4en ?: (!(data & PCIECR_PRST4) && (data & PCIECR_PRST3)); if (slot4en) { pr_info("Activating PCIe slot#4 (disabling slot#3)\n"); data &= ~PCIECR_PCIEMUX1; fpga_write_reg(data, PCIECR); /* Warn about forced reroutin...
[ 0, 0 ]
Linux Kernel
arch/sh/drivers/pci/fixups-sh03.c
int pcibios_map_platform_irq(const struct pci_dev *dev, u8 slot, u8 pin) { int irq; if (dev->bus->number == 0) { switch (slot) { case 4: return evt2irq(0x2a0); case 8: return evt2irq(0x2a0); /* eth1 */ case 6: return evt2irq(0x240); /* PCI bridge */ default: printk...
[ 1, 0 ]
Linux Kernel
arch/sh/drivers/pci/ops-sh4.c
static int sh4_pci_read(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 *val) { struct pci_channel *chan = bus->sysdata; unsigned long flags; u32 data; raw_spin_lock_irqsave(&pci_config_lock, flags); pci_write_reg(chan, CONFIG_CMD(bus, devfn, where), SH4_PCIPAR); d...
[ 1, 0 ]
Linux Kernel
arch/sh/drivers/pci/ops-sh4.c
static int sh4_pci_write(struct pci_bus *bus, unsigned int devfn, int where, int size, u32 val) { struct pci_channel *chan = bus->sysdata; unsigned long flags; int shift; u32 data; raw_spin_lock_irqsave(&pci_config_lock, flags); pci_write_reg(chan, CONFIG_CMD(bus, devfn, where), SH...
[ 0, 0 ]
Linux Kernel
arch/sh/drivers/pci/pci-sh4.h
static inline unsigned long pci_read_reg(struct pci_channel *chan, unsigned long reg) { return __raw_readl(chan->reg_base + reg); }
[ 0, 0 ]
Linux Kernel
arch/sh/drivers/pci/pci-sh7751.c
static int __init __area_sdram_check(struct pci_channel *chan, unsigned int area) { unsigned long word; word = __raw_readl(SH7751_BCR1); if (((word >> area) & 1) == 0) { printk("PCI: Area %d is not configured for SDRAM. BCR1=0x%lx\n", area, word); return 0...
[ 0, 0 ]
Linux Kernel
arch/sh/drivers/pci/pci-sh7780.c
static void __init sh7780_pci66_init(struct pci_channel *hose) { unsigned int tmp; if (!pci_is_66mhz_capable(hose, 0, 0)) return; tmp = __raw_readl(hose->reg_base + SH4_PCICR); tmp |= SH4_PCICR_PREFIX; __raw_writel(tmp, hose->reg_base + SH4_PCICR); /* Enable 66MHz operation */ tmp = __raw_readw(hos...
[ 0, 0 ]
Linux Kernel
arch/sh/drivers/pci/pci.c
void __ref pcibios_report_status(unsigned int status_mask, int warn) { struct pci_channel *hose; for (hose = hose_head; hose; hose = hose->next) { if (unlikely(!hose->bus)) pcibios_bus_report_status_early(hose, hose_head->index, hose->index, status_mask, warn); ...
[ 0, 0 ]
Linux Kernel
arch/sh/drivers/pci/pci.c
void pci_iounmap(struct pci_dev *dev, void __iomem *addr) { iounmap(addr); }
[ 0, 0 ]
Linux Kernel
arch/sh/drivers/pci/pcie-sh7786.c
static int __init pci_wait_for_irq(struct pci_channel *chan, unsigned int mask) { unsigned int timeout = 100; while (timeout--) { if ((pci_read_reg(chan, SH4A_PCIEINTR) & mask) == mask) return 0; udelay(100); } return -ETIMEDOUT; }
[ 1, 0 ]
Linux Kernel
arch/sh/drivers/pci/pcie-sh7786.c
static int __init sh7786_pcie_core_init(void) { return test_mode_pin(MODE_PIN12) ? 3 : 2; }
[ 0, 0 ]
Linux Kernel
arch/sh/drivers/pci/pcie-sh7786.c
static void __init sh7786_pcie_init_hw(void *data, async_cookie_t cookie) { struct sh7786_pcie_port *port = data; int ret; port->endpoint = test_mode_pin(MODE_PIN11); /* * Setup clocks, needed both for PHY and PCIe registers. */ ret = pcie_clk_init(port); if (unlikely(ret < 0)) { pr_err("clock i...
[ 0, 0 ]
Linux Kernel
arch/sh/drivers/pci/pcie-sh7786.h
static inline void pci_write_reg(struct pci_channel *chan, unsigned long val, unsigned long reg) { __raw_writel(val, chan->reg_base + reg); }
[ 0, 0 ]
Linux Kernel
arch/sh/drivers/pci/pcie-sh7786.h
static inline unsigned long pci_read_reg(struct pci_channel *chan, unsigned long reg) { return __raw_readl(chan->reg_base + reg); }
[ 0, 0 ]
Linux Kernel
arch/sh/drivers/platform_early.c
static void device_pm_init_common(struct device *dev) { if (!dev->power.early_init) { spin_lock_init(&dev->power.lock); dev->power.qos = NULL; dev->power.early_init = true; } }
[ 0, 0 ]
Linux Kernel
arch/sh/drivers/platform_early.c
static void pm_runtime_early_init(struct device *dev) {}
[ 0, 0 ]
Linux Kernel
arch/sh/drivers/platform_early.c
static struct platform_device *__init sh_early_platform_match(struct sh_early_platform_driver *epdrv, int id) { struct platform_device *pd; list_for_each_entry( pd, &sh_early_platform_device_list, dev.devres_head) if (platform_match(&pd->dev, &epdrv->pdrv ...
[ 0, 0 ]
Linux Kernel
arch/sh/drivers/platform_early.c
static int __init sh_early_platform_driver_probe_id(char *class_str, int id, int nr_probe) { struct sh_early_platform_driver *epdrv; struct platform_device *match; int match_id; int n = 0; int left = 0; list_for_each_entry(epdrv, &sh_early_platform_driver...
[ 1, 0 ]
Linux Kernel
arch/sh/drivers/push-switch.c
static void switch_work_handler(struct work_struct *work) { struct push_switch *psw = container_of(work, struct push_switch, work); struct platform_device *pdev = psw->pdev; psw->state = 0; kobject_uevent(&pdev->dev.kobj, KOBJ_CHANGE); }
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/bitops-cas.h
static inline int test_and_set_bit(int nr, volatile void *addr) { unsigned mask, old; volatile unsigned *a = addr; a += nr >> 5; mask = 1U << (nr & 0x1f); do old = *a; while (__bo_cas(a, old, old | mask) != old); return !!(old & mask); }
[ 1, 0 ]
Linux Kernel
arch/sh/include/asm/bitops-grb.h
static inline int test_and_change_bit(int nr, volatile void *addr) { int mask, retval; volatile unsigned int *a = addr; unsigned long tmp; a += nr >> 5; mask = 1 << (nr & 0x1f); __asm__ __volatile__( " .align 2 \n\t" " mova 1f, r0 \n\t" " mov r15, r1 ...
[ 1, 0 ]
Linux Kernel
arch/sh/include/asm/bitops-llsc.h
static inline void set_bit(int nr, volatile void *addr) { int mask; volatile unsigned int *a = addr; unsigned long tmp; a += nr >> 5; mask = 1 << (nr & 0x1f); __asm__ __volatile__("1: \n\t" "movli.l @%1, %0 ! set_bit \n\t" "or %2, %0 \n\t" ...
[ 1, 0 ]
Linux Kernel
arch/sh/include/asm/bitops-llsc.h
static inline void clear_bit(int nr, volatile void *addr) { int mask; volatile unsigned int *a = addr; unsigned long tmp; a += nr >> 5; mask = 1 << (nr & 0x1f); __asm__ __volatile__("1: \n\t" "movli.l @%1, %0 ! clear_bit \n\t" "and %2, %0 \n\t" ...
[ 1, 0 ]
Linux Kernel
arch/sh/include/asm/bitops-llsc.h
static inline void change_bit(int nr, volatile void *addr) { int mask; volatile unsigned int *a = addr; unsigned long tmp; a += nr >> 5; mask = 1 << (nr & 0x1f); __asm__ __volatile__("1: \n\t" "movli.l @%1, %0 ! change_bit \n\t" "xor %2, %0 \n\t" ...
[ 1, 0 ]
Linux Kernel
arch/sh/include/asm/bitops-op32.h
static __always_inline void arch___set_bit(unsigned long nr, volatile unsigned long *addr) { if (__builtin_constant_p(nr)) { __asm__ __volatile__("bset.b %1, @(%O2,%0) ! __set_bit\n\t" : "+r"(addr) : "i"(BYTE_OFFSET(nr)...
[ 1, 0 ]
Linux Kernel
arch/sh/include/asm/bitops-op32.h
static __always_inline void arch___change_bit(unsigned long nr, volatile unsigned long *addr) { if (__builtin_constant_p(nr)) { __asm__ __volatile__("bxor.b %1, @(%O2,%0) ! __change_bit\n\t" : "+r"(addr) : "i"(BYTE_OF...
[ 1, 0 ]
Linux Kernel
arch/sh/include/asm/bitops-op32.h
static __always_inline bool arch___test_and_clear_bit(unsigned long nr, volatile unsigned long *addr) { unsigned long mask = BIT_MASK(nr); unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr); unsigned long old = *p; *p = old & ~mask; return (old & mask) != 0; }
[ 1, 0 ]
Linux Kernel
arch/sh/include/asm/bitops.h
static inline unsigned long ffz(unsigned long word) { unsigned long result; __asm__("1:\n\t" "shlr %1\n\t" "bt/s 1b\n\t" " add #1, %0" : "=r"(result), "=r"(word) : "0"(~0L), "1"(word) : "t"); return result; }
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/bl_bit_32.h
static inline void clear_bl_bit(void) { unsigned long __dummy0, __dummy1; __asm__ __volatile__("stc sr, %0\n\t" "and %2, %0\n\t" "ldc %0, sr\n\t" : "=&r"(__dummy0), "=r"(__dummy1) : "1"(~0x10000000) ...
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/cacheflush.h
static inline void flush_anon_page(struct vm_area_struct *vma, struct page *page, unsigned long vmaddr) { if (boot_cpu_data.dcache.n_aliases && PageAnon(page)) __flush_anon_page(page, vmaddr); } #define ARCH_IMPLEMENTS_FLUSH_KERNEL_VMAP_RANGE 1
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/cacheflush.h
static inline void invalidate_kernel_vmap_range(void *addr, int size) { __flush_invalidate_region(addr, size); }
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/checksum_32.h
static inline __sum16 csum_ipv6_magic(const struct in6_addr *saddr, const struct in6_addr *daddr, __u32 len, __u8 proto, __wsum sum) { unsigned int __dummy; __asm__("clrt\n\t" "mov.l @(0,%2), %1\n\t" "addc %1, %0\n\t" ...
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/checksum_32.h
static inline __wsum csum_and_copy_to_user(const void *src, void __user *dst, int len) { if (!access_ok(dst, len)) return 0; return csum_partial_copy_generic(src, (__force void *)dst, len); }
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/cmpxchg-grb.h
static inline unsigned long xchg_u16(volatile u16 *m, unsigned long val) { unsigned long retval; __asm__ __volatile__(" .align 2 \n\t" " mova 1f, r0 \n\t" " mov r15, r1 \n\t" /* r1 = saved sp */ " mov #...
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/cmpxchg-grb.h
static inline unsigned long __cmpxchg_u32(volatile int *m, unsigned long old, unsigned long new) { unsigned long retval; __asm__ __volatile__(" .align 2 \n\t" " mova 1f, r0 \n\t" " nop ...
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/cmpxchg-irq.h
static inline unsigned long __cmpxchg_u32(volatile int *m, unsigned long old, unsigned long new) { __u32 retval; unsigned long flags; local_irq_save(flags); retval = *m; if (retval == old) *m = new; local_irq_restore(flags); return retval; }
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/dwarf.h
static __always_inline unsigned long dwarf_read_arch_reg(unsigned int reg) { unsigned long value = 0; switch (reg) { case 14: __asm__ __volatile__("mov r14, %0\n" : "=r"(value)); break; case 15: __asm__ __volatile__("mov r15, %0\n" : "=r"(value)); break; default: BUG(); } return valu...
[ 1, 0 ]
Linux Kernel
arch/sh/include/asm/dwarf.h
static inline unsigned int DW_CFA_operand(unsigned long insn) { return (insn & 0x3f); } #define DW_EH_FRAME_CIE 0 #define DW_CIE_ID 0xffffffff #define DW64_CIE_ID 0xffffffffffffffffULL /* * DWARF FDE/CIE length field values. */
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/fpu.h
static inline void grab_fpu(struct pt_regs *regs) { regs->sr &= ~SR_FD; }
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/fpu.h
static inline void clear_fpu(struct task_struct *tsk, struct pt_regs *regs) { preempt_disable(); if (task_thread_info(tsk)->status & TS_USEDFPU) { task_thread_info(tsk)->status &= ~TS_USEDFPU; release_fpu(regs); } preempt_enable(); }
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/futex-irq.h
static inline int atomic_futex_op_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr, u32 oldval, u32 newval) { unsigned long flags; int ret; u32 prev = 0; local_irq_save(flags); ret = get_user(prev, uaddr); if (!ret && oldval == prev) ret = put_user(newv...
[ 1, 0 ]
Linux Kernel
arch/sh/include/asm/futex.h
static inline int futex_atomic_cmpxchg_inatomic(u32 *uval, u32 __user *uaddr, u32 oldval, u32 newval) { if (!access_ok(uaddr, sizeof(u32))) return -EFAULT; return atomic_futex_op_cmpxchg_inatomic(uval, uaddr, oldval, newval); }
[ 1, 0 ]
Linux Kernel
arch/sh/include/asm/gpio.h
static inline int gpio_get_value(unsigned gpio) { return __gpio_get_value(gpio); }
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/gpio.h
static inline int gpio_cansleep(unsigned gpio) { return __gpio_cansleep(gpio); }
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/gpio.h
static inline int gpio_to_irq(unsigned gpio) { return __gpio_to_irq(gpio); }
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/hugetlb.h
static inline int prepare_hugepage_range(struct file *file, unsigned long addr, unsigned long len) { if (len & ~HPAGE_MASK) return -EINVAL; if (addr & ~HPAGE_MASK) return -EINVAL; return 0; } #define __HAVE_ARCH_HUGE_PTEP_CLEAR_FLUSH
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/hugetlb.h
static inline void arch_clear_hugepage_flags(struct page *page) { clear_bit(PG_dcache_clean, &page->flags); } #define arch_clear_hugepage_flags arch_clear_hugepage_flags #include <asm-generic/hugetlb.h> #endif
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/io.h
static inline void __set_io_port_base(unsigned long pbase) { *(unsigned long *)&sh_io_port_base = pbase; barrier(); } #ifdef CONFIG_GENERIC_IOMAP #define __ioport_map ioport_map #else
[ 1, 0 ]
Linux Kernel
arch/sh/include/asm/io.h
static inline void __iomem *ioremap_prot(phys_addr_t offset, unsigned long size, unsigned long flags) { return __ioremap_caller(offset, size, __pgprot(flags), __builtin_return_address(0)); } #endif #else /* CONFIG_MMU */
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/io_noioport.h
static inline u16 inw(unsigned long addr) { BUG(); return -1; }
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/io_noioport.h
static inline void outw(unsigned short x, unsigned long port) { BUG(); }
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/io_noioport.h
static inline void outsb(unsigned long port, const void *src, unsigned long count) { BUG(); }
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/kexec.h
static inline void reserve_crashkernel(void) {}
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/mmu_context.h
static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, struct task_struct *tsk) { unsigned int cpu = smp_processor_id(); if (likely(prev != next)) { cpumask_set_cpu(cpu, mm_cpumask(next)); set_TTB(next->pgd); activate_context(next, cpu); } else if (!...
[ 1, 0 ]
Linux Kernel
arch/sh/include/asm/pci.h
static inline int pci_proc_domain(struct pci_bus *bus) { struct pci_channel *hose = bus->sysdata; return hose->need_domain_info; }
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/pgalloc.h
static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd, pgtable_t pte) { set_pmd(pmd, __pmd((unsigned long)page_address(pte))); } #define __pte_free_tlb(tlb, pte, addr) \ do { ...
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/pgtable.h
static inline unsigned long long neff_sign_extend(unsigned long val) { unsigned long long extended = val; return (extended & NEFF_SIGN) ? (extended | NEFF_MASK) : extended; } #ifdef CONFIG_29BIT #define NPHYS 29 #else #define NPHYS 32 #endif #define NPHYS_SIGN (1LL << (NPHYS - 1)) #define NPHYS_MASK (-1LL << NPHY...
[ 1, 0 ]
Linux Kernel
arch/sh/include/asm/pgtable.h
static inline bool pte_access_permitted(pte_t pte, bool write) { u64 prot = _PAGE_PRESENT; prot |= _PAGE_EXT(_PAGE_EXT_KERN_READ | _PAGE_EXT_USER_READ); if (write) prot |= _PAGE_EXT(_PAGE_EXT_KERN_WRITE | _PAGE_EXT_USER_WRITE); return __pte_access_permitted(pte, prot); }
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/pgtable_32.h
static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) { pte.pte_low &= _PAGE_CHG_MASK; pte.pte_low |= pgprot_val(newprot); #ifdef CONFIG_X2TLB pte.pte_high |= pgprot_val(newprot) >> 32; #endif return pte; }
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/platform_early.h
static inline int is_sh_early_platform_device(struct platform_device *pdev) { return !pdev->dev.driver; }
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/processor_32.h
static __inline__ void enable_fpu(void) { unsigned long __dummy; __asm__ __volatile__("stc sr, %0\n\t" "and %1, %0\n\t" "ldc %0, sr" : "=&r"(__dummy) : "r"(~SR_FD)); } /* Double presision, NANS as NANS, rounding to nearest...
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/ptrace.h
static inline void instruction_pointer_set(struct pt_regs *regs, unsigned long val) { regs->pc = val; }
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/ptrace.h
static inline void user_stack_pointer_set(struct pt_regs *regs, unsigned long val) { regs->regs[15] = val; }
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/ptrace.h
static inline unsigned long regs_get_register(struct pt_regs *regs, unsigned int offset) { if (unlikely(offset > MAX_REG_OFFSET)) return 0; return *(unsigned long *)((unsigned long)regs + offset); }
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/ptrace.h
static inline int regs_within_kernel_stack(struct pt_regs *regs, unsigned long addr) { return ((addr & ~(THREAD_SIZE - 1)) == (kernel_stack_pointer(regs) & ~(THREAD_SIZE - 1))); }
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/sh_bios.h
static inline void sh_bios_vbr_reload(void) {}
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/smp-ops.h
static inline void plat_smp_setup(void) { BUG_ON(!mp_ops); mp_ops->smp_setup(); }
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/spinlock-cas.h
static inline unsigned __sl_cas(volatile unsigned *p, unsigned old, unsigned new) { __asm__ __volatile__("cas.l %1,%0,@r0" : "+r"(new) : "r"(old), "z"(p) : "t", "memory"); return new; }
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/spinlock-cas.h
static inline void arch_spin_unlock(arch_spinlock_t *lock) { __sl_cas(&lock->lock, 0, 1); }
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/spinlock-cas.h
static inline int arch_spin_trylock(arch_spinlock_t *lock) { return __sl_cas(&lock->lock, 1, 0); }
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/spinlock-cas.h
static inline void arch_read_lock(arch_rwlock_t *rw) { unsigned old; do old = rw->lock; while (!old || __sl_cas(&rw->lock, old, old - 1) != old); }
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/spinlock-cas.h
static inline void arch_read_unlock(arch_rwlock_t *rw) { unsigned old; do old = rw->lock; while (__sl_cas(&rw->lock, old, old + 1) != old); }
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/spinlock-cas.h
static inline void arch_write_lock(arch_rwlock_t *rw) { while (__sl_cas(&rw->lock, RW_LOCK_BIAS, 0) != RW_LOCK_BIAS) ; }
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/spinlock-cas.h
static inline void arch_write_unlock(arch_rwlock_t *rw) { __sl_cas(&rw->lock, 0, RW_LOCK_BIAS); }
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/spinlock-llsc.h
static inline void arch_spin_lock(arch_spinlock_t *lock) { unsigned long tmp; unsigned long oldval; __asm__ __volatile__("1: \n\t" "movli.l @%2, %0 ! arch_spin_lock \n\t" "mov %0, %1 \n\t" "mov #0, %0 \n\t" "...
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/spinlock-llsc.h
static inline int arch_spin_trylock(arch_spinlock_t *lock) { unsigned long tmp, oldval; __asm__ __volatile__("1: \n\t" "movli.l @%2, %0 ! arch_spin_trylock \n\t" "mov %0, %1 \n\t" "mov #0, %0 \n\t" "movco.l %0...
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/spinlock-llsc.h
static inline void arch_read_lock(arch_rwlock_t *rw) { unsigned long tmp; __asm__ __volatile__("1: \n\t" "movli.l @%1, %0 ! arch_read_lock \n\t" "cmp/pl %0 \n\t" "bf 1b \n\t" "add #-1, %0 \n\t" ...
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/spinlock-llsc.h
static inline int arch_write_trylock(arch_rwlock_t *rw) { unsigned long tmp, oldval; __asm__ __volatile__("1: \n\t" "movli.l @%2, %0 ! arch_write_trylock \n\t" "mov %0, %1 \n\t" "cmp/hs %3, %0 \n\t" "bf 2f ...
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/sram.h
static inline unsigned long sram_alloc(size_t len) { if (!sram_pool) return 0UL; return gen_pool_alloc(sram_pool, len); }
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/sram.h
static inline void sram_free(unsigned long addr, size_t len) { return gen_pool_free(sram_pool, addr, len); }
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/sram.h
static inline void sram_free(unsigned long addr, size_t len) {}
[ 0, 0 ]
Linux Kernel
arch/sh/include/asm/stackprotector.h
static __always_inline void boot_init_stack_canary(void) { unsigned long canary = get_random_canary(); current->stack_canary = canary; __stack_chk_guard = current->stack_canary; }
[ 1, 0 ]
Linux Kernel
arch/sh/include/asm/suspend.h
static inline int sh_mobile_setup_cpuidle(void) { return 0; }
[ 0, 0 ]