Projectname large_stringclasses 15
values | Filepath large_stringlengths 4 106 ⌀ | Function large_stringlengths 11 3.45k | Label list |
|---|---|---|---|
Linux Kernel | arch/sparc/kernel/smp_32.c | void __init smp_prepare_cpus(unsigned int max_cpus) {
int i, cpuid, extra;
printk("Entering SMP Mode...\n");
extra = 0;
for (i = 0; !cpu_find_by_instance(i, NULL, &cpuid); i++) {
if (cpuid >= NR_CPUS)
extra++;
}
if (extra && max_cpus > i - extra)
printk("Warning: NR_CPUS is too low to start... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/smp_32.c |
static void arch_cpu_pre_online(void *arg) {
unsigned int cpuid = hard_smp_processor_id();
register_percpu_ce(cpuid);
calibrate_delay();
smp_store_cpu_info(cpuid);
local_ops->cache_all();
local_ops->tlb_all();
switch (sparc_cpu_model) {
case sun4m:
sun4m_cpu_pre_online(arg);
break;
case s... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/smp_32.c |
void smp_info(struct seq_file *m) {
int i;
seq_printf(m, "State:\n");
for_each_online_cpu(i) seq_printf(m, "CPU%d\t\t: online\n", i);
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/smp_64.c | static void xcall_deliver(u64 data0, u64 data1, u64 data2,
const cpumask_t *mask) {
struct trap_per_cpu *tb;
int this_cpu, i, cnt;
unsigned long flags;
u16 *cpu_list;
u64 *mondo;
local_irq_save(flags);
this_cpu = smp_processor_id();
tb = &trap_block[this_cpu];
mondo = __va... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/smp_64.c |
void arch_send_call_function_ipi_mask(const struct cpumask *mask) {
xcall_deliver((u64)&xcall_call_function, 0, 0, mask);
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/smp_64.c |
static inline void __local_flush_dcache_page(struct page *page) {
#ifdef DCACHE_ALIASING_POSSIBLE
__flush_dcache_page(page_address(page), ((tlb_type == spitfire) &&
page_mapping_file(page) != NULL));
#else
if (page_mapping_file(page) != NULL && tlb_type == spitfire)
_... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/smp_64.c |
void smp_capture(void) {
int result = atomic_add_return(1, &smp_capture_depth);
if (result == 1) {
int ncpus = num_online_cpus();
#ifdef CAPTURE_DEBUG
printk("CPU[%d]: Sending penguins to jail...", smp_processor_id());
#endif
penguins_are_doing_time = 1;
atomic_inc(&smp_capture_registry);
smp... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/smp_64.c |
void smp_release(void) {
if (atomic_dec_and_test(&smp_capture_depth)) {
#ifdef CAPTURE_DEBUG
printk("CPU[%d]: Giving pardon to "
"imprisoned penguins\n",
smp_processor_id());
#endif
penguins_are_doing_time = 0;
membar_safe("#StoreLoad");
atomic_dec(&smp_capture_registry);
}
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/smp_64.c |
void __init smp_prepare_cpus(unsigned int max_cpus) {} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/smp_64.c |
void smp_prepare_boot_cpu(void) {} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/smp_64.c |
void __init smp_fill_in_cpu_possible_map(void) {
int possible_cpus = num_possible_cpus();
int i;
if (possible_cpus > nr_cpu_ids)
possible_cpus = nr_cpu_ids;
for (i = 0; i < possible_cpus; i++)
set_cpu_possible(i, true);
for (; i < NR_CPUS; i++)
set_cpu_possible(i, false);
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/smp_64.c | void cpu_play_dead(void) {
int cpu = smp_processor_id();
unsigned long pstate;
idle_task_exit();
if (tlb_type == hypervisor) {
struct trap_per_cpu *tb = &trap_block[cpu];
sun4v_cpu_qconf(HV_CPU_QUEUE_CPU_MONDO, tb->cpu_mondo_pa, 0);
sun4v_cpu_qconf(HV_CPU_QUEUE_DEVICE_MONDO, tb->dev_mondo_pa, 0);... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/smp_64.c |
void __init smp_cpus_done(unsigned int max_cpus) {} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/smp_64.c | void smp_send_reschedule(int cpu) {
if (cpu == smp_processor_id()) {
WARN_ON_ONCE(preemptible());
set_softint(1 << PIL_SMP_RECEIVE_SIGNAL);
return;
}
if (cpu_poke && idle_cpu(cpu)) {
unsigned long ret;
ret = send_cpu_poke(cpu);
if (ret == HV_EOK)
return;
}
/* Use IPI in follow... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/sstate.c |
static int __init sstate_running(void) {
do_set_sstate(HV_SOFT_STATE_NORMAL, running_msg);
return 0;
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/stacktrace.c |
static void __save_stack_trace(struct thread_info *tp,
struct stack_trace *trace, bool skip_sched) {
unsigned long ksp, fp;
#ifdef CONFIG_FUNCTION_GRAPH_TRACER
struct task_struct *t;
int graph = 0;
#endif
if (tp == current_thread_info()) {
stack_trace_flush();
__asm__ __... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/starfire.c |
void check_if_starfire(void) {
phandle ssnode = prom_finddevice("/ssp-serial");
if (ssnode != 0 && (s32)ssnode != -1)
this_is_starfire = 1;
} | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/starfire.c | unsigned int starfire_translate(unsigned long imap, unsigned int upaid) {
struct starfire_irqinfo *p;
unsigned int bus_hwmid;
unsigned int i;
bus_hwmid = (((unsigned long)imap) >> 33) & 0x7f;
for (p = sflist; p != NULL; p = p->next)
if (p->hwmid == bus_hwmid)
break;
if (p == NULL) {
prom_prin... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/sun4d_irq.c | void __init sun4d_distribute_irqs(void) {
struct device_node *dp;
int cpuid = cpu_logical_map(1);
if (cpuid == -1)
cpuid = cpu_logical_map(0);
for_each_node_by_name(dp, "sbi") {
int devid = of_getintprop_default(dp, "device-id", 0);
int board = of_getintprop_default(dp, "board#", 0);
board_to_... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/sun4d_irq.c | static void __init sun4d_fixup_trap_table(void) {
#ifdef CONFIG_SMP
unsigned long flags;
struct tt_entry *trap_table = &sparc_ttable[SP_TRAP_IRQ1 + (14 - 1)];
lvl14_save[2] += smp4d_ticker - real_irq_entry;
/* For SMP we use the level 14 ticker, however the bootup code
* has copied the firmware's level 14 ... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/sun4d_smp.c |
static inline unsigned long sun4d_swap(volatile unsigned long *ptr,
unsigned long val) {
__asm__ __volatile__("swap [%1], %0\n\t"
: "=&r"(val), "=&r"(ptr)
: "0"(val), "1"(ptr));
return val;
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/sun4d_smp.c | void sun4d_cpu_pre_online(void *arg) {
unsigned long flags;
int cpuid;
cpuid = hard_smp_processor_id();
sun4d_swap((unsigned long *)&cpu_callin_map[cpuid], 1);
local_ops->cache_all();
local_ops->tlb_all();
while ((unsigned long)current_set[cpuid] < PAGE_OFFSET)
barrier();
while (current_set[cpui... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/sun4d_smp.c | void __init smp4d_smp_done(void) {
int i, first;
int *prev;
first = 0;
prev = &first;
for_each_online_cpu(i) {
*prev = i;
prev = &cpu_data(i).next;
}
*prev = first;
local_ops->cache_all();
/* Ok, they are spinning and ready to go. */
smp_processors_ready = 1;
sun4d_distribute_irqs();
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/sun4d_smp.c | static void __init smp4d_ipi_init(void) {
int cpu;
struct sun4d_ipi_work *work;
printk(KERN_INFO "smp4d: setup IPI at IRQ %d\n", SUN4D_IPI_IRQ);
for_each_possible_cpu(cpu) {
work = &per_cpu(sun4d_ipi_work, cpu);
work->single = work->msk = work->resched = 0;
}
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/sun4d_smp.c |
static void sun4d_send_ipi(int cpu, int level) {
cc_set_igen(
IGEN_MESSAGE(0, cpu << 3, 6 + ((level >> 1) & 7), 1 << (level - 1)));
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/sun4d_smp.c | static void sun4d_ipi_single(int cpu) {
struct sun4d_ipi_work *work = &per_cpu(sun4d_ipi_work, cpu);
work->single = 1;
/* Generate IRQ on the CPU */
sun4d_send_ipi(cpu, SUN4D_IPI_IRQ);
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/sun4d_smp.c | void smp4d_cross_call_irq(void) {
void (*func)(unsigned long, unsigned long, unsigned long, unsigned long,
unsigned long) = ccall_info.func;
int i = hard_smp_processor_id();
ccall_info.processors_in[i] = 1;
func(ccall_info.arg1, ccall_info.arg2, ccall_info.arg3, ccall_info.arg4,
ccall_inf... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/sun4m_irq.c |
static unsigned int sun4m_startup_irq(struct irq_data *data) {
irq_link(data->irq);
sun4m_unmask_irq(data);
return 0;
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/sun4m_irq.c |
static void sun4m_shutdown_irq(struct irq_data *data) {
sun4m_mask_irq(data);
irq_unlink(data->irq);
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/sun4m_irq.c |
static void sun4m_clear_clock_irq(void) {
sbus_readl(&timers_global->l10_limit);
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/sun4m_irq.c | void sun4m_nmi(struct pt_regs *regs) {
unsigned long afsr, afar, si;
printk(KERN_ERR "Aieee: sun4m NMI received!\n");
/* XXX HyperSparc hack XXX */
__asm__ __volatile__("mov 0x500, %%g1\n\t"
"lda [%%g1] 0x4, %0\n\t"
"mov 0x600, %%g1\n\t"
"lda... | [
0,
1
] |
Linux Kernel | arch/sparc/kernel/sun4m_irq.c |
void sun4m_unmask_profile_irq(void) {
unsigned long flags;
local_irq_save(flags);
sbus_writel(sun4m_imask[SUN4M_PROFILE_IRQ], &sun4m_irq_global->mask_clear);
local_irq_restore(flags);
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/sun4m_smp.c |
static inline unsigned long swap_ulong(volatile unsigned long *ptr,
unsigned long val) {
__asm__ __volatile__("swap [%1], %0\n\t"
: "=&r"(val), "=&r"(ptr)
: "0"(val), "1"(ptr));
return val;
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/sun4m_smp.c | void __init smp4m_smp_done(void) {
int i, first;
int *prev;
first = 0;
prev = &first;
for_each_online_cpu(i) {
*prev = i;
prev = &cpu_data(i).next;
}
*prev = first;
local_ops->cache_all();
/* Ok, they are spinning and ready to go. */
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/sun4m_smp.c |
static void sun4m_ipi_single(int cpu) { sun4m_send_ipi(cpu, IRQ_IPI_SINGLE); } | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/sysfs.c |
static ssize_t show_mmustat_enable(struct device *s,
struct device_attribute *attr, char *buf) {
long val = work_on_cpu(s->id, read_mmustat_enable, NULL);
return sprintf(buf, "%lx\n", val);
} | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/sysfs.c |
static ssize_t store_mmustat_enable(struct device *s,
struct device_attribute *attr,
const char *buf, size_t count) {
unsigned long val;
long err;
int ret;
ret = sscanf(buf, "%lu", &val);
if (ret != 1)
return -EINVAL;
err = work_... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/sysfs.c |
static int register_cpu_online(unsigned int cpu) {
struct cpu *c = &per_cpu(cpu_devices, cpu);
struct device *s = &c->dev;
int i;
for (i = 0; i < ARRAY_SIZE(cpu_core_attrs); i++)
device_create_file(s, &cpu_core_attrs[i]);
register_mmu_stats(s);
return 0;
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/sysfs.c |
static int unregister_cpu_online(unsigned int cpu) {
#ifdef CONFIG_HOTPLUG_CPU
struct cpu *c = &per_cpu(cpu_devices, cpu);
struct device *s = &c->dev;
int i;
unregister_mmu_stats(s);
for (i = 0; i < ARRAY_SIZE(cpu_core_attrs); i++)
device_remove_file(s, &cpu_core_attrs[i]);
#endif
return 0;
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/sysfs.c |
static int __init topology_init(void) {
int cpu, ret;
check_mmu_stats();
for_each_possible_cpu(cpu) {
struct cpu *c = &per_cpu(cpu_devices, cpu);
register_cpu(c, cpu);
}
ret = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "sparc/topology:online",
register_cpu_online, unregister... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/sys_sparc32.c |
static int cp_compat_stat64(struct kstat *stat,
struct compat_stat64 __user *statbuf) {
int err;
err = put_user(huge_encode_dev(stat->dev), &statbuf->st_dev);
err |= put_user(stat->ino, &statbuf->st_ino);
err |= put_user(stat->mode, &statbuf->st_mode);
err |= put_user(stat->nlink... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/sys_sparc_32.c | int sparc_mmap_check(unsigned long addr, unsigned long len) {
if (len > TASK_SIZE - PAGE_SIZE || addr + len > TASK_SIZE - PAGE_SIZE)
return -EINVAL;
return 0;
} | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/sys_sparc_64.c | unsigned long arch_get_unmapped_area_topdown(struct file *filp,
const unsigned long addr0,
const unsigned long len,
const unsigned long pgoff,
... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/sys_sparc_64.c | unsigned long get_fb_unmapped_area(struct file *filp, unsigned long orig_addr,
unsigned long len, unsigned long pgoff,
unsigned long flags) {
unsigned long align_goal, addr = -ENOMEM;
unsigned long (*get_area)(struct file *, unsigned long, unsign... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/sys_sparc_64.c | void arch_pick_mmap_layout(struct mm_struct *mm, struct rlimit *rlim_stack) {
unsigned long random_factor = mmap_rnd();
unsigned long gap;
gap = rlim_stack->rlim_cur;
if (!test_thread_flag(TIF_32BIT) ||
(current->personality & ADDR_COMPAT_LAYOUT) || gap == RLIM_INFINITY ||
sysctl_legacy_va_layout) ... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/sys_sparc_64.c |
int sparc_mmap_check(unsigned long addr, unsigned long len) {
if (test_thread_flag(TIF_32BIT)) {
if (len >= STACK_TOP32)
return -EINVAL;
if (addr > STACK_TOP32 - len)
return -EINVAL;
} else {
if (len >= VA_EXCLUDE_START)
return -EINVAL;
if (invalid_64bit_range(addr, len))
... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/termios.c |
int kernel_termios_to_user_termios_1(struct termios __user *u,
struct ktermios *k) {
int err;
err = put_user(k->c_iflag, &u->c_iflag);
err |= put_user(k->c_oflag, &u->c_oflag);
err |= put_user(k->c_cflag, &u->c_cflag);
err |= put_user(k->c_lflag, &u->c_lflag);
err |= pu... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/time_32.c |
irqreturn_t notrace timer_interrupt(int dummy, void *dev_id) {
if (timer_cs_enabled) {
write_seqlock(&timer_cs_lock);
timer_cs_internal_counter++;
sparc_config.clear_clock_irq();
write_sequnlock(&timer_cs_lock);
} else {
sparc_config.clear_clock_irq();
}
if (timer_ce_enabled)
timer_ce.... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/time_32.c | static u64 timer_cs_read(struct clocksource *cs) {
unsigned int seq, offset;
u64 cycles;
do {
seq = read_seqbegin(&timer_cs_lock);
cycles = timer_cs_internal_counter;
offset = sparc_config.get_cycles_offset();
} while (read_seqretry(&timer_cs_lock, seq));
cycles *= sparc_config.cs_period;
cyc... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/time_32.c | static int percpu_ce_shutdown(struct clock_event_device *evt) {
int cpu = cpumask_first(evt->cpumask);
sparc_config.load_profile_irq(cpu, 0);
return 0;
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/time_32.c |
static int percpu_ce_set_next_event(unsigned long delta,
struct clock_event_device *evt) {
int cpu = cpumask_first(evt->cpumask);
unsigned int next = (unsigned int)delta;
sparc_config.load_profile_irq(cpu, next);
return 0;
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/time_32.c |
static unsigned char mostek_read_byte(struct device *dev, u32 ofs) {
struct platform_device *pdev = to_platform_device(dev);
struct m48t59_plat_data *pdata = pdev->dev.platform_data;
return readb(pdata->ioaddr + ofs);
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/time_32.c | static int clock_probe(struct platform_device *op) {
struct device_node *dp = op->dev.of_node;
const char *model = of_get_property(dp, "model", NULL);
if (!model)
return -ENODEV;
if (!of_find_property(dp, "address", NULL))
return -ENODEV;
m48t59_rtc.resource = &op->resource[0];
if (!strcmp(model,... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/time_64.c | static void tick_disable_irq(void) {
__asm__ __volatile__(" ba,pt %%xcc, 1f\n"
" nop\n"
" .align 64\n"
"1: wr %0, 0x0, %%tick_cmpr\n"
" rd %%tick_cmpr, %%g0"
:
: "r"(TICKCMP_IRQ_B... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/time_64.c | static unsigned long tick_add_tick(unsigned long adj) {
unsigned long new_tick;
__asm__ __volatile__("rd %%tick, %0\n\t"
"add %0, %1, %0\n\t"
"wrpr %0, 0, %%tick\n\t"
: "=&r"(new_tick)
: "r"(adj));
return new_tick;
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/time_64.c | static void stick_disable_irq(void) {
__asm__ __volatile__("wr %0, 0x0, %%asr25" : : "r"(TICKCMP_IRQ_BIT));
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/time_64.c | static int stick_add_compare(unsigned long adj) {
unsigned long orig_tick, new_tick;
__asm__ __volatile__("rd %%asr24, %0" : "=r"(orig_tick));
orig_tick &= ~TICKCMP_IRQ_BIT;
__asm__ __volatile__("wr %0, 0, %%asr25" : : "r"(orig_tick + adj));
__asm__ __volatile__("rd %%asr24, %0" : "=r"(new_tick));
new_ti... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/time_64.c |
static unsigned long stick_get_frequency(void) {
return prom_getintdefault(prom_root_node, "stick-frequency", 0);
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/time_64.c |
static void __hbird_write_stick(unsigned long val) {
unsigned long low = (val & 0xffffffffUL);
unsigned long high = (val >> 32UL);
unsigned long addr = HBIRD_STICK_ADDR;
__asm__ __volatile__("stxa %%g0, [%0] %4\n\t"
"add %0, 0x8, %0\n\t"
"stxa %3, [%0] %4\n\t"
... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/time_64.c |
static void mostek_write_byte(struct device *dev, u32 ofs, u8 val) {
struct platform_device *pdev = to_platform_device(dev);
void __iomem *regs = (void __iomem *)pdev->resource[0].start;
writeb(val, regs + ofs);
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/time_64.c |
unsigned long sparc64_get_clock_tick(unsigned int cpu) {
struct freq_table *ft = &per_cpu(sparc64_freq_table, cpu);
if (ft->clock_tick_ref)
return ft->clock_tick_ref;
return cpu_data(cpu).clock_tick;
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/time_64.c |
void udelay(unsigned long usecs) { __delay(tb_ticks_per_usec * usecs); } | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/time_64.c | unsigned long long sched_clock(void) {
unsigned long quotient = tick_operations.ticks_per_nsec_quotient;
unsigned long offset = tick_operations.offset;
barrier();
return ((get_tick() * quotient) >> SPARC64_NSEC_PER_CYC_SHIFT) - offset;
} | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/traps_32.c | static void instruction_dump(unsigned long *pc) {
int i;
if ((((unsigned long)pc) & 3))
return;
for (i = -3; i < 6; i++)
printk("%c%08lx%c", i ? ' ' : '<', pc[i], i ? ' ' : '>');
printk("\n");
} | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/traps_32.c | void do_fpd_trap(struct pt_regs *regs, unsigned long pc, unsigned long npc,
unsigned long psr) {
if (psr & PSR_PS)
die_if_kernel("Kernel gets FloatingPenguinUnit disabled trap", regs);
put_psr(get_psr() | PSR_EF); /* Allow FPU ops. */
regs->psr |= PSR_EF;
#ifndef CONFIG_SMP
if (last_task_... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/traps_64.c |
void spitfire_insn_access_exception(struct pt_regs *regs, unsigned long sfsr,
unsigned long sfar) {
enum ctx_state prev_state = exception_enter();
if (notify_die(DIE_TRAP, "instruction access exception", regs, 0, 0x8,
SIGTRAP) == NOTIFY_STOP)
goto out;
i... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/traps_64.c | static void spitfire_enable_estate_errors(void) {
__asm__ __volatile__("stxa %0, [%%g0] %1\n\t"
"membar #Sync"
:
: "r"(ESTATE_ERR_ALL), "i"(ASI_ESTATE_ERROR_EN));
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/traps_64.c | static void spitfire_cee_log(unsigned long afsr, unsigned long afar,
unsigned long udbh, unsigned long udbl, int tl1,
struct pt_regs *regs) {
printk(KERN_WARNING "CPU[%d]: Correctable ECC Error "
"AFSR[%lx] AFAR[%016lx] UDBL[%lx] UDBH[%l... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/traps_64.c | static void spitfire_ue_log(unsigned long afsr, unsigned long afar,
unsigned long udbh, unsigned long udbl,
unsigned long tt, int tl1, struct pt_regs *regs) {
printk(KERN_WARNING "CPU[%d]: Uncorrectable Error AFSR[%lx] "
"AFAR[%lx] UDBL[%lx... | [
1,
1
] |
Linux Kernel | arch/sparc/kernel/traps_64.c | static void __cheetah_flush_icache(void) {
unsigned int icache_size, icache_line_size;
unsigned long addr;
icache_size = local_cpu_data().icache_size;
icache_line_size = local_cpu_data().icache_line_size;
for (addr = 0; addr < icache_size; addr += icache_line_size) {
__asm__ __volatile__("stxa %%g0, [%0... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/traps_64.c |
static int cheetah_recheck_errors(struct cheetah_err_info *logp) {
unsigned long afsr, afar;
int ret = 0;
__asm__ __volatile__("ldxa [%%g0] %1, %0\n\t" : "=r"(afsr) : "i"(ASI_AFSR));
if ((afsr & cheetah_afsr_errors) != 0) {
if (logp != NULL) {
__asm__ __volatile__("ldxa [%%g0] %1, %0\n\t"
... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/traps_64.c | static int cheetah_check_main_memory(unsigned long paddr) {
unsigned long vaddr = PAGE_OFFSET + paddr;
if (vaddr > (unsigned long)high_memory)
return 0;
return kern_addr_valid(vaddr);
} | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/traps_64.c | void sun4v_resum_overflow(struct pt_regs *regs) {
atomic_inc(&sun4v_resum_oflow_cnt);
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/traps_64.c | void sun4v_nonresum_error(struct pt_regs *regs, unsigned long offset) {
struct sun4v_error_entry *ent, local_copy;
struct trap_per_cpu *tb;
unsigned long paddr;
int cpu;
cpu = get_cpu();
tb = &trap_block[cpu];
paddr = tb->nonresum_kernel_buf_pa + offset;
ent = __va(paddr);
memcpy(&local_copy, ent, ... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/traps_64.c |
static void instruction_dump(unsigned int *pc) {
int i;
if ((((unsigned long)pc) & 3))
return;
printk("Instruction DUMP:");
for (i = -3; i < 6; i++)
printk("%c%08x%c", i ? ' ' : '<', pc[i], i ? ' ' : '>');
printk("\n");
} | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/traps_64.c |
void do_fpieee_tl1(struct pt_regs *regs) {
exception_enter();
dump_tl1_traplog((struct tl1_traplog *)(regs + 1));
die_if_kernel("TL1: FPU IEEE Exception", regs);
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/traps_64.c |
void do_vaw(struct pt_regs *regs) {
exception_enter();
die_if_kernel("TL0: Virt Watchpoint Exception", regs);
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/traps_64.c | void notrace init_cur_cpu_trap(struct thread_info *t) {
int cpu = hard_smp_processor_id();
struct trap_per_cpu *p = &trap_block[cpu];
p->thread = t;
p->pgd_paddr = 0;
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/unaligned_32.c |
static inline enum direction decode_direction(unsigned int insn) {
unsigned long tmp = (insn >> 21) & 1;
if (!tmp)
return load;
else {
if (((insn >> 19) & 0x3f) == 15)
return both;
else
return store;
}
} | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/unaligned_32.c | static inline int decode_signedness(unsigned int insn) {
return (insn & 0x400000);
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/unaligned_32.c | static inline unsigned long fetch_reg(unsigned int reg, struct pt_regs *regs) {
struct reg_window32 *win;
if (reg < 16)
return (!reg ? 0 : regs->u_regs[reg]);
win = (struct reg_window32 *)regs->u_regs[UREG_FP];
return win->locals[reg - 16]; /* yes, I know what this does... */
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/unaligned_32.c |
static inline int ok_for_kernel(unsigned int insn) {
return !floating_point_load_or_store_p(insn);
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/unaligned_64.c | static inline int decode_signedness(unsigned int insn) {
return (insn & 0x400000);
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/unaligned_64.c |
static inline long sign_extend_imm13(long imm) { return imm << 51 >> 51; } | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/unaligned_64.c |
static unsigned long fetch_reg(unsigned int reg, struct pt_regs *regs) {
unsigned long value, fp;
if (reg < 16)
return (!reg ? 0 : regs->u_regs[reg]);
fp = regs->u_regs[UREG_FP];
if (regs->tstate & TSTATE_PRIV) {
struct reg_window *win;
win = (struct reg_window *)(fp + STACK_BIAS);
value = w... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/unaligned_64.c |
static unsigned long *fetch_reg_addr(unsigned int reg, struct pt_regs *regs) {
unsigned long fp;
if (reg < 16)
return ®s->u_regs[reg];
fp = regs->u_regs[UREG_FP];
if (regs->tstate & TSTATE_PRIV) {
struct reg_window *win;
win = (struct reg_window *)(fp + STACK_BIAS);
return &win->locals[re... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/unaligned_64.c | static void __used unaligned_panic(char *str, struct pt_regs *regs) {
die_if_kernel(str, regs);
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/unaligned_64.c |
static inline void advance(struct pt_regs *regs) {
regs->tpc = regs->tnpc;
regs->tnpc += 4;
if (test_thread_flag(TIF_32BIT)) {
regs->tpc &= 0xffffffff;
regs->tnpc &= 0xffffffff;
}
} | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/unaligned_64.c |
static inline int ok_for_kernel(unsigned int insn) {
return !floating_point_load_or_store_p(insn);
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/unaligned_64.c |
static void log_unaligned(struct pt_regs *regs) {
static DEFINE_RATELIMIT_STATE(ratelimit, 5 * HZ, 5);
if (__ratelimit(&ratelimit)) {
printk("Kernel unaligned access at TPC[%lx] %pS\n", regs->tpc,
(void *)regs->tpc);
}
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/uprobes.c |
static void copy_to_page(struct page *page, unsigned long vaddr,
const void *src, int len) {
void *kaddr = kmap_atomic(page);
memcpy(kaddr + (vaddr & ~PAGE_MASK), src, len);
kunmap_atomic(kaddr);
} | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/uprobes.c | static unsigned long relbranch_fixup(u32 insn, struct uprobe_task *utask,
struct pt_regs *regs) {
if (regs->tnpc == regs->tpc + 0x4UL)
return utask->autask.saved_tnpc + 0x4UL;
/* The three cases are call, branch w/prediction,
* and traditional branch.
*/
if ((insn ... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/uprobes.c | int arch_uprobe_post_xol(struct arch_uprobe *auprobe, struct pt_regs *regs) {
struct uprobe_task *utask = current->utask;
struct arch_uprobe_task *autask = &utask->autask;
u32 insn = auprobe->ixol;
int rc = 0;
if (utask->state == UTASK_SSTEP_ACK) {
regs->tnpc = relbranch_fixup(insn, utask, regs);
reg... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/uprobes.c | asmlinkage void uprobe_trap(struct pt_regs *regs, unsigned long trap_level) {
BUG_ON(trap_level != 0x173 && trap_level != 0x174);
if (!user_mode(regs)) {
local_irq_enable();
bad_trap(regs, trap_level);
return;
}
/* trap_level == 0x173 --> ta 0x73
* trap_level == 0x174 --> ta 0x74
*/
if (no... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/uprobes.c | bool arch_uprobe_xol_was_trapped(struct task_struct *t) { return false; } | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/vio.c | static void vio_device_remove(struct device *dev) {
struct vio_dev *vdev = to_vio_dev(dev);
struct vio_driver *drv = to_vio_driver(dev->driver);
if (drv->remove) {
drv->remove(vdev);
}
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/vio.c |
static ssize_t devspec_show(struct device *dev, struct device_attribute *attr,
char *buf) {
struct vio_dev *vdev = to_vio_dev(dev);
const char *str = "none";
if (!strcmp(vdev->type, "vnet-port"))
str = "vnet";
else if (!strcmp(vdev->type, "vdc-port"))
str = "vdisk";
retu... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/vio.c |
static ssize_t type_show(struct device *dev, struct device_attribute *attr,
char *buf) {
struct vio_dev *vdev = to_vio_dev(dev);
return sprintf(buf, "%s\n", vdev->type);
} | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/vio.c |
static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
char *buf) {
const struct vio_dev *vdev = to_vio_dev(dev);
return sprintf(buf, "vio:T%sS%s\n", vdev->type, vdev->compat);
} | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/vio.c |
int __vio_register_driver(struct vio_driver *viodrv, struct module *owner,
const char *mod_name) {
viodrv->driver.bus = &vio_bus_type;
viodrv->driver.name = viodrv->name;
viodrv->driver.owner = owner;
viodrv->driver.mod_name = mod_name;
return driver_register(&viodrv->driver);
} | [
0,
0
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.