Projectname large_stringclasses 15
values | Filepath large_stringlengths 4 106 ⌀ | Function large_stringlengths 11 3.45k | Label list |
|---|---|---|---|
Linux Kernel | arch/x86/xen/smp.c | void xen_smp_send_call_function_ipi(const struct cpumask *mask) {
int cpu;
__xen_send_IPI_mask(mask, XEN_CALL_FUNCTION_VECTOR);
for_each_cpu(cpu, mask) {
if (xen_vcpu_stolen(cpu)) {
HYPERVISOR_sched_op(SCHEDOP_yield, NULL);
break;
}
}
} | [
0,
0
] |
Linux Kernel | arch/x86/xen/smp.c |
void xen_send_IPI_self(int vector) {
int xen_vector = xen_map_vector(vector);
if (xen_vector >= 0)
xen_send_IPI_one(smp_processor_id(), xen_vector);
} | [
0,
0
] |
Linux Kernel | arch/x86/xen/smp.h |
static inline int xen_smp_intr_init_pv(unsigned int cpu) { return 0; } | [
0,
0
] |
Linux Kernel | arch/x86/xen/smp_hvm.c |
void __init xen_hvm_smp_init(void) {
smp_ops.smp_prepare_boot_cpu = xen_hvm_smp_prepare_boot_cpu;
smp_ops.smp_prepare_cpus = xen_hvm_smp_prepare_cpus;
smp_ops.smp_cpus_done = xen_smp_cpus_done;
smp_ops.cpu_die = xen_hvm_cpu_die;
if (!xen_have_vector_callback) {
#ifdef CONFIG_PARAVIRT_SPINLOCKS
nopvspin ... | [
0,
0
] |
Linux Kernel | arch/x86/xen/smp_pv.c | static void cpu_bringup(void) {
int cpu;
cr4_init();
cpu_init();
touch_softlockup_watchdog();
if (!xen_feature(XENFEAT_supervisor_mode_kernel)) {
xen_enable_sysenter();
xen_enable_syscall();
}
cpu = smp_processor_id();
smp_store_cpu_info(cpu);
cpu_data(cpu).x86_max_cores = 1;
set_cpu_sibli... | [
0,
0
] |
Linux Kernel | arch/x86/xen/smp_pv.c | static int xen_pv_cpu_disable(void) { return -ENOSYS; } | [
0,
0
] |
Linux Kernel | arch/x86/xen/spinlock.c | static void xen_qlock_kick(int cpu) {
int irq = per_cpu(lock_kicker_irq, cpu);
if (irq == -1)
return;
xen_send_IPI_one(cpu, XEN_SPIN_UNLOCK_VECTOR);
} | [
0,
0
] |
Linux Kernel | arch/x86/xen/spinlock.c | void xen_init_lock_cpu(int cpu) {
int irq;
char *name;
if (!xen_pvspin)
return;
WARN(per_cpu(lock_kicker_irq, cpu) >= 0,
"spinlock on CPU%d exists on IRQ%d!\n", cpu,
per_cpu(lock_kicker_irq, cpu));
name = kasprintf(GFP_KERNEL, "spinlock%d", cpu);
per_cpu(irq_name, cpu) = name;
irq = b... | [
1,
0
] |
Linux Kernel | arch/x86/xen/suspend.c |
void xen_arch_pre_suspend(void) {
xen_save_time_memory_area();
if (xen_pv_domain())
xen_pv_pre_suspend();
} | [
0,
0
] |
Linux Kernel | arch/x86/xen/suspend.c |
void xen_arch_post_suspend(int cancelled) {
if (xen_pv_domain())
xen_pv_post_suspend(cancelled);
else
xen_hvm_post_suspend(cancelled);
xen_restore_time_memory_area();
} | [
0,
0
] |
Linux Kernel | arch/x86/xen/suspend.c | static void xen_vcpu_notify_restore(void *data) {
if (xen_pv_domain() && boot_cpu_has(X86_FEATURE_SPEC_CTRL))
wrmsrl(MSR_IA32_SPEC_CTRL, this_cpu_read(spec_ctrl));
if (smp_processor_id() == 0)
return;
tick_resume_local();
} | [
0,
0
] |
Linux Kernel | arch/x86/xen/suspend.c |
void xen_arch_suspend(void) {
int cpu;
for_each_online_cpu(cpu) xen_pmu_finish(cpu);
on_each_cpu(xen_vcpu_notify_suspend, NULL, 1);
} | [
0,
0
] |
Linux Kernel | arch/x86/xen/suspend_hvm.c |
void xen_hvm_post_suspend(int suspend_cancelled) {
if (!suspend_cancelled) {
xen_hvm_init_shared_info();
xen_vcpu_restore();
}
if (xen_percpu_upcall) {
unsigned int cpu;
for_each_online_cpu(cpu) BUG_ON(xen_set_upcall_vector(cpu));
} else {
xen_setup_callback_vector();
}
xen_unplug_emul... | [
0,
0
] |
Linux Kernel | arch/x86/xen/time.c |
static u64 xen_clocksource_get_cycles(struct clocksource *cs) {
return xen_clocksource_read();
} | [
0,
0
] |
Linux Kernel | arch/x86/xen/time.c |
static u64 xen_sched_clock(void) {
return xen_clocksource_read() - xen_sched_clock_offset;
} | [
0,
0
] |
Linux Kernel | arch/x86/xen/time.c |
static int xen_cs_enable(struct clocksource *cs) {
vclocks_set_used(VDSO_CLOCKMODE_PVCLOCK);
return 0;
} | [
0,
0
] |
Linux Kernel | arch/x86/xen/time.c | static s64 get_abs_timeout(unsigned long delta) {
return xen_clocksource_read() + delta;
} | [
0,
0
] |
Linux Kernel | arch/x86/xen/time.c | static int xen_timerop_shutdown(struct clock_event_device *evt) {
HYPERVISOR_set_timer_op(0);
return 0;
} | [
0,
0
] |
Linux Kernel | arch/x86/xen/time.c |
static int xen_vcpuop_shutdown(struct clock_event_device *evt) {
int cpu = smp_processor_id();
if (HYPERVISOR_vcpu_op(VCPUOP_stop_singleshot_timer, xen_vcpu_nr(cpu),
NULL) ||
HYPERVISOR_vcpu_op(VCPUOP_stop_periodic_timer, xen_vcpu_nr(cpu), NULL))
BUG();
return 0;
} | [
0,
0
] |
Linux Kernel | arch/x86/xen/time.c |
static irqreturn_t xen_timer_interrupt(int irq, void *dev_id) {
struct clock_event_device *evt = this_cpu_ptr(&xen_clock_events.evt);
irqreturn_t ret;
ret = IRQ_NONE;
if (evt->event_handler) {
evt->event_handler(evt);
ret = IRQ_HANDLED;
}
return ret;
} | [
0,
0
] |
Linux Kernel | arch/x86/xen/time.c |
void xen_setup_cpu_clockevents(void) {
clockevents_register_device(this_cpu_ptr(&xen_clock_events.evt));
} | [
0,
0
] |
Linux Kernel | arch/x86/xen/time.c |
void xen_save_time_memory_area(void) {
struct vcpu_register_time_memory_area t;
int ret;
xen_clock_value_saved = xen_clocksource_read() - xen_sched_clock_offset;
if (!xen_clock)
return;
t.addr.v = NULL;
ret = HYPERVISOR_vcpu_op(VCPUOP_register_vcpu_time_memory_area, 0, &t);
if (ret != 0)
pr_n... | [
0,
0
] |
Linux Kernel | arch/x86/xen/time.c | static void xen_setup_vsyscall_time_info(void) {
struct vcpu_register_time_memory_area t;
struct pvclock_vsyscall_time_info *ti;
int ret;
ti = (struct pvclock_vsyscall_time_info *)get_zeroed_page(GFP_KERNEL);
if (!ti)
return;
t.addr.v = &ti->pvti;
ret = HYPERVISOR_vcpu_op(VCPUOP_register_vcpu_time_... | [
0,
0
] |
Linux Kernel | arch/x86/xen/time.c | static void __init xen_time_init(void) {
struct pvclock_vcpu_time_info *pvti;
int cpu = smp_processor_id();
struct timespec64 tp;
if (xen_initial_domain())
xen_clocksource.rating = 275;
clocksource_register_hz(&xen_clocksource, NSEC_PER_SEC);
if (HYPERVISOR_vcpu_op(VCPUOP_stop_periodic_timer, xen_vcp... | [
0,
0
] |
Linux Kernel | arch/x86/xen/time.c | void __init xen_hvm_init_time_ops(void) {
static bool hvm_time_initialized;
if (hvm_time_initialized)
return;
if (!xen_have_vector_callback)
return;
if (!xen_feature(XENFEAT_hvm_safe_pvclock)) {
pr_info_once("Xen doesn't support pvclock on HVM, disable pv timer");
return;
}
/*
* Only ... | [
0,
0
] |
Linux Kernel | arch/x86/xen/xen-ops.h | static inline void xen_uninit_lock_cpu(int cpu) {} | [
0,
0
] |
Linux Kernel | arch/x86/xen/xen-ops.h | static inline void __init xen_efi_init(struct boot_params *boot_params) {} | [
0,
0
] |
Linux Kernel | arch/xtensa/include/asm/bitops.h | static inline unsigned long __ffs(unsigned long x) {
return 31 - __cntlz(x & -x);
} | [
0,
0
] |
Linux Kernel | arch/xtensa/include/asm/bitops.h | static inline int ffs(unsigned long x) { return 32 - __cntlz(x & -x); } | [
0,
0
] |
Linux Kernel | arch/xtensa/include/asm/cacheflush.h | static inline void __flush_dcache_page(unsigned long va) {} | [
0,
0
] |
Linux Kernel | arch/xtensa/include/asm/checksum.h |
static __inline__ __wsum csum_tcpudp_nofold(__be32 saddr, __be32 daddr,
__u32 len, __u8 proto, __wsum sum) {
#ifdef __XTENSA_EL__
unsigned long len_proto = (len + proto) << 8;
#elif defined(__XTENSA_EB__)
unsigned long len_proto = len + proto;
#else
#error processor byt... | [
1,
0
] |
Linux Kernel | arch/xtensa/include/asm/checksum.h | static __inline__ __sum16 csum_tcpudp_magic(__be32 saddr, __be32 daddr,
__u32 len, __u8 proto, __wsum sum) {
return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum));
} | [
0,
0
] |
Linux Kernel | arch/xtensa/include/asm/cmpxchg.h |
static __inline__ unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
unsigned long new, int size) {
switch (size) {
case 4:
return __cmpxchg_u32(ptr, old, new);
default:
__cmpxchg_called_with_bad_pointer();
return old;
}
}
#define arch_cmpxchg(... | [
1,
0
] |
Linux Kernel | arch/xtensa/include/asm/cmpxchg.h | static inline unsigned long __cmpxchg_local(volatile void *ptr,
unsigned long old,
unsigned long new, int size) {
switch (size) {
case 4:
return __cmpxchg_u32(ptr, old, new);
default:
return __generic_cmpxchg_local(ptr... | [
1,
0
] |
Linux Kernel | arch/xtensa/include/asm/cmpxchg.h | static inline unsigned long xchg_u32(volatile int *m, unsigned long val) {
#if XCHAL_HAVE_EXCLUSIVE
unsigned long tmp, result;
__asm__ __volatile__("1: l32ex %[result], %[addr]\n"
" mov %[tmp], %[val]\n"
" s32ex %[tmp], %[addr]\n"
... | [
0,
0
] |
Linux Kernel | arch/xtensa/include/asm/current.h |
static inline struct task_struct *get_current(void) {
return current_thread_info()->task;
}
#define current get_current() | [
0,
0
] |
Linux Kernel | arch/xtensa/include/asm/highmem.h |
static inline unsigned int get_next_pkmap_nr(unsigned int color) {
last_pkmap_nr_arr[color] =
(last_pkmap_nr_arr[color] + DCACHE_N_COLORS) & LAST_PKMAP_MASK;
return last_pkmap_nr_arr[color] + color;
} | [
0,
0
] |
Linux Kernel | arch/xtensa/include/asm/highmem.h |
static inline int no_more_pkmaps(unsigned int pkmap_nr, unsigned int color) {
return pkmap_nr < DCACHE_N_COLORS;
} | [
0,
0
] |
Linux Kernel | arch/xtensa/include/asm/highmem.h |
static inline void flush_cache_kmaps(void) { flush_cache_all(); }
#define arch_kmap_local_post_unmap(vaddr) \
local_flush_tlb_kernel_range(vaddr, vaddr + PAGE_SIZE) | [
0,
0
] |
Linux Kernel | arch/xtensa/include/asm/io.h | static inline void __iomem *ioremap(unsigned long offset, unsigned long size) {
if (offset >= XCHAL_KIO_PADDR && offset - XCHAL_KIO_PADDR < XCHAL_KIO_SIZE)
return (void *)(offset - XCHAL_KIO_PADDR + XCHAL_KIO_BYPASS_VADDR);
else
return xtensa_ioremap_nocache(offset, size);
} | [
1,
0
] |
Linux Kernel | arch/xtensa/include/asm/io.h |
static inline void iounmap(volatile void __iomem *addr) {
unsigned long va = (unsigned long)addr;
if (!(va >= XCHAL_KIO_CACHED_VADDR &&
va - XCHAL_KIO_CACHED_VADDR < XCHAL_KIO_SIZE) &&
!(va >= XCHAL_KIO_BYPASS_VADDR &&
va - XCHAL_KIO_BYPASS_VADDR < XCHAL_KIO_SIZE))
xtensa_iounmap(addr);
... | [
0,
0
] |
Linux Kernel | arch/xtensa/include/asm/irqflags.h | static inline bool arch_irqs_disabled(void) {
return arch_irqs_disabled_flags(arch_local_save_flags());
}
#endif | [
0,
0
] |
Linux Kernel | arch/xtensa/include/asm/kasan.h |
static inline void kasan_init(void) {} | [
0,
0
] |
Linux Kernel | arch/xtensa/include/asm/kmem_layout.h | static inline unsigned long xtensa_get_kio_paddr(void) {
return xtensa_kio_paddr;
}
#endif
#else
#define XCHAL_KIO_PADDR XCHAL_KIO_DEFAULT_PADDR
#endif
#ifndef CONFIG_KASAN
#define KERNEL_STACK_SHIFT 13
#else
#define KERNEL_STACK_SHIFT 15
#endif
#define KERNEL_STACK_SIZE (1 << KERNEL_STACK_SHIFT)
#endif | [
0,
0
] |
Linux Kernel | arch/xtensa/include/asm/mmu_context.h |
static inline void set_rasid_register(unsigned long val) {
__asm__ __volatile__(" wsr %0, rasid\n\t"
" isync\n"
:
: "a"(val));
} | [
0,
0
] |
Linux Kernel | arch/xtensa/include/asm/mmu_context.h | static inline void activate_context(struct mm_struct *mm, unsigned int cpu) {
get_mmu_context(mm, cpu);
set_rasid_register(ASID_INSERT(mm->context.asid[cpu]));
invalidate_page_directory();
} | [
0,
0
] |
Linux Kernel | arch/xtensa/include/asm/nommu_context.h |
static inline void init_kio(void) {} | [
0,
0
] |
Linux Kernel | arch/xtensa/include/asm/pgalloc.h |
static inline void ptes_clear(pte_t *ptep) {
int i;
for (i = 0; i < PTRS_PER_PTE; i++)
pte_clear(NULL, 0, ptep + i);
} | [
0,
0
] |
Linux Kernel | arch/xtensa/include/asm/pgalloc.h |
static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm) {
pte_t *ptep;
ptep = (pte_t *)__pte_alloc_one_kernel(mm);
if (!ptep)
return NULL;
ptes_clear(ptep);
return ptep;
} | [
0,
0
] |
Linux Kernel | arch/xtensa/include/asm/pgtable.h | static inline void paging_init(void) {}
#endif
#define pmd_page_vaddr(pmd) ((unsigned long)(pmd_val(pmd) & PAGE_MASK))
#define pmd_pfn(pmd) (__pa(pmd_val(pmd)) >> PAGE_SHIFT)
#define pmd_page(pmd) virt_to_page(pmd_val(pmd))
/*
* pte status.
*/
#define pte_none(pte) (pte_val(pte) == (_PAGE_CA_INVALID | _PAGE_USER))
... | [
0,
0
] |
Linux Kernel | arch/xtensa/include/asm/pgtable.h | static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } | [
0,
0
] |
Linux Kernel | arch/xtensa/include/asm/pgtable.h |
static inline pte_t pte_wrprotect(pte_t pte) {
pte_val(pte) &= ~(_PAGE_WRITABLE | _PAGE_HW_WRITE);
return pte;
} | [
0,
0
] |
Linux Kernel | arch/xtensa/include/asm/ptrace.h | static inline unsigned long regs_return_value(struct pt_regs *regs) {
return regs->areg[2];
}
#else
#include <asm/asm-offsets.h> | [
0,
0
] |
Linux Kernel | arch/xtensa/include/asm/string.h | static inline int strncmp(const char *__cs, const char *__ct, size_t __n) {
register int __res;
unsigned long __dummy;
__asm__ __volatile__("mov %2, %3\n"
"1:\n\t"
"beq %0, %6, 2f\n\t"
"l8ui %3, %1, 0\n\t"
"addi %1, %1, 1... | [
0,
0
] |
Linux Kernel | arch/xtensa/include/asm/syscall.h |
static inline long syscall_get_nr(struct task_struct *task,
struct pt_regs *regs) {
return regs->syscall;
} | [
0,
0
] |
Linux Kernel | arch/xtensa/include/asm/syscall.h | static inline long syscall_get_error(struct task_struct *task,
struct pt_regs *regs) {
return IS_ERR_VALUE(regs->areg[2]) ? regs->areg[2] : 0;
} | [
0,
0
] |
Linux Kernel | arch/xtensa/include/asm/syscall.h |
static inline void syscall_get_arguments(struct task_struct *task,
struct pt_regs *regs,
unsigned long *args) {
static const unsigned int reg[] = XTENSA_SYSCALL_ARGUMENT_REGS;
unsigned int i;
for (i = 0; i < 6; ++i)
args[i] = ... | [
1,
0
] |
Linux Kernel | arch/xtensa/include/asm/tlbflush.h | static inline unsigned long itlb_probe(unsigned long addr) {
unsigned long tmp;
__asm__ __volatile__("pitlb %0, %1\n\t" : "=a"(tmp) : "a"(addr));
return tmp;
} | [
0,
0
] |
Linux Kernel | arch/xtensa/include/asm/tlbflush.h |
static inline void write_dtlb_entry(pte_t entry, int way) {
__asm__ __volatile__("wdtlb %1, %0; dsync\n\t" : : "r"(way), "r"(entry));
} | [
0,
0
] |
Linux Kernel | arch/xtensa/include/asm/tlbflush.h |
static inline unsigned long read_dtlb_translation(int way) {
unsigned long tmp;
__asm__ __volatile__("rdtlb1 %0, %1\n\t" : "=a"(tmp), "+a"(way));
return tmp;
} | [
0,
0
] |
Linux Kernel | arch/xtensa/include/asm/tlbflush.h |
static inline unsigned long read_itlb_translation(int way) {
unsigned long tmp;
__asm__ __volatile__("ritlb1 %0, %1\n\t" : "=a"(tmp), "+a"(way));
return tmp;
} | [
0,
0
] |
Linux Kernel | arch/xtensa/include/uapi/asm/swab.h | static inline __attribute_const__ __u32 __arch_swab32(__u32 x) {
__u32 res;
__asm__("ssai 8 \n\t"
"srli %0, %1, 16 \n\t"
"src %0, %0, %1 \n\t"
"src %0, %0, %0 \n\t"
"src %0, %1, %0 \n"
: "=&a"(res)
: "a"(x));
return ... | [
0,
0
] |
Linux Kernel | arch/xtensa/kernel/hibernate.c |
void notrace save_processor_state(void) {
WARN_ON(num_online_cpus() != 1);
#if XTENSA_HAVE_COPROCESSORS
local_coprocessors_flush_release_all();
#endif
} | [
0,
0
] |
Linux Kernel | arch/xtensa/kernel/hw_breakpoint.c |
int arch_check_bp_in_kernelspace(struct arch_hw_breakpoint *hw) {
unsigned int len;
unsigned long va;
va = hw->address;
len = hw->len;
return (va >= TASK_SIZE) && ((va + len - 1) >= TASK_SIZE);
} | [
0,
0
] |
Linux Kernel | arch/xtensa/kernel/hw_breakpoint.c | void arch_uninstall_hw_breakpoint(struct perf_event *bp) {
struct arch_hw_breakpoint *info = counter_arch_bp(bp);
int i;
if (info->type == XTENSA_BREAKPOINT_EXECUTE) {
unsigned long ibreakenable;
i = free_slot(this_cpu_ptr(bp_on_reg), XCHAL_NUM_IBREAK, bp);
if (i >= 0) {
ibreakenable = xtensa_... | [
0,
0
] |
Linux Kernel | arch/xtensa/kernel/hw_breakpoint.c | void clear_ptrace_hw_breakpoint(struct task_struct *tsk) {
memset(tsk->thread.ptrace_bp, 0, sizeof(tsk->thread.ptrace_bp));
memset(tsk->thread.ptrace_wp, 0, sizeof(tsk->thread.ptrace_wp));
} | [
1,
0
] |
Linux Kernel | arch/xtensa/kernel/irq.c | int xtensa_irq_map(struct irq_domain *d, unsigned int irq, irq_hw_number_t hw) {
struct irq_chip *irq_chip = d->host_data;
u32 mask = 1 << hw;
if (mask & XCHAL_INTTYPE_MASK_SOFTWARE) {
irq_set_chip_and_handler_name(irq, irq_chip, handle_simple_irq, "level");
irq_set_status_flags(irq, IRQ_LEVEL);
} else... | [
0,
0
] |
Linux Kernel | arch/xtensa/kernel/irq.c |
unsigned xtensa_map_ext_irq(unsigned ext_irq) {
unsigned mask =
XCHAL_INTTYPE_MASK_EXTERN_EDGE | XCHAL_INTTYPE_MASK_EXTERN_LEVEL;
unsigned i;
for (i = 0; mask; ++i, mask >>= 1) {
if ((mask & 1) && ext_irq-- == 0)
return i;
}
return XCHAL_NUM_INTERRUPTS;
} | [
1,
0
] |
Linux Kernel | arch/xtensa/kernel/jump_label.c |
static void local_patch_text(unsigned long addr, const void *data, size_t sz) {
memcpy((void *)addr, data, sz);
local_flush_icache_range(addr, addr + sz);
} | [
1,
0
] |
Linux Kernel | arch/xtensa/kernel/module.c |
static int decode_l32r_opcode(unsigned char *location) {
#ifdef __XTENSA_EB__
return (location[0] & 0xf0) == 0x10;
#endif
#ifdef __XTENSA_EL__
return (location[0] & 0xf) == 0x1;
#endif
} | [
1,
0
] |
Linux Kernel | arch/xtensa/kernel/pci-dma.c |
void arch_sync_dma_for_cpu(phys_addr_t paddr, size_t size,
enum dma_data_direction dir) {
switch (dir) {
case DMA_BIDIRECTIONAL:
case DMA_FROM_DEVICE:
do_cache_op(paddr, size, __invalidate_dcache_range);
break;
case DMA_NONE:
BUG();
break;
default:
break;
}
... | [
0,
0
] |
Linux Kernel | arch/xtensa/kernel/pci-dma.c |
void arch_sync_dma_for_device(phys_addr_t paddr, size_t size,
enum dma_data_direction dir) {
switch (dir) {
case DMA_BIDIRECTIONAL:
case DMA_TO_DEVICE:
if (XCHAL_DCACHE_IS_WRITEBACK)
do_cache_op(paddr, size, __flush_dcache_range);
break;
case DMA_NONE:
BUG();
... | [
0,
0
] |
Linux Kernel | arch/xtensa/kernel/pci.c | resource_size_t pcibios_align_resource(void *data, const struct resource *res,
resource_size_t size,
resource_size_t align) {
struct pci_dev *dev = data;
resource_size_t start = res->start;
if (res->flags & IORESOURCE_IO) {
if (siz... | [
1,
0
] |
Linux Kernel | arch/xtensa/kernel/pci.c | void pcibios_fixup_bus(struct pci_bus *bus) {
if (bus->parent) {
pci_read_bridge_bases(bus);
}
} | [
0,
0
] |
Linux Kernel | arch/xtensa/kernel/pci.c | int pci_iobar_pfn(struct pci_dev *pdev, int bar, struct vm_area_struct *vma) {
struct pci_controller *pci_ctrl = (struct pci_controller *)pdev->sysdata;
resource_size_t ioaddr = pci_resource_start(pdev, bar);
if (!pci_ctrl)
return -EINVAL;
/* Convert to an offset within this PCI controller */
ioaddr -= ... | [
0,
0
] |
Linux Kernel | arch/xtensa/kernel/perf_event.c | static int xtensa_pmu_event_init(struct perf_event *event) {
int ret;
switch (event->attr.type) {
case PERF_TYPE_HARDWARE:
if (event->attr.config >= ARRAY_SIZE(xtensa_hw_ctl) ||
xtensa_hw_ctl[event->attr.config] == 0)
return -EINVAL;
event->hw.config = xtensa_hw_ctl[event->attr.config];
... | [
1,
0
] |
Linux Kernel | arch/xtensa/kernel/perf_event.c | static void xtensa_pmu_start(struct perf_event *event, int flags) {
struct hw_perf_event *hwc = &event->hw;
int idx = hwc->idx;
if (WARN_ON_ONCE(idx == -1))
return;
if (flags & PERF_EF_RELOAD) {
WARN_ON_ONCE(!(event->hw.state & PERF_HES_UPTODATE));
xtensa_perf_event_set_period(event, hwc, idx);
... | [
0,
0
] |
Linux Kernel | arch/xtensa/kernel/perf_event.c | static int xtensa_pmu_add(struct perf_event *event, int flags) {
struct xtensa_pmu_events *ev = this_cpu_ptr(&xtensa_pmu_events);
struct hw_perf_event *hwc = &event->hw;
int idx = hwc->idx;
if (__test_and_set_bit(idx, ev->used_mask)) {
idx = find_first_zero_bit(ev->used_mask, XCHAL_NUM_PERF_COUNTERS);
... | [
0,
0
] |
Linux Kernel | arch/xtensa/kernel/perf_event.c |
static void xtensa_pmu_del(struct perf_event *event, int flags) {
struct xtensa_pmu_events *ev = this_cpu_ptr(&xtensa_pmu_events);
xtensa_pmu_stop(event, PERF_EF_UPDATE);
__clear_bit(event->hw.idx, ev->used_mask);
perf_event_update_userpage(event);
} | [
0,
0
] |
Linux Kernel | arch/xtensa/kernel/perf_event.c |
static int callchain_trace(struct stackframe *frame, void *data) {
struct perf_callchain_entry_ctx *entry = data;
perf_callchain_store(entry, frame->pc);
return 0;
} | [
0,
0
] |
Linux Kernel | arch/xtensa/kernel/perf_event.c |
void perf_event_print_debug(void) {
unsigned long flags;
unsigned i;
local_irq_save(flags);
pr_info("CPU#%d: PMG: 0x%08lx\n", smp_processor_id(), get_er(XTENSA_PMU_PMG));
for (i = 0; i < XCHAL_NUM_PERF_COUNTERS; ++i)
pr_info("PM%d: 0x%08lx, PMCTRL%d: 0x%08lx, PMSTAT%d: 0x%08lx\n", i,
get_er(... | [
0,
0
] |
Linux Kernel | arch/xtensa/kernel/process.c | void local_coprocessors_flush_release_all(void) {
struct thread_info **coprocessor_owner;
struct thread_info *unique_owner[XCHAL_CP_MAX];
int n = 0;
int i, j;
coprocessor_owner = this_cpu_ptr(&exc_table)->coprocessor_owner;
xtensa_set_sr(XCHAL_CP_MASK, cpenable);
for (i = 0; i < XCHAL_CP_MAX; i++) {
... | [
0,
0
] |
Linux Kernel | arch/xtensa/kernel/process.c | void coprocessor_release_all(struct thread_info *ti) {
if (ti->cpenable) {
smp_rmb();
smp_call_function_single(ti->cp_owner_cpu, local_coprocessor_release_all,
ti, true);
}
} | [
0,
0
] |
Linux Kernel | arch/xtensa/kernel/process.c | void flush_thread(void) {
#if XTENSA_HAVE_COPROCESSORS
struct thread_info *ti = current_thread_info();
coprocessor_flush_release_all(ti);
#endif
flush_ptrace_hw_breakpoint(current);
} | [
0,
0
] |
Linux Kernel | arch/xtensa/kernel/process.c | int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src) {
#if XTENSA_HAVE_COPROCESSORS
coprocessor_flush_all(task_thread_info(src));
#endif
*dst = *src;
return 0;
} | [
0,
0
] |
Linux Kernel | arch/xtensa/kernel/ptrace.c |
static int gpr_get(struct task_struct *target, const struct user_regset *regset,
struct membuf to) {
struct pt_regs *regs = task_pt_regs(target);
struct user_pt_regs newregs = {
.pc = regs->pc,
.ps = regs->ps & ~(1 << PS_EXCM_BIT),
.lbeg = regs->lbeg,
.lend = regs->lend,
... | [
1,
0
] |
Linux Kernel | arch/xtensa/kernel/ptrace.c |
void user_disable_single_step(struct task_struct *child) {
clear_tsk_thread_flag(child, TIF_SINGLESTEP);
} | [
0,
0
] |
Linux Kernel | arch/xtensa/kernel/ptrace.c |
static int ptrace_setregs(struct task_struct *child, void __user *uregs) {
return copy_regset_from_user(child, &user_xtensa_view, REGSET_GPR, 0,
sizeof(xtensa_gregset_t), uregs);
} | [
1,
0
] |
Linux Kernel | arch/xtensa/kernel/ptrace.c | static int ptrace_peekusr(struct task_struct *child, long regno,
long __user *ret) {
struct pt_regs *regs;
unsigned long tmp;
regs = task_pt_regs(child);
tmp = 0;
switch (regno) {
case REG_AR_BASE ... REG_AR_BASE + XCHAL_NUM_AREGS - 1:
tmp = regs->areg[regno - REG_AR_BASE];
... | [
1,
0
] |
Linux Kernel | arch/xtensa/kernel/ptrace.c |
static long ptrace_sethbpregs(struct task_struct *child, long addr,
long __user *datap) {
struct perf_event *bp;
struct perf_event_attr attr;
u32 user_data[2];
bool dbreak = addr & 1;
unsigned idx = addr >> 1;
int bp_type = 0;
if ((!dbreak && idx >= XCHAL_NUM_IBREAK) ||
... | [
1,
0
] |
Linux Kernel | arch/xtensa/kernel/ptrace.c | long arch_ptrace(struct task_struct *child, long request, unsigned long addr,
unsigned long data) {
int ret = -EPERM;
void __user *datap = (void __user *)data;
switch (request) {
case PTRACE_PEEKUSR:
ret = ptrace_peekusr(child, addr, datap);
break;
case PTRACE_POKEUSR: /* write regi... | [
0,
0
] |
Linux Kernel | arch/xtensa/kernel/setup.c | static int __init parse_tag_mem(const bp_tag_t *tag) {
struct bp_meminfo *mi = (struct bp_meminfo *)(tag->data);
if (mi->type != MEMORY_TYPE_CONVENTIONAL)
return -1;
return memblock_add(mi->start, mi->end - mi->start);
} | [
1,
0
] |
Linux Kernel | arch/xtensa/kernel/setup.c |
static int __init parse_tag_cmdline(const bp_tag_t *tag) {
strscpy(command_line, (char *)(tag->data), COMMAND_LINE_SIZE);
return 0;
} | [
0,
0
] |
Linux Kernel | arch/xtensa/kernel/setup.c | static int __init parse_bootparam(const bp_tag_t *tag) {
pr_info("Ignoring boot parameters at %p\n", tag);
return 0;
}
#endif
#ifdef CONFIG_USE_OF
#if !XCHAL_HAVE_PTP_MMU || XCHAL_HAVE_SPANNING_WAY | [
0,
0
] |
Linux Kernel | arch/xtensa/kernel/setup.c | static int __init xtensa_dt_io_area(unsigned long node, const char *uname,
int depth, void *data) {
return 1;
}
#endif | [
0,
0
] |
Linux Kernel | arch/xtensa/kernel/setup.c | void __init early_init_devtree(void *params) {
early_init_dt_scan(params);
of_scan_flat_dt(xtensa_dt_io_area, NULL);
if (!command_line[0])
strscpy(command_line, boot_command_line, COMMAND_LINE_SIZE);
}
#endif | [
0,
0
] |
Linux Kernel | arch/xtensa/kernel/setup.c |
void machine_restart(char *cmd) { platform_restart(); } | [
0,
0
] |
Linux Kernel | arch/xtensa/kernel/setup.c |
void machine_halt(void) {
platform_halt();
while (1)
;
} | [
0,
0
] |
Linux Kernel | arch/xtensa/kernel/signal.c | static int setup_sigcontext(struct rt_sigframe __user *frame,
struct pt_regs *regs) {
struct sigcontext __user *sc = &frame->uc.uc_mcontext;
struct thread_info *ti = current_thread_info();
int err = 0;
#define COPY(x) err |= __put_user(regs->x, &sc->sc_##x)
COPY(pc);
COPY(ps);
C... | [
1,
0
] |
Linux Kernel | arch/xtensa/kernel/signal.c | asmlinkage long xtensa_rt_sigreturn(void) {
struct pt_regs *regs = current_pt_regs();
struct rt_sigframe __user *frame;
sigset_t set;
int ret;
current->restart_block.fn = do_no_restart_syscall;
if (regs->depc > 64)
panic("rt_sigreturn in double exception!\n");
frame = (struct rt_sigframe __user *)r... | [
1,
0
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.