Projectname large_stringclasses 15
values | Filepath large_stringlengths 4 106 ⌀ | Function large_stringlengths 11 3.45k | Label list |
|---|---|---|---|
Linux Kernel | arch/sparc/kernel/pci_msi.c |
static void free_msi(struct pci_pbm_info *pbm, int msi_num) {
msi_num -= pbm->msi_first;
clear_bit(msi_num, pbm->msi_bitmap);
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/pci_msi.c |
static void sparc64_teardown_msi_irq(unsigned int irq, struct pci_dev *pdev) {
struct pci_pbm_info *pbm = pdev->dev.archdata.host_controller;
const struct sparc64_msiq_ops *ops = pbm->msi_ops;
unsigned int msi_num;
int i, err;
for (i = 0; i < pbm->msi_num; i++) {
if (pbm->msi_irq_table[i] == irq)
... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/pci_msi.c |
static int sparc64_bringup_msi_queues(struct pci_pbm_info *pbm,
const struct sparc64_msiq_ops *ops) {
int i;
for (i = 0; i < pbm->msiq_num; i++) {
unsigned long msiqid = i + pbm->msiq_first;
unsigned long devino = i + pbm->msiq_first_devino;
int err;
err = br... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/pci_psycho.c | static void pbm_config_busmastering(struct pci_pbm_info *pbm) {
u8 *addr;
addr = psycho_pci_config_mkaddr(pbm, pbm->pci_first_busno, 0,
PCI_CACHE_LINE_SIZE);
pci_config_write8(addr, 64 / sizeof(u32));
/* Set PBM latency timer to 64 PCI clocks. */
addr =
psycho_pci_con... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/pci_psycho.c |
static int __init psycho_init(void) {
return platform_driver_register(&psycho_driver);
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/pci_sabre.c | static void sabre_scan_bus(struct pci_pbm_info *pbm, struct device *parent) {
static int once;
if (hummingbird_p)
pbm->is_66mhz_capable = 1;
else
pbm->is_66mhz_capable = 0;
/* This driver has not been verified to handle
* multiple SABREs yet, so trap this.
*
* Also note that the SABRE host br... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/pci_schizo.c | static void schizo_check_iommu_error(struct pci_pbm_info *pbm,
enum schizo_error_type type) {
schizo_check_iommu_error_pbm(pbm, type);
if (pbm->sibling)
schizo_check_iommu_error_pbm(pbm->sibling, type);
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/pci_schizo.c |
static void schizo_scan_bus(struct pci_pbm_info *pbm, struct device *parent) {
pbm_config_busmastering(pbm);
pbm->is_66mhz_capable =
(of_find_property(pbm->op->dev.of_node, "66mhz-capable", NULL) != NULL);
pbm->pci_bus = pci_scan_one_pbm(pbm, parent);
if (pbm->chip_type == PBM_CHIP_TYPE_TOMATILLO)
... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/pci_schizo.c |
static struct pci_pbm_info *schizo_find_sibling(u32 portid, int chip_type) {
struct pci_pbm_info *pbm;
for (pbm = pci_pbm_root; pbm; pbm = pbm->next) {
if (portid_compare(pbm->portid, portid, chip_type))
return pbm;
}
return NULL;
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/pci_schizo.c | static int schizo_probe(struct platform_device *op) {
const struct of_device_id *match;
match = of_match_device(schizo_match, &op->dev);
if (!match)
return -EINVAL;
return __schizo_init(op, (unsigned long)match->data);
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/pci_schizo.c |
static int __init schizo_init(void) {
return platform_driver_register(&schizo_driver);
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/pci_sun4v.c |
static inline bool iommu_use_atu(struct iommu *iommu, u64 mask) {
return iommu->atu && mask > DMA_BIT_MASK(32);
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/pci_sun4v.c |
static void dma_4v_iommu_demap(struct device *dev, unsigned long devhandle,
dma_addr_t dvma, unsigned long iotsb_num,
unsigned long entry, unsigned long npages) {
unsigned long num, flags;
unsigned long ret;
local_irq_save(flags);
do {
if (dvma... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/pci_sun4v.c | static int pci_sun4v_atu_init(struct pci_pbm_info *pbm) {
struct atu *atu = pbm->iommu->atu;
unsigned long err;
const u64 *ranges;
u64 map_size, num_iotte;
u64 dma_mask;
const u32 *page_size;
int len;
ranges = of_get_property(pbm->op->dev.of_node, "iommu-address-ranges", &len);
if (!ranges) {
pr_... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/pci_sun4v.c | static int pci_sun4v_iommu_init(struct pci_pbm_info *pbm) {
static const u32 vdma_default[] = {0x80000000, 0x80000000};
struct iommu *iommu = pbm->iommu;
unsigned long num_tsb_entries, sz;
u32 dma_mask, dma_offset;
const u32 *vdma;
vdma = of_get_property(pbm->op->dev.of_node, "virtual-dma", NULL);
if (!v... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/pci_sun4v.c |
static void pci_sun4v_msiq_free(struct pci_pbm_info *pbm) {
unsigned long q_size, alloc_size, pages, order;
int i;
for (i = 0; i < pbm->msiq_num; i++) {
unsigned long msiqid = pbm->msiq_first + i;
(void)pci_sun4v_msiq_conf(pbm->devhandle, msiqid, 0UL, 0);
}
q_size = pbm->msiq_ent_count * sizeof(st... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/pci_sun4v.c | static void pci_sun4v_msi_init(struct pci_pbm_info *pbm) {}
#endif | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/pci_sun4v.c |
static int __init pci_sun4v_init(void) {
return platform_driver_register(&pci_sun4v_driver);
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/pcr.c |
static u64 direct_picl_value(unsigned int nmi_hz) {
u32 delta = local_cpu_data().clock_tick / nmi_hz;
return ((u64)((0 - delta) & 0xffffffff)) << 32;
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/pcr.c |
static u64 n2_picl_value(unsigned int nmi_hz) {
u32 delta = local_cpu_data().clock_tick / (nmi_hz << 2);
return ((u64)((0 - delta) & 0xffffffff)) << 32;
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/pcr.c | static void n4_pic_write(unsigned long reg_num, u64 val) {
__asm__ __volatile__("stxa %0, [%1] %2"
:
: "r"(val), "r"(reg_num * 0x8UL), "i"(ASI_PIC));
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/pcr.c |
static u64 n4_picl_value(unsigned int nmi_hz) {
u32 delta = local_cpu_data().clock_tick / (nmi_hz << 2);
return ((u64)((0 - delta) & 0xffffffff));
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/pcr.c |
static u64 n5_pcr_read(unsigned long reg_num) {
unsigned long val;
(void)sun4v_t5_get_perfreg(reg_num, &val);
return val;
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/pcr.c |
static int __init setup_sun4v_pcr_ops(void) {
int ret = 0;
switch (sun4v_chip_type) {
case SUN4V_CHIP_NIAGARA1:
case SUN4V_CHIP_NIAGARA2:
case SUN4V_CHIP_NIAGARA3:
pcr_ops = &n2_pcr_ops;
break;
case SUN4V_CHIP_NIAGARA4:
pcr_ops = &n4_pcr_ops;
break;
case SUN4V_CHIP_NIAGARA5:
pcr_op... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/perf_event.c |
static u32 sparc_default_read_pmc(int idx) {
u64 val;
val = pcr_ops->read_pic(0);
if (idx == PIC_UPPER_INDEX)
val >>= 32;
return val & 0xffffffff;
} | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/perf_event.c |
static void sparc_default_write_pmc(int idx, u64 val) {
u64 shift, mask, pic;
shift = 0;
if (idx == PIC_UPPER_INDEX)
shift = 32;
mask = ((u64)0xffffffff) << shift;
val <<= shift;
pic = pcr_ops->read_pic(0);
pic &= ~mask;
pic |= val;
pcr_ops->write_pic(0, pic);
} | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/perf_event.c |
static const struct perf_event_map *niagara4_event_map(int event_id) {
return &niagara4_perfmon_event_map[event_id];
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/perf_event.c |
static u64 mask_for_index(int idx) {
return event_encoding(sparc_pmu->event_mask, idx);
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/perf_event.c |
static u64 sparc_perf_event_update(struct perf_event *event,
struct hw_perf_event *hwc, int idx) {
int shift = 64 - 32;
u64 prev_raw_count, new_raw_count;
s64 delta;
again:
prev_raw_count = local64_read(&hwc->prev_count);
new_raw_count = sparc_pmu->read_pmc(idx);
if (lo... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/perf_event.c | static void calculate_single_pcr(struct cpu_hw_events *cpuc) {
int i;
if (!cpuc->n_added)
goto out;
for (i = 0; i < cpuc->n_events; i++) {
struct perf_event *cp = cpuc->event[i];
struct hw_perf_event *hwc = &cp->hw;
int idx = hwc->idx;
u64 enc;
if (cpuc->current_idx[i] != PIC_NO_INDEX)
... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/perf_event.c |
static void sparc_pmu_stop(struct perf_event *event, int flags) {
struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
int idx = active_event_index(cpuc, event);
if (!(event->hw.state & PERF_HES_STOPPED)) {
sparc_pmu_disable_event(cpuc, &event->hw, idx);
event->hw.state |= PERF_HES_STOPPED;
}
... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/perf_event.c |
static void perf_event_grab_pmc(void) {
if (atomic_inc_not_zero(&active_events))
return;
mutex_lock(&pmc_grab_mutex);
if (atomic_read(&active_events) == 0) {
if (atomic_read(&nmi_active) > 0) {
on_each_cpu(perf_stop_nmi_watchdog, NULL, 1);
BUG_ON(atomic_read(&nmi_active) != 0);
}
ato... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/perf_event.c | static int sparc_pmu_add(struct perf_event *event, int ef_flags) {
struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events);
int n0, ret = -EAGAIN;
unsigned long flags;
local_irq_save(flags);
n0 = cpuc->n_events;
if (n0 >= sparc_pmu->max_hw_events)
goto out;
cpuc->event[n0] = event;
cpuc->events... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/perf_event.c | static void sparc_pmu_start_txn(struct pmu *pmu, unsigned int txn_flags) {
struct cpu_hw_events *cpuhw = this_cpu_ptr(&cpu_hw_events);
WARN_ON_ONCE(cpuhw->txn_flags);
cpuhw->txn_flags = txn_flags;
if (txn_flags & ~PERF_PMU_TXN_ADD)
return;
perf_pmu_disable(pmu);
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/perf_event.c | static int __kprobes perf_event_nmi_handler(struct notifier_block *self,
unsigned long cmd, void *__args) {
struct die_args *args = __args;
struct perf_sample_data data;
struct cpu_hw_events *cpuc;
struct pt_regs *regs;
u64 finish_clock;
u64 start_clock;
int i;
... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/perf_event.c |
static void perf_callchain_user_64(struct perf_callchain_entry_ctx *entry,
struct pt_regs *regs) {
unsigned long ufp;
ufp = regs->u_regs[UREG_FP] + STACK_BIAS;
do {
struct sparc_stackf __user *usf;
struct sparc_stackf sf;
unsigned long pc;
usf = (struct sparc_... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/pmc.c | static void pmc_swift_idle(void) {
#ifdef PMC_DEBUG_LED
set_auxio(0x00, AUXIO_LED);
#endif
pmc_writeb(pmc_readb(PMC_IDLE_REG) | PMC_IDLE_ON, PMC_IDLE_REG);
#ifdef PMC_DEBUG_LED
set_auxio(AUXIO_LED, 0x00);
#endif
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/pmc.c | static int pmc_probe(struct platform_device *op) {
regs = of_ioremap(&op->resource[0], 0, resource_size(&op->resource[0]),
PMC_OBPNAME);
if (!regs) {
printk(KERN_ERR "%s: unable to map registers\n", PMC_DEVNAME);
return -ENODEV;
}
#ifndef PMC_NO_IDLE
sparc_idle = pmc_swift_idle;
#e... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/process_64.c |
static void sysrq_handle_globreg(int key) { trigger_all_cpu_backtrace(); } | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/process_64.c |
static void __global_pmu_self(int this_cpu) {
struct global_pmu_snapshot *pp;
int i, num;
if (!pcr_ops)
return;
pp = &global_cpu_snapshot[this_cpu].pmu;
num = 1;
if (tlb_type == hypervisor && sun4v_chip_type >= SUN4V_CHIP_NIAGARA4)
num = 4;
for (i = 0; i < num; i++) {
pp->pcr[i] = pcr_ops... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/process_64.c |
static int __init sparc_sysrq_init(void) {
int ret = register_sysrq_key('y', &sparc_globalreg_op);
if (!ret)
ret = register_sysrq_key('x', &sparc_globalpmu_op);
return ret;
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/process_64.c | void flush_thread(void) {
struct thread_info *t = current_thread_info();
struct mm_struct *mm;
mm = t->task->mm;
if (mm)
tsb_context_switch(mm);
set_thread_wsaved(0);
t->fpsaved[0] = 0;
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/process_64.c | static inline void shift_window_buffer(int first_win, int last_win,
struct thread_info *t) {
int i;
for (i = first_win; i < last_win; i++) {
t->rwbuf_stkptrs[i] = t->rwbuf_stkptrs[i + 1];
memcpy(&t->reg_window[i], &t->reg_window[i + 1], sizeof(struct reg_window));
}... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/process_64.c |
unsigned long __get_wchan(struct task_struct *task) {
unsigned long pc, fp, bias = 0;
struct thread_info *tp;
struct reg_window *rw;
unsigned long ret = 0;
int count = 0;
tp = task_thread_info(task);
bias = STACK_BIAS;
fp = task_thread_info(task)->ksp + bias;
do {
if (!kstack_valid(tp, fp))
... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/prom_32.c |
void *__init prom_early_alloc(unsigned long size) {
void *ret;
ret = memblock_alloc(size, SMP_CACHE_BYTES);
if (!ret)
panic("%s: Failed to allocate %lu bytes\n", __func__, size);
prom_early_allocated += size;
return ret;
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/prom_32.c |
void __init of_fill_in_cpu_data(void) {} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/prom_32.c |
void __init irq_trans_init(struct device_node *dp) {} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/prom_64.c | static void __init pci_path_component(struct device_node *dp, char *tmp_buf) {
const char *name = of_get_property(dp, "name", NULL);
struct linux_prom_pci_registers *regs;
struct property *prop;
unsigned int devfn;
prop = of_find_property(dp, "reg", NULL);
if (!prop)
return;
regs = prop->value;
de... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/prom_64.c | static void __init upa_path_component(struct device_node *dp, char *tmp_buf) {
const char *name = of_get_property(dp, "name", NULL);
struct linux_prom64_registers *regs;
struct property *prop;
prop = of_find_property(dp, "reg", NULL);
if (!prop)
return;
regs = prop->value;
prop = of_find_property(d... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/prom_64.c | static void __init ebus_path_component(struct device_node *dp, char *tmp_buf) {
const char *name = of_get_property(dp, "name", NULL);
struct linux_prom64_registers *regs;
struct property *prop;
prop = of_find_property(dp, "reg", NULL);
if (!prop)
return;
regs = prop->value;
sprintf(tmp_buf, "%s@%x,... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/prom_64.c |
static void *check_cpu_node(struct device_node *dp, int cpuid, int id) {
if (id == cpuid)
return dp;
return NULL;
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/prom_common.c | int of_set_property(struct device_node *dp, const char *name, void *val,
int len) {
struct property **prevp;
unsigned long flags;
void *new_val;
int err;
new_val = kmemdup(val, len, GFP_KERNEL);
if (!new_val)
return -ENOMEM;
err = -ENODEV;
mutex_lock(&of_set_property_mutex);
... | [
0,
1
] |
Linux Kernel | arch/sparc/kernel/prom_common.c | static int __init handle_nextprop_quirks(char *buf, const char *name) {
if (!name || strlen(name) == 0)
return -1;
#ifdef CONFIG_SPARC32
strcpy(buf, name);
#endif
return 0;
} | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/prom_common.c |
void __init prom_build_devicetree(void) {
of_pdt_build_devicetree(prom_root_node, &prom_sparc_ops);
of_console_init();
pr_info("PROM: Built device tree with %u bytes of memory.\n",
prom_early_allocated);
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/prom_irqtrans.c | static unsigned int psycho_irq_build(struct device_node *dp, unsigned int ino,
void *_data) {
unsigned long controller_regs = (unsigned long)_data;
unsigned long imap, iclr;
unsigned long imap_off, iclr_off;
int inofixup = 0;
ino &= 0x3f;
if (ino < PSYCHO_ONBOARD_IRQ_BA... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/prom_irqtrans.c | static int sabre_device_needs_wsync(struct device_node *dp) {
struct device_node *parent = dp->parent;
const char *parent_model, *parent_compat;
while (parent) {
if (of_node_is_type(parent, "pci"))
break;
parent = parent->parent;
}
if (!parent)
return 0;
parent_model = of_get_property(p... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/prom_irqtrans.c |
static unsigned long schizo_iclr_offset(unsigned long ino) {
return SCHIZO_ICLR_BASE + (ino * 8UL);
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/prom_irqtrans.c | static unsigned int fire_irq_build(struct device_node *dp, unsigned int ino,
void *_data) {
struct fire_irq_data *irq_data = _data;
unsigned long pbm_regs = irq_data->pbm_regs;
unsigned long imap, iclr;
unsigned long int_ctrlr;
ino &= 0x3f;
imap = fire_ino_to_imap(pbm_re... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/prom_irqtrans.c |
static void __init sbus_irq_trans_init(struct device_node *dp) {
const struct linux_prom64_registers *regs;
dp->irq_trans = prom_early_alloc(sizeof(struct of_irq_controller));
dp->irq_trans->irq_build = sbus_of_build_irq;
regs = of_get_property(dp, "reg", NULL);
dp->irq_trans->data = (void *)(unsigned long... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/prom_irqtrans.c |
void __init irq_trans_init(struct device_node *dp) {
#ifdef CONFIG_PCI
const char *model;
int i;
#endif
#ifdef CONFIG_PCI
model = of_get_property(dp, "model", NULL);
if (!model)
model = of_get_property(dp, "compatible", NULL);
if (model) {
for (i = 0; i < ARRAY_SIZE(pci_irq_trans_table); i++) {
... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/psycho_common.c |
static void psycho_dump_iommu_tags_and_data(struct pci_pbm_info *pbm, u64 *tag,
u64 *data) {
int i;
for (i = 0; i < 16; i++) {
u64 tag_val, data_val;
const char *type_str;
tag_val = tag[i];
if (!(tag_val & PSYCHO_IOMMU_TAG_ERR))
continue;
data... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/psycho_common.c | void psycho_check_iommu_error(struct pci_pbm_info *pbm, unsigned long afsr,
unsigned long afar, enum psycho_error_type type) {
u64 control, iommu_tag[16], iommu_data[16];
struct iommu *iommu = pbm->iommu;
unsigned long flags;
spin_lock_irqsave(&iommu->lock, flags);
control = upa... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/psycho_common.c |
void psycho_pbm_init_common(struct pci_pbm_info *pbm,
struct platform_device *op, const char *chip_name,
int chip_type) {
struct device_node *dp = op->dev.of_node;
pbm->name = dp->full_name;
pbm->numa_node = NUMA_NO_NODE;
pbm->chip_type = chip_type;
pb... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/ptrace_32.c | void ptrace_disable(struct task_struct *child) {} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/ptrace_32.c |
static int genregs32_get(struct task_struct *target,
const struct user_regset *regset, struct membuf to) {
const struct pt_regs *regs = target->thread.kregs;
u32 uregs[16];
if (target == current)
flush_user_windows();
membuf_write(&to, regs->u_regs, 16 * sizeof(u32));
if (!to.l... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/ptrace_32.c |
static int fpregs32_get(struct task_struct *target,
const struct user_regset *regset, struct membuf to) {
#if 0
if (target == current)
save_and_clear_fpu();
#endif
membuf_write(&to, target->thread.float_regs, 32 * sizeof(u32));
membuf_zero(&to, sizeof(u32));
membuf_write(&to, &target-... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/ptrace_32.c |
const struct user_regset_view *task_user_regset_view(struct task_struct *task) {
return &user_sparc32_view;
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/ptrace_64.c | void flush_ptrace_access(struct vm_area_struct *vma, struct page *page,
unsigned long uaddr, void *kaddr, unsigned long len,
int write) {
BUG_ON(len > PAGE_SIZE);
if (tlb_type == hypervisor)
return;
preempt_disable();
#ifdef DCACHE_ALIASING_POSSIBLE
if (... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/ptrace_64.c |
static int regwindow64_set(struct task_struct *target,
const struct pt_regs *regs,
struct reg_window *wbuf) {
unsigned long rw_addr = regs->u_regs[UREG_I6];
if (!test_thread_64bit_stack(rw_addr)) {
struct reg_window32 win32;
int i;
for (i = 0; i <... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/ptrace_64.c |
static int fpregs64_set(struct task_struct *target,
const struct user_regset *regset, unsigned int pos,
unsigned int count, const void *kbuf,
const void __user *ubuf) {
unsigned long *fpregs = task_thread_info(target)->fpregs;
unsigned long fp... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/ptrace_64.c |
static int getregs64_get(struct task_struct *target,
const struct user_regset *regset, struct membuf to) {
const struct pt_regs *regs = task_pt_regs(target);
if (target == current)
flushw_user();
membuf_write(&to, regs->u_regs + 1, 15 * sizeof(u64));
membuf_store(&to, (u64)0);
... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/ptrace_64.c | static int setregs64_set(struct task_struct *target,
const struct user_regset *regset, unsigned int pos,
unsigned int count, const void *kbuf,
const void __user *ubuf) {
struct pt_regs *regs = task_pt_regs(target);
unsigned long y = regs->y;... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/ptrace_64.c | int regs_query_register_offset(const char *name) {
const struct pt_regs_offset *roff;
for (roff = regoffset_table; roff->name != NULL; roff++)
if (!strcmp(roff->name, name))
return roff->offset;
return -EINVAL;
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/reboot.c |
void machine_restart(char *cmd) {
char *p;
p = strchr(reboot_command, '\n');
if (p)
*p = 0;
if (cmd)
prom_reboot(cmd);
if (*reboot_command)
prom_reboot(reboot_command);
prom_reboot("");
panic("Reboot failed!");
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/sbus.c | static void __init sysio_register_error_handlers(struct platform_device *op) {
struct iommu *iommu = op->dev.archdata.iommu;
unsigned long reg_base = iommu->write_complete_reg - 0x2000UL;
unsigned int irq;
u64 control;
int portid;
portid = of_getintprop_default(op->dev.of_node, "portid", -1);
irq = sbus... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/setup_32.c |
static void prom_console_write(struct console *con, const char *s,
unsigned int n) {
prom_write(s, n);
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/setup_32.c | static void __init boot_flags_init(char *commands) {
while (*commands) {
while (*commands == ' ')
commands++;
/* Process any command switches, otherwise skip it. */
if (*commands == '\0')
break;
if (*commands == '-') {
commands++;
while (*commands && *commands != ' ')
... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/setup_32.c | static __init void leon_patch(void) {
struct leon_1insn_patch_entry *start = (void *)__leon_1insn_patch;
struct leon_1insn_patch_entry *end = (void *)__leon_1insn_patch_end;
if (sparc_cpu_model == sparc_leon)
return;
while (start < end) {
unsigned long addr = start->addr;
*(unsigned int *)(addr) ... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/setup_32.c |
void sun_do_break(void) {
if (!stop_a_enabled)
return;
printk("\n");
flush_user_windows();
prom_cmdline();
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/setup_64.c |
static void prom_console_write(struct console *con, const char *s,
unsigned int n) {
prom_write(s, n);
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/setup_64.c |
static void __init per_cpu_patch(void) {
struct cpuid_patch_entry *p;
unsigned long ver;
int is_jbus;
if (tlb_type == spitfire && !this_is_starfire)
return;
is_jbus = 0;
if (tlb_type != hypervisor) {
__asm__("rdpr %%ver, %0" : "=r"(ver));
is_jbus = ((ver >> 32UL) == __JALAPENO_ID || (ver >> 3... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/setup_64.c |
void sun4v_patch_2insn_range(struct sun4v_2insn_patch_entry *start,
struct sun4v_2insn_patch_entry *end) {
while (start < end) {
unsigned long addr = start->addr;
*(unsigned int *)(addr + 0) = start->insns[0];
wmb();
__asm__ __volatile__("flush %0" : : "r"(addr + 0));
... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/setup_64.c |
static void __init pause_patch(void) {
struct pause_patch_entry *p;
p = &__pause_3insn_patch;
while (p < &__pause_3insn_patch_end) {
unsigned long i, addr = p->addr;
for (i = 0; i < 3; i++) {
*(unsigned int *)(addr + (i * 4)) = p->insns[i];
wmb();
__asm__ __volatile__("flush %0" : : "... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/setup_64.c |
void cpucap_info(struct seq_file *m) {
unsigned long caps = sparc64_elf_hwcap;
int i, printed = 0;
seq_puts(m, "cpucaps\t\t: ");
for (i = 0; i < ARRAY_SIZE(hwcaps); i++) {
unsigned long bit = 1UL << i;
if (hwcaps[i] && (caps & bit)) {
seq_printf(m, "%s%s", printed ? "," : "", hwcaps[i]);
p... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/setup_64.c |
static void __init report_one_hwcap(int *printed, const char *name) {
if ((*printed) == 0)
printk(KERN_INFO "CPU CAPS: [");
printk(KERN_CONT "%s%s", (*printed) ? "," : "", name);
if (++(*printed) == 8) {
printk(KERN_CONT "]\n");
*printed = 0;
}
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/signal32.c | static bool invalid_frame_pointer(void __user *fp, int fplen) {
if ((((unsigned long)fp) & 15) ||
((unsigned long)fp) > 0x100000000ULL - fplen)
return true;
return false;
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/signal32.c | void do_signal32(struct pt_regs *regs) {
struct ksignal ksig;
unsigned long orig_i0 = 0;
int restart_syscall = 0;
bool has_handler = get_signal(&ksig);
if (pt_regs_is_syscall(regs) &&
(regs->tstate & (TSTATE_XCARRY | TSTATE_ICARRY))) {
restart_syscall = 1;
orig_i0 = regs->u_regs[UREG_G6];
}
... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/signal_32.c | static inline bool invalid_frame_pointer(void __user *fp, int fplen) {
if ((((unsigned long)fp) & 15) || !access_ok(fp, fplen))
return true;
return false;
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/signal_32.c |
static inline void syscall_restart(unsigned long orig_i0, struct pt_regs *regs,
struct sigaction *sa) {
switch (regs->u_regs[UREG_I0]) {
case ERESTART_RESTARTBLOCK:
case ERESTARTNOHAND:
no_system_call_restart:
regs->u_regs[UREG_I0] = EINTR;
regs->psr |= PSR_C;
bre... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/signal_32.c | static void do_signal(struct pt_regs *regs, unsigned long orig_i0) {
struct ksignal ksig;
int restart_syscall;
bool has_handler;
if (pt_regs_is_syscall(regs) && (regs->psr & PSR_C))
regs->u_regs[UREG_G6] = orig_i0;
has_handler = get_signal(&ksig);
/* If the debugger messes with the program counter, i... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/signal_32.c |
void do_notify_resume(struct pt_regs *regs, unsigned long orig_i0,
unsigned long thread_info_flags) {
if (thread_info_flags & (_TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL))
do_signal(regs, orig_i0);
if (thread_info_flags & _TIF_NOTIFY_RESUME)
resume_user_mode_work(regs);
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/signal_64.c | static bool invalid_frame_pointer(void __user *fp) {
if (((unsigned long)fp) & 15)
return true;
return false;
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/signal_64.c | static inline void __user *get_sigframe(struct ksignal *ksig,
struct pt_regs *regs,
unsigned long framesize) {
unsigned long sp = regs->u_regs[UREG_FP] + STACK_BIAS;
if (on_sig_stack(sp) && !likely(on_sig_stack(sp - framesize)))
re... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/signal_64.c |
static inline void syscall_restart(unsigned long orig_i0, struct pt_regs *regs,
struct sigaction *sa) {
switch (regs->u_regs[UREG_I0]) {
case ERESTART_RESTARTBLOCK:
case ERESTARTNOHAND:
no_system_call_restart:
regs->u_regs[UREG_I0] = EINTR;
regs->tstate |= (TSTATE_ICA... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/signal_64.c |
void do_notify_resume(struct pt_regs *regs, unsigned long orig_i0,
unsigned long thread_info_flags) {
user_exit();
if (thread_info_flags & _TIF_UPROBE)
uprobe_notify_resume(regs);
if (thread_info_flags & (_TIF_SIGPENDING | _TIF_NOTIFY_SIGNAL))
do_signal(regs, orig_i0);
if (thread_... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/sigutil_32.c |
int restore_fpu_state(struct pt_regs *regs, __siginfo_fpu_t __user *fpu) {
int err;
if (((unsigned long)fpu) & 3)
return -EFAULT;
#ifdef CONFIG_SMP
if (test_tsk_thread_flag(current, TIF_USEDFPU))
regs->psr &= ~PSR_EF;
#else
if (current == last_task_used_math) {
last_task_used_math = NULL;
reg... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/sigutil_64.c |
int save_rwin_state(int wsaved, __siginfo_rwin_t __user *rwin) {
int i, err = __put_user(wsaved, &rwin->wsaved);
for (i = 0; i < wsaved; i++) {
struct reg_window *rp = ¤t_thread_info()->reg_window[i];
unsigned long fp = current_thread_info()->rwbuf_stkptrs[i];
err |= copy_to_user(&rwin->reg_win... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/smp_32.c |
void __init smp_cpus_done(unsigned int max_cpus) {
unsigned long bogosum = 0;
int cpu, num = 0;
for_each_online_cpu(cpu) {
num++;
bogosum += cpu_data(cpu).udelay_val;
}
printk("Total of %d processors activated (%lu.%02lu BogoMIPS).\n", num,
bogosum / (500000 / HZ), (bogosum / (5000 / HZ)) ... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/smp_32.c | void smp_send_reschedule(int cpu) { sparc32_ipi_ops->resched(cpu); } | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/smp_32.c | void arch_send_call_function_ipi_mask(const struct cpumask *mask) {
int cpu;
for_each_cpu(cpu, mask) sparc32_ipi_ops->mask_one(cpu);
} | [
0,
0
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.