Projectname large_stringclasses 15
values | Filepath large_stringlengths 4 106 ⌀ | Function large_stringlengths 11 3.45k | Label list |
|---|---|---|---|
Linux Kernel | arch/sparc/include/asm/syscall.h | static inline int syscall_get_arch(struct task_struct *task) {
#if defined(CONFIG_SPARC64) && defined(CONFIG_COMPAT)
return test_tsk_thread_flag(task, TIF_32BIT) ? AUDIT_ARCH_SPARC
: AUDIT_ARCH_SPARC64;
#elif defined(CONFIG_SPARC64)
return AUDIT_ARCH_SPARC64;
#else
r... | [
0,
0
] |
Linux Kernel | arch/sparc/include/asm/timer_64.h | static inline unsigned long get_tick(void) {
unsigned long tick, tmp1, tmp2;
__asm__ __volatile__(
"661:\n"
" mov 0x1fe, %1\n"
" sllx %1, 0x20, %1\n"
" sethi %%hi(0xf000), %2\n"
" or %2, 0x70, %2\n"
" or %1, %2, %1\n" /* %1 = HBIRD_STICK_ADDR */
" add %1, 8, %2\n"
"... | [
0,
0
] |
Linux Kernel | arch/sparc/include/asm/tlbflush_32.h | static inline void flush_tlb_kernel_range(unsigned long start,
unsigned long end) {
flush_tlb_all();
} | [
0,
1
] |
Linux Kernel | arch/sparc/include/asm/tlbflush_64.h | static inline void flush_tlb_mm(struct mm_struct *mm) {} | [
0,
0
] |
Linux Kernel | arch/sparc/include/asm/tlbflush_64.h |
static inline void flush_tlb_range(struct vm_area_struct *vma,
unsigned long start, unsigned long end) {} | [
0,
0
] |
Linux Kernel | arch/sparc/include/asm/topology_64.h | static inline const struct cpumask *cpu_coregroup_mask(int cpu) {
return &cpu_core_sib_cache_map[cpu];
} | [
0,
0
] |
Linux Kernel | arch/sparc/include/asm/turbosparc.h | static inline void turbosparc_inv_insn_tag(unsigned long addr) {
__asm__ __volatile__("sta %%g0, [%0] %1\n\t"
:
: "r"(addr), "i"(ASI_M_TXTC_TAG)
: "memory");
} | [
0,
0
] |
Linux Kernel | arch/sparc/include/asm/uaccess_32.h |
static inline unsigned long __clear_user(void __user *addr,
unsigned long size) {
unsigned long ret;
__asm__ __volatile__("mov %2, %%o1\n"
"call __bzero\n\t"
" mov %1, %%o0\n\t"
"mov %%o0, %0\n"
... | [
0,
0
] |
Linux Kernel | arch/sparc/include/asm/upa.h | static inline unsigned short _upa_readw(unsigned long addr) {
unsigned short ret;
__asm__ __volatile__("lduha\t[%1] %2, %0\t"
: "=r"(ret)
: "r"(addr), "i"(ASI_PHYS_BYPASS_EC_E));
return ret;
} | [
0,
0
] |
Linux Kernel | arch/sparc/include/asm/upa.h | static inline unsigned int _upa_readl(unsigned long addr) {
unsigned int ret;
__asm__ __volatile__("lduwa\t[%1] %2, %0\t"
: "=r"(ret)
: "r"(addr), "i"(ASI_PHYS_BYPASS_EC_E));
return ret;
} | [
0,
0
] |
Linux Kernel | arch/sparc/include/asm/vga.h |
static inline u16 scr_readw(const u16 *addr) {
BUG_ON((long)addr >= 0);
return *addr;
} | [
0,
0
] |
Linux Kernel | arch/sparc/include/asm/vga.h |
static inline void scr_memcpyw(u16 *d, u16 *s, unsigned int n) {
BUG_ON((long)d >= 0);
memcpy(d, s, n);
} | [
1,
0
] |
Linux Kernel | arch/sparc/include/asm/vio.h |
static inline void *vio_dring_cur(struct vio_dring_state *dr) {
return dr->base + (dr->entry_size * dr->prod);
} | [
0,
0
] |
Linux Kernel | arch/sparc/include/asm/vio.h |
static inline u32 vio_dring_avail(struct vio_dring_state *dr,
unsigned int ring_size) {
return (dr->pending - ((dr->prod - dr->cons) & (ring_size - 1)) - 1);
} | [
0,
0
] |
Linux Kernel | arch/sparc/include/asm/vio.h |
static inline bool vio_version_after_eq(struct vio_driver_state *vio, u16 major,
u16 minor) {
u32 have = (u32)vio->ver.major << 16 | vio->ver.minor;
u32 want = (u32)major << 16 | minor;
return have >= want;
}
#define viodbg(TYPE, f, a...) ... | [
1,
0
] |
Linux Kernel | arch/sparc/include/asm/vio.h |
static inline struct vio_driver *to_vio_driver(struct device_driver *drv) {
return container_of(drv, struct vio_driver, driver);
} | [
0,
0
] |
Linux Kernel | arch/sparc/include/asm/vio.h |
static inline struct vio_dev *to_vio_dev(struct device *dev) {
return container_of(dev, struct vio_dev, dev);
} | [
0,
0
] |
Linux Kernel | arch/sparc/include/uapi/asm/psrcompat.h |
static inline unsigned int tstate_to_psr(unsigned long tstate) {
return ((tstate & TSTATE_CWP) | PSR_S | ((tstate & TSTATE_ICC) >> 12) |
((tstate & TSTATE_XCC) >> 20) |
((tstate & TSTATE_SYSCALL) ? PSR_SYSCALL : 0) | PSR_V8PLUS);
} | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/adi_64.c | void adi_restore_tags(struct mm_struct *mm, struct vm_area_struct *vma,
unsigned long addr, pte_t pte) {
unsigned char *tag;
tag_storage_desc_t *tag_desc;
unsigned long paddr, tmp, version1, version2;
tag_desc = find_tag_store(mm, vma, addr);
if (tag_desc == NULL)
return;
tag = t... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/adi_64.c | int adi_save_tags(struct mm_struct *mm, struct vm_area_struct *vma,
unsigned long addr, pte_t oldpte) {
unsigned char *tag;
tag_storage_desc_t *tag_desc;
unsigned long version1, version2, paddr, tmp;
tag_desc = alloc_tag_store(mm, vma, addr);
if (tag_desc == NULL)
return -1;
tag = ta... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/apc.c | static int __init apc_setup(char *str) {
if (!strncmp(str, "noidle", strlen("noidle"))) {
apc_no_idle = 1;
return 1;
}
return 0;
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/apc.c | static void apc_swift_idle(void) {
#ifdef APC_DEBUG_LED
set_auxio(0x00, AUXIO_LED);
#endif
apc_writeb(apc_readb(APC_IDLE_REG) | APC_IDLE_ON, APC_IDLE_REG);
#ifdef APC_DEBUG_LED
set_auxio(AUXIO_LED, 0x00);
#endif
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/asm-offsets.c | int sparc32_foo(void) {
DEFINE(AOFF_thread_fork_kpsr, offsetof(struct thread_struct, fork_kpsr));
return 0;
}
#else | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/asm-offsets.c | int sparc64_foo(void) {
#ifdef CONFIG_HIBERNATION
BLANK();
OFFSET(SC_REG_FP, saved_context, fp);
OFFSET(SC_REG_CWP, saved_context, cwp);
OFFSET(SC_REG_WSTATE, saved_context, wstate);
OFFSET(SC_REG_TICK, saved_context, tick);
OFFSET(SC_REG_PSTATE, saved_context, pstate);
OFFSET(SC_REG_G4, saved_context, ... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/auxio_32.c | void __init auxio_probe(void) {
phandle node, auxio_nd;
struct linux_prom_registers auxregs[1];
struct resource r;
switch (sparc_cpu_model) {
case sparc_leon:
case sun4d:
return;
default:
break;
}
node = prom_getchild(prom_root_node);
auxio_nd = prom_searchsiblings(node, "auxiliary-io");
... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/auxio_64.c |
static void __auxio_rmw(u8 bits_on, u8 bits_off, int ebus) {
if (auxio_register) {
unsigned long flags;
u8 regval, newval;
spin_lock_irqsave(&auxio_lock, flags);
regval = (ebus ? (u8)readl(auxio_register) : sbus_readb(auxio_register));
newval = regval | bits_on;
newval &= ~bits_off;
if ... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/auxio_64.c |
static int auxio_probe(struct platform_device *dev) {
struct device_node *dp = dev->dev.of_node;
unsigned long size;
if (of_node_name_eq(dp->parent, "ebus")) {
auxio_devtype = AUXIO_TYPE_EBUS;
size = sizeof(u32);
} else if (of_node_name_eq(dp->parent, "sbus")) {
auxio_devtype = AUXIO_TYPE_SBUS;
... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/btext.c | static int __init btext_initialize(phandle node) {
unsigned int width, height, depth, pitch;
unsigned long address = 0;
u32 prop;
if (prom_getproperty(node, "width", (char *)&width, 4) < 0)
return -EINVAL;
if (prom_getproperty(node, "height", (char *)&height, 4) < 0)
return -EINVAL;
if (prom_getpro... | [
1,
1
] |
Linux Kernel | arch/sparc/kernel/btext.c | static void btext_drawchar(char c) {
int cline = 0;
#ifdef NO_SCROLL
int x;
#endif
switch (c) {
case '\b':
if (g_loc_X > 0)
--g_loc_X;
break;
case '\t':
g_loc_X = (g_loc_X & -8) + 8;
break;
case '\r':
g_loc_X = 0;
break;
case '\n':
g_loc_X = 0;
g_loc_Y++;
cline = ... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/btext.c |
static void draw_byte_8(unsigned char *font, unsigned int *base, int rb) {
int l, bits;
int fg = 0x0F0F0F0FUL;
int bg = 0x00000000UL;
unsigned int *eb = (int *)expand_bits_8;
for (l = 0; l < 16; ++l) {
bits = *font++;
base[0] = (eb[bits >> 4] & fg) ^ bg;
base[1] = (eb[bits & 0xf] & fg) ^ bg;
... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/btext.c |
int __init btext_find_display(void) {
phandle node;
char type[32];
int ret;
node = prom_inst2pkg(prom_stdout);
if (prom_getproperty(node, "device_type", type, 32) < 0)
return -ENODEV;
if (strcmp(type, "display"))
return -ENODEV;
ret = btext_initialize(node);
if (!ret) {
btext_clearscreen(... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/chmc.c | static int syndrome_to_qword_code(int syndrome_code) {
if (syndrome_code < 128)
syndrome_code += 16;
else if (syndrome_code < 128 + 9)
syndrome_code -= (128 - 7);
else if (syndrome_code < (128 + 9 + 3))
syndrome_code -= (128 + 9 - 4);
else
syndrome_code -= (128 + 9 + 3);
return syndrome_code;
... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/chmc.c |
static struct jbusmc_dimm_group *
jbusmc_find_dimm_group(unsigned long phys_addr) {
struct jbusmc *p;
list_for_each_entry(p, &mctrl_list, list) {
int i;
for (i = 0; i < p->num_dimm_groups; i++) {
struct jbusmc_dimm_group *dp = &p->dimm_groups[i];
if (phys_addr < dp->base_addr || (dp->base_ad... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/chmc.c | static int jbusmc_print_dimm(int syndrome_code, unsigned long phys_addr,
char *buf, int buflen) {
struct jbusmc_obp_mem_layout *prop;
struct jbusmc_dimm_group *dp;
struct jbusmc *p;
int first_dimm;
dp = jbusmc_find_dimm_group(phys_addr);
if (dp == NULL || syndrome_code < SYNDRO... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/chmc.c |
static void
jbusmc_construct_one_dimm_group(struct jbusmc *p, unsigned long index,
const struct linux_prom64_registers *mem_regs,
int num_mem_regs) {
struct jbusmc_dimm_group *dp = &p->dimm_groups[index];
dp->controller = p;
dp->index = index;
d... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/chmc.c |
static void chmc_fetch_decode_regs(struct chmc *p) {
if (p->layout_size == 0)
return;
chmc_interpret_one_decode_reg(p, 0, chmc_read_mcreg(p, CHMCTRL_DECODE1));
chmc_interpret_one_decode_reg(p, 1, chmc_read_mcreg(p, CHMCTRL_DECODE2));
chmc_interpret_one_decode_reg(p, 2, chmc_read_mcreg(p, CHMCTRL_DECODE3))... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/cpu.c |
static void __init set_cpu_and_fpu(int psr_impl, int psr_vers, int fpu_vers) {
const struct manufacturer_info *manuf;
int i;
sparc_cpu_type = NULL;
sparc_fpu_type = NULL;
sparc_pmu_type = NULL;
manuf = NULL;
for (i = 0; i < ARRAY_SIZE(manufacturer_info); i++) {
if (psr_impl == manufacturer_info[i]... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/cpu.c | static int __init cpu_type_probe(void) {
int psr_impl, psr_vers, fpu_vers;
int psr;
psr_impl = ((get_psr() >> PSR_IMPL_SHIFT) & PSR_IMPL_SHIFTED_MASK);
psr_vers = ((get_psr() >> PSR_VERS_SHIFT) & PSR_VERS_SHIFTED_MASK);
psr = get_psr();
put_psr(psr | PSR_EF);
if (psr_impl == PSR_IMPL_LEON)
fpu_vers... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/cpumap.c | static int enumerate_cpuinfo_nodes(struct cpuinfo_level *tree_level) {
int prev_id[CPUINFO_LVL_MAX];
int i, n, num_nodes;
for (i = CPUINFO_LVL_ROOT; i < CPUINFO_LVL_MAX; i++) {
struct cpuinfo_level *lv = &tree_level[i];
prev_id[i] = -1;
lv->start_index = lv->end_index = lv->num_nodes = 0;
}
num... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/cpumap.c | static int simple_map_to_cpu(unsigned int index) {
int i, end, cpu_rover;
cpu_rover = 0;
end = index % num_online_cpus();
for (i = 0; i < num_possible_cpus(); i++) {
if (cpu_online(cpu_rover)) {
if (cpu_rover >= end)
return cpu_rover;
cpu_rover++;
}
}
return cpumask_first(cpu_... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/cpumap.c |
void cpu_map_rebuild(void) {
unsigned long flag;
spin_lock_irqsave(&cpu_map_lock, flag);
_cpu_map_rebuild();
spin_unlock_irqrestore(&cpu_map_lock, flag);
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/devices.c |
int cpu_find_by_instance(int instance, phandle *prom_node, int *mid) {
return __cpu_find_by(cpu_instance_compare, (void *)instance, prom_node, mid);
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/devices.c | void __init device_scan(void) {
printk(KERN_NOTICE "Booting Linux...\n");
#ifndef CONFIG_SMP
{
phandle cpu_node;
int err;
err = cpu_find_by_instance(0, &cpu_node, NULL);
if (err) {
prom_printf("No cpu nodes, cannot continue\n");
prom_halt();
}
cpu_data(0).clock_tick = prom_geti... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/ds.c |
static struct ds_cap_state *find_cap_by_string(struct ds_info *dp,
const char *name) {
int i;
for (i = 0; i < dp->num_ds_states; i++) {
if (strcmp(dp->ds_states[i].service_id, name))
continue;
return &dp->ds_states[i];
}
return NULL;
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/ds.c |
static void dr_cpu_send_error(struct ds_info *dp, struct ds_cap_state *cp,
struct ds_data *data) {
unsigned long flags;
spin_lock_irqsave(&ds_lock, flags);
__dr_cpu_send_error(dp, cp, data);
spin_unlock_irqrestore(&ds_lock, flags);
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/ds.c |
static void dr_cpu_mark(struct ds_data *resp, int cpu, int ncpus, u32 res,
u32 stat) {
struct dr_cpu_resp_entry *ent;
struct dr_cpu_tag *tag;
int i;
tag = (struct dr_cpu_tag *)(resp + 1);
ent = (struct dr_cpu_resp_entry *)(tag + 1);
for (i = 0; i < ncpus; i++) {
if (ent[i].cpu... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/ds.c | void ldom_reboot(const char *boot_command) {
if (boot_command && strlen(boot_command)) {
unsigned long len;
snprintf(full_boot_str, sizeof(full_boot_str), "boot %s", boot_command);
len = strlen(full_boot_str);
if (reboot_data_supported) {
unsigned long ra = kimage_addr_to_ra(full_boot_str);
... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/ds.c |
static void process_ds_work(void) {
struct ds_queue_entry *qp, *tmp;
unsigned long flags;
LIST_HEAD(todo);
spin_lock_irqsave(&ds_lock, flags);
list_splice_init(&ds_work_list, &todo);
spin_unlock_irqrestore(&ds_lock, flags);
list_for_each_entry_safe(qp, tmp, &todo, list) {
struct ds_data *dpkt = (st... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/ebus.c |
static irqreturn_t ebus_dma_irq(int irq, void *dev_id) {
struct ebus_dma_info *p = dev_id;
unsigned long flags;
u32 csr = 0;
spin_lock_irqsave(&p->lock, flags);
csr = readl(p->regs + EBDMA_CSR);
writel(csr, p->regs + EBDMA_CSR);
spin_unlock_irqrestore(&p->lock, flags);
if (csr & EBDMA_CSR_ERR_PEND) {... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/hvapi.c |
void sun4v_hvapi_unregister(unsigned long group) {
struct api_info *p;
unsigned long flags;
spin_lock_irqsave(&hvapi_lock, flags);
p = __get_info(group);
if (p)
__put_ref(p);
spin_unlock_irqrestore(&hvapi_lock, flags);
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/hvapi.c |
void __init sun4v_hvapi_init(void) {
unsigned long group, major, minor;
group = HV_GRP_SUN4V;
major = 1;
minor = 0;
if (sun4v_hvapi_register(group, major, &minor))
goto bad;
group = HV_GRP_CORE;
major = 1;
minor = 6;
if (sun4v_hvapi_register(group, major, &minor))
goto bad;
return;
bad:... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/idprom.c |
static void __init display_system_type(unsigned char machtype) {
char sysname[128];
register int i;
for (i = 0; i < ARRAY_SIZE(Sun_Machines); i++) {
if (Sun_Machines[i].id_machtype == machtype) {
if (machtype != (SM_SUN4M_OBP | 0x00) ||
prom_getproperty(prom_root_node, "banner-name", sysname... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/idprom.c | static void __init display_system_type(unsigned char machtype) {}
#endif | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/idprom.c | static unsigned char __init calc_idprom_cksum(struct idprom *idprom) {
unsigned char cksum, i, *ptr = (unsigned char *)idprom;
for (i = cksum = 0; i <= 0x0E; i++)
cksum ^= *ptr++;
return cksum;
} | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/iommu-common.c |
static inline void clear_flush(struct iommu_map_table *iommu) {
iommu->flags &= ~IOMMU_NEED_FLUSH;
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/iommu-common.c |
static void setup_iommu_pool_hash(void) {
unsigned int i;
static bool do_once;
if (do_once)
return;
do_once = true;
for_each_possible_cpu(i) per_cpu(iommu_hash_common, i) =
hash_32(i, IOMMU_POOL_HASHBITS);
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/iommu-common.c | static struct iommu_pool *get_pool(struct iommu_map_table *tbl,
unsigned long entry) {
struct iommu_pool *p;
unsigned long largepool_start = tbl->large_pool.start;
bool large_pool = ((tbl->flags & IOMMU_HAS_LARGE_POOL) != 0);
if (large_pool && entry >= largepool_start) {
... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/iommu-common.c | void iommu_tbl_range_free(struct iommu_map_table *iommu, u64 dma_addr,
unsigned long npages, unsigned long entry) {
struct iommu_pool *pool;
unsigned long flags;
unsigned long shift = iommu->table_shift;
if (entry == IOMMU_ERROR_CODE)
entry = (dma_addr - iommu->table_map_base) >> ... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/iommu.c |
static inline void iommu_free_ctx(struct iommu *iommu, int ctx) {
if (likely(ctx)) {
__clear_bit(ctx, iommu->ctx_bitmap);
if (ctx < iommu->ctx_lowest_free)
iommu->ctx_lowest_free = ctx;
}
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/iommu.c |
static void *dma_4u_alloc_coherent(struct device *dev, size_t size,
dma_addr_t *dma_addrp, gfp_t gfp,
unsigned long attrs) {
unsigned long order, first_page;
struct iommu *iommu;
struct page *page;
int npages, nid;
iopte_t *iopte;
void *... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/iommu.c |
static void dma_4u_free_coherent(struct device *dev, size_t size, void *cpu,
dma_addr_t dvma, unsigned long attrs) {
struct iommu *iommu;
unsigned long order, npages;
npages = IO_PAGE_ALIGN(size) >> IO_PAGE_SHIFT;
iommu = dev->archdata.iommu;
iommu_tbl_range_free(&iommu->tb... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/ioport.c |
void of_iounmap(struct resource *res, void __iomem *base, unsigned long size) {
iounmap(base);
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/ioport.c |
unsigned long sparc_dma_alloc_resource(struct device *dev, size_t len) {
struct resource *res;
res = kzalloc(sizeof(*res), GFP_KERNEL);
if (!res)
return 0;
res->name = dev->of_node->full_name;
if (allocate_resource(&_sparc_dvma, res, len, _sparc_dvma.start,
_sparc_dvma.end, PAGE... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/ioport.c | static int sparc_io_proc_show(struct seq_file *m, void *v) {
struct resource *root = m->private, *r;
const char *nm;
for (r = root->child; r != NULL; r = r->sibling) {
if ((nm = r->name) == NULL)
nm = "???";
seq_printf(m, "%016llx-%016llx: %s\n", (unsigned long long)r->start,
(unsign... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/irq_32.c |
void arch_local_irq_restore(unsigned long old_psr) {
unsigned long tmp;
__asm__ __volatile__("rd %%psr, %0\n\t"
"and %2, %1, %2\n\t"
"andn %0, %1, %0\n\t"
"wr %0, %2, %%psr\n\t"
"nop; nop; nop\n"
: "... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/irq_32.c |
void irq_unlink(unsigned int irq) {
struct irq_bucket *p, **pnext;
unsigned long flags;
BUG_ON(irq >= NR_IRQS);
spin_lock_irqsave(&irq_map_lock, flags);
p = &irq_table[irq];
BUG_ON(p->pil >= SUN4D_MAX_IRQ);
pnext = &irq_map[p->pil];
while (*pnext != p)
pnext = &(*pnext)->next;
*pnext = p->next... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/irq_32.c |
void handler_irq(unsigned int pil, struct pt_regs *regs) {
struct pt_regs *old_regs;
struct irq_bucket *p;
BUG_ON(pil > 15);
old_regs = set_irq_regs(regs);
irq_enter();
p = irq_map[pil];
while (p) {
struct irq_bucket *next = p->next;
generic_handle_irq(p->irq);
p = next;
}
irq_exit();
... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/irq_32.c | void __init init_IRQ(void) {
switch (sparc_cpu_model) {
case sun4m:
pcic_probe();
if (pcic_present())
sun4m_pci_init_IRQ();
else
sun4m_init_IRQ();
break;
case sun4d:
sun4d_init_IRQ();
break;
case sparc_leon:
leon_init_IRQ();
break;
default:
prom_printf("Canno... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/irq_64.c | static unsigned long bucket_get_chain_pa(unsigned long bucket_pa) {
unsigned long ret;
__asm__ __volatile__(
"ldxa [%1] %2, %0"
: "=&r"(ret)
: "r"(bucket_pa + offsetof(struct ino_bucket, __irq_chain_pa)),
"i"(ASI_PHYS_USE_EC));
return ret;
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/irq_64.c | int __init arch_probe_nr_irqs(void) { return 1; } | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/irq_64.c |
static inline unsigned int irq_data_to_ino(struct irq_data *data) {
struct irq_handler_data *ihd = irq_data_get_irq_handler_data(data);
return ihd->dev_ino;
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/irq_64.c |
unsigned int irq_alloc(unsigned int dev_handle, unsigned int dev_ino) {
int irq;
irq = __irq_alloc_descs(-1, 1, 1, numa_node_id(), NULL, NULL);
if (irq <= 0)
goto out;
return irq;
out:
return 0;
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/irq_64.c |
static unsigned int sun4u_compute_tid(unsigned long imap, unsigned long cpuid) {
unsigned int tid;
if (this_is_starfire) {
tid = starfire_translate(imap, cpuid);
tid <<= IMAP_TID_SHIFT;
tid &= IMAP_TID_UPA;
} else {
if (tlb_type == cheetah || tlb_type == cheetah_plus) {
unsigned long ver;
... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/irq_64.c | static int irq_choose_cpu(unsigned int irq, const struct cpumask *affinity) {
cpumask_t mask;
int cpuid;
cpumask_copy(&mask, affinity);
if (cpumask_equal(&mask, cpu_online_mask)) {
cpuid = map_to_cpu(irq);
} else {
cpumask_t tmp;
cpumask_and(&tmp, cpu_online_mask, &mask);
cpuid = cpumask_emp... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/irq_64.c |
static void sun4v_irq_enable(struct irq_data *data) {
unsigned long cpuid =
irq_choose_cpu(data->irq, irq_data_get_affinity_mask(data));
unsigned int ino = irq_data_to_sysino(data);
int err;
err = sun4v_intr_settarget(ino, cpuid);
if (err != HV_EOK)
printk(KERN_ERR "sun4v_intr_settarget(%x,%lu): "... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/irq_64.c |
static void sun4v_irq_eoi(struct irq_data *data) {
unsigned int ino = irq_data_to_sysino(data);
int err;
err = sun4v_intr_setstate(ino, HV_INTR_STATE_IDLE);
if (err != HV_EOK)
printk(KERN_ERR "sun4v_intr_setstate(%x): "
"err(%d)\n",
ino, err);
} | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/irq_64.c |
static unsigned int cookie_build_irq(u32 devhandle, unsigned int devino,
struct irq_chip *chip) {
unsigned long hv_error;
unsigned int irq;
irq = sun4v_build_common(devhandle, devino, cookie_handler_data, chip);
hv_error = cookie_assign(irq, devhandle, devino);
if (hv_e... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/irq_64.c |
unsigned int sun4v_build_irq(u32 devhandle, unsigned int devino) {
unsigned int irq;
if (sun4v_cookie_only_virqs())
irq = sun4v_build_cookie(devhandle, devino);
else
irq = sun4v_build_sysino(devhandle, devino);
return irq;
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/irq_64.c | static void map_prom_timers(void) {
struct device_node *dp;
const unsigned int *addr;
dp = of_find_node_by_path("/");
dp = dp->child;
while (dp) {
if (of_node_name_eq(dp, "counter-timer"))
break;
dp = dp->sibling;
}
/* Assume if node is not present, PROM uses different tick mechanism
* ... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/irq_64.c | static void __init sun4v_init_mondo_queues(void) {
int cpu;
for_each_possible_cpu(cpu) {
struct trap_per_cpu *tb = &trap_block[cpu];
alloc_one_queue(&tb->cpu_mondo_pa, tb->cpu_mondo_qmask);
alloc_one_queue(&tb->dev_mondo_pa, tb->dev_mondo_qmask);
alloc_one_queue(&tb->resum_mondo_pa, tb->resum_qmas... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/irq_64.c | static void __init irq_ivector_init(void) {
unsigned long size, order;
unsigned int ivecs;
if (sun4v_cookie_only_virqs())
return;
ivecs = size_nr_ivec();
size = sizeof(struct ino_bucket) * ivecs;
order = get_order(size);
ivector_table =
(struct ino_bucket *)__get_free_pages(GFP_KERNEL | __GFP_... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/irq_64.c | void __init init_IRQ(void) {
irq_init_hv();
irq_ivector_init();
map_prom_timers();
kill_prom_timer();
if (tlb_type == hypervisor)
sun4v_init_mondo_queues();
init_send_mondo_info();
if (tlb_type == hypervisor) {
sun4v_register_mondo_queues(hard_smp_processor_id());
}
/* We need to clear an... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/jump_label.c | void arch_jump_label_transform(struct jump_entry *entry,
enum jump_label_type type) {
u32 *insn = (u32 *)(unsigned long)entry->code;
u32 val;
if (type == JUMP_LABEL_JMP) {
s32 off = (s32)entry->target - (s32)entry->code;
bool use_v9_branch = false;
BUG_ON(off & 3);
#i... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/kgdb_32.c | void gdb_regs_to_pt_regs(unsigned long *gdb_regs, struct pt_regs *regs) {
struct reg_window32 *win;
int i;
for (i = 0; i < 15; i++)
regs->u_regs[UREG_G1 + i] = gdb_regs[GDB_G1 + i];
if (regs->psr != gdb_regs[GDB_PSR]) {
unsigned long cwp = regs->psr & PSR_CWP;
regs->psr = (gdb_regs[GDB_PSR] & ~PS... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/kgdb_32.c | int kgdb_arch_handle_exception(int e_vector, int signo, int err_code,
char *remcomInBuffer, char *remcomOutBuffer,
struct pt_regs *linux_regs) {
unsigned long addr;
char *ptr;
switch (remcomInBuffer[0]) {
case 'c':
ptr = &remcomInBuffer[1];
... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/kgdb_64.c | void __irq_entry smp_kgdb_capture_client(int irq, struct pt_regs *regs) {
unsigned long flags;
__asm__ __volatile__("rdpr %%pstate, %0\n\t"
"wrpr %0, %1, %%pstate"
: "=r"(flags)
: "i"(PSTATE_IE));
flushw_all();
if (atomic_read(&kg... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/kprobes.c |
int __kprobes arch_prepare_kprobe(struct kprobe *p) {
if ((unsigned long)p->addr & 0x3UL)
return -EILSEQ;
p->ainsn.insn[0] = *p->addr;
flushi(&p->ainsn.insn[0]);
p->ainsn.insn[1] = BREAKPOINT_INSTRUCTION_2;
flushi(&p->ainsn.insn[1]);
p->opcode = *p->addr;
return 0;
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/kprobes.c |
static void __kprobes save_previous_kprobe(struct kprobe_ctlblk *kcb) {
kcb->prev_kprobe.kp = kprobe_running();
kcb->prev_kprobe.status = kcb->kprobe_status;
kcb->prev_kprobe.orig_tnpc = kcb->kprobe_orig_tnpc;
kcb->prev_kprobe.orig_tstate_pil = kcb->kprobe_orig_tstate_pil;
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/kprobes.c |
static void __kprobes restore_previous_kprobe(struct kprobe_ctlblk *kcb) {
__this_cpu_write(current_kprobe, kcb->prev_kprobe.kp);
kcb->kprobe_status = kcb->prev_kprobe.status;
kcb->kprobe_orig_tnpc = kcb->prev_kprobe.orig_tnpc;
kcb->kprobe_orig_tstate_pil = kcb->prev_kprobe.orig_tstate_pil;
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/kprobes.c | static void __kprobes prepare_singlestep(struct kprobe *p, struct pt_regs *regs,
struct kprobe_ctlblk *kcb) {
regs->tstate |= TSTATE_PIL;
if (p->opcode == BREAKPOINT_INSTRUCTION) {
regs->tpc = (unsigned long)p->addr;
regs->tnpc = kcb->kprobe_orig_tnpc;
} else {
... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/kprobes.c | static unsigned long __kprobes relbranch_fixup(u32 insn, struct kprobe *p,
struct pt_regs *regs) {
unsigned long real_pc = (unsigned long)p->addr;
if (regs->tnpc == regs->tpc + 0x4UL)
return real_pc + 0x8UL;
/* The three cases are call, branch w/prediction,
... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/kprobes.c | int __kprobes kprobe_exceptions_notify(struct notifier_block *self,
unsigned long val, void *data) {
struct die_args *args = (struct die_args *)data;
int ret = NOTIFY_DONE;
if (args->regs && user_mode(args->regs))
return ret;
switch (val) {
case DIE_DEBUG:
if (... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/kprobes.c | static int __kprobes trampoline_probe_handler(struct kprobe *p,
struct pt_regs *regs) {
unsigned long orig_ret_address = 0;
orig_ret_address = __kretprobe_trampoline_handler(regs, NULL);
regs->tpc = orig_ret_address;
regs->tnpc = orig_ret_address + 4;
return 1;
... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/ldc.c |
static unsigned long __advance(unsigned long off, unsigned long num_entries) {
off += LDC_PACKET_SIZE;
if (off == (num_entries * LDC_PACKET_SIZE))
off = 0;
return off;
} | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/ldc.c |
static int send_version_nack(struct ldc_channel *lp, u16 major, u16 minor) {
struct ldc_packet *p;
struct ldc_version ver;
unsigned long new_tail;
ver.major = major;
ver.minor = minor;
p = handshake_compose_ctrl(lp, LDC_NACK, LDC_VERS, &ver, sizeof(ver),
&new_tail);
if (p) ... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/ldc.c |
static int send_version_ack(struct ldc_channel *lp, struct ldc_version *vp) {
struct ldc_packet *p;
unsigned long new_tail;
p = handshake_compose_ctrl(lp, LDC_ACK, LDC_VERS, vp, sizeof(*vp), &new_tail);
if (p) {
ldcdbg(HS, "SEND VER ACK maj[%u] min[%u]\n", vp->major, vp->minor);
return send_tx_packet... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/ldc.c |
static int process_ver_ack(struct ldc_channel *lp, struct ldc_version *vp) {
ldcdbg(HS, "GOT VERSION ACK major[%x] minor[%x]\n", vp->major, vp->minor);
if (lp->hs_state == LDC_HS_GOTVERS) {
if (lp->ver.major != vp->major || lp->ver.minor != vp->minor)
return LDC_ABORT(lp);
} else {
lp->ver = *vp;
... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/ldc.c |
static int process_ver_nack(struct ldc_channel *lp, struct ldc_version *vp) {
struct ldc_version *vap;
struct ldc_packet *p;
unsigned long new_tail;
if (vp->major == 0 && vp->minor == 0)
return LDC_ABORT(lp);
vap = find_by_major(vp->major);
if (!vap)
return LDC_ABORT(lp);
p = handshake_compose... | [
1,
0
] |
Linux Kernel | arch/sparc/kernel/ldc.c |
static int process_version(struct ldc_channel *lp, struct ldc_packet *p) {
struct ldc_version *vp;
vp = (struct ldc_version *)p->u.u_data;
switch (p->stype) {
case LDC_INFO:
return process_ver_info(lp, vp);
case LDC_ACK:
return process_ver_ack(lp, vp);
case LDC_NACK:
return process_ver_nack... | [
0,
0
] |
Linux Kernel | arch/sparc/kernel/ldc.c |
static int process_rts(struct ldc_channel *lp, struct ldc_packet *p) {
ldcdbg(HS, "GOT RTS stype[%x] seqid[%x] env[%x]\n", p->stype, p->seqid,
p->env);
if (p->stype != LDC_INFO || lp->hs_state != LDC_HS_GOTVERS ||
p->env != lp->cfg.mode)
return LDC_ABORT(lp);
lp->snd_nxt = p->seqid;
lp->rc... | [
1,
0
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.