Projectname large_stringclasses 15
values | Filepath large_stringlengths 4 106 ⌀ | Function large_stringlengths 11 3.45k | Label list |
|---|---|---|---|
Linux Kernel | arch/powerpc/kernel/interrupt.c | notrace unsigned long syscall_exit_restart(unsigned long r3,
struct pt_regs *regs) {
__hard_irq_disable();
local_paca->irq_happened |= PACA_IRQ_HARD_DIS;
#ifdef CONFIG_PPC_BOOK3S_64
set_kuap(AMR_KUAP_BLOCKED);
#endif
trace_hardirqs_off();
user_exit_irqoff();
acc... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/interrupt.c | notrace unsigned long interrupt_exit_user_prepare(struct pt_regs *regs) {
unsigned long ret;
BUG_ON(regs_is_unrecoverable(regs));
BUG_ON(arch_irq_disabled_regs(regs));
CT_WARN_ON(ct_state() == CONTEXT_USER);
kuap_assert_locked();
local_irq_disable();
ret = interrupt_exit_user_prepare_main(0, regs);
#... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/io.c |
void _insl_ns(const volatile u32 __iomem *port, void *buf, long count) {
u32 *tbuf = buf;
u32 tmp;
if (unlikely(count <= 0))
return;
asm volatile("sync");
do {
tmp = *port;
eieio();
*tbuf++ = tmp;
} while (--count != 0);
asm volatile("twi 0,%0,0; isync" : : "r"(tmp));
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/iomap.c | void pci_iounmap(struct pci_dev *dev, void __iomem *addr) {
if (isa_vaddr_is_ioport(addr))
return;
if (pcibios_vaddr_is_ioport(addr))
return;
iounmap(addr);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/iommu.c |
static void iommu_debugfs_del(struct iommu_table *tbl) {
char name[10];
struct dentry *liobn_entry;
sprintf(name, "%08lx", tbl->it_index);
liobn_entry = debugfs_lookup(name, iommu_debugfs_dir);
debugfs_remove(liobn_entry);
} | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/iommu.c |
static int __init setup_fail_iommu(char *str) {
return setup_fault_attr(&fail_iommu, str);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/iommu.c |
static int __init fail_iommu_debugfs(void) {
struct dentry *dir =
fault_create_debugfs_attr("fail_iommu", NULL, &fail_iommu);
return PTR_ERR_OR_ZERO(dir);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/iommu.c |
static ssize_t fail_iommu_show(struct device *dev,
struct device_attribute *attr, char *buf) {
return sprintf(buf, "%d\n", dev->archdata.fail_iommu);
} | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/iommu.c |
static ssize_t fail_iommu_store(struct device *dev,
struct device_attribute *attr, const char *buf,
size_t count) {
int i;
if (count > 0 && sscanf(buf, "%d", &i) > 0)
dev->archdata.fail_iommu = (i == 0) ? 0 : 1;
return count;
} | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/iommu.c | void ppc_iommu_unmap_sg(struct iommu_table *tbl, struct scatterlist *sglist,
int nelems, enum dma_data_direction direction,
unsigned long attrs) {
struct scatterlist *sg;
BUG_ON(direction == DMA_NONE);
if (!tbl)
return;
sg = sglist;
while (nelems--) {
... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/iommu.c | static void iommu_table_clear(struct iommu_table *tbl) {
if (!is_kdump_kernel() || is_fadump_active()) {
/* Clear the table in case firmware left allocations in it */
tbl->it_ops->clear(tbl, tbl->it_offset, tbl->it_size);
return;
}
#ifdef CONFIG_CRASH_DUMP
if (tbl->it_ops->get) {
unsigned long i... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/iommu.c | static void iommu_table_reserve_pages(struct iommu_table *tbl,
unsigned long res_start,
unsigned long res_end) {
int i;
WARN_ON_ONCE(res_end < res_start);
if (tbl->it_offset == 0)
set_bit(0, tbl->it_map);
if (res_start < tbl->it_... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/iommu.c | bool iommu_table_in_use(struct iommu_table *tbl) {
unsigned long start = 0, end;
if (tbl->it_offset == 0)
start = 1;
/* Simple case with no reserved MMIO32 region */
if (!tbl->it_reserved_start && !tbl->it_reserved_end)
return find_next_bit(tbl->it_map, tbl->it_size, start) != tbl->it_size;
end = t... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/iommu.c | static void iommu_table_free(struct kref *kref) {
struct iommu_table *tbl;
tbl = container_of(kref, struct iommu_table, it_kref);
if (tbl->it_ops->free)
tbl->it_ops->free(tbl);
if (!tbl->it_map) {
kfree(tbl);
return;
}
iommu_debugfs_del(tbl);
if (iommu_table_in_use(tbl))
pr_warn("%s: ... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/iommu.c |
int iommu_tce_table_put(struct iommu_table *tbl) {
if (WARN_ON(!tbl))
return 0;
return kref_put(&tbl->it_kref, iommu_table_free);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/iommu.c |
void iommu_unmap_page(struct iommu_table *tbl, dma_addr_t dma_handle,
size_t size, enum dma_data_direction direction,
unsigned long attrs) {
unsigned int npages;
BUG_ON(direction == DMA_NONE);
if (tbl) {
npages = iommu_num_pages(dma_handle, size, IOMMU_PAGE_SIZE(... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/iommu.c | void *iommu_alloc_coherent(struct device *dev, struct iommu_table *tbl,
size_t size, dma_addr_t *dma_handle,
unsigned long mask, gfp_t flag, int node) {
void *ret = NULL;
dma_addr_t mapping;
unsigned int order;
unsigned int nio_pages, io_order;
struct page... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/iommu.c |
enum dma_data_direction iommu_tce_direction(unsigned long tce) {
if ((tce & TCE_PCI_READ) && (tce & TCE_PCI_WRITE))
return DMA_BIDIRECTIONAL;
else if (tce & TCE_PCI_READ)
return DMA_TO_DEVICE;
else if (tce & TCE_PCI_WRITE)
return DMA_FROM_DEVICE;
else
return DMA_NONE;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/iommu.c |
int iommu_tce_check_gpa(unsigned long page_shift, unsigned long gpa) {
unsigned long mask = (1UL << page_shift) - 1;
if (gpa & mask)
return -EINVAL;
return 0;
} | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/iommu.c | int iommu_add_device(struct iommu_table_group *table_group,
struct device *dev) {
if (!device_is_registered(dev))
return -ENOENT;
if (device_iommu_mapped(dev)) {
pr_debug("%s: Skipping device %s with iommu group %d\n", __func__,
dev_name(dev), iommu_group_id(dev->iommu_gr... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/irq.c | static inline void check_stack_overflow(unsigned long sp) {
if (!IS_ENABLED(CONFIG_DEBUG_STACKOVERFLOW))
return;
sp &= THREAD_SIZE - 1;
if (unlikely(sp < THREAD_SIZE / 4)) {
pr_err("do_IRQ: stack overflow: %ld\n", sp);
dump_stack();
}
}
#ifdef CONFIG_SOFTIRQ_ON_OWN_STACK | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/irq.c | static __always_inline void call_do_softirq(const void *sp) {
asm volatile(PPC_STLU " %%r1, %[offset](%[sp]) ;"
"mr %%r1, %[sp] ;"
"bl %[callee] ;" PPC_LL
" %%r1, 0(%%r1) ;"
: // Outputs
: // Inputs
... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/irq.c | static __always_inline void call_do_irq(struct pt_regs *regs, void *sp) {
register unsigned long r3 asm("r3") = (unsigned long)regs;
asm volatile(PPC_STLU " %%r1, %[offset](%[sp]) ;"
"mr %%r4, %%r1 ;"
"mr %%r1, %[sp] ;"
"bl %[callee] ;" ... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/irq.c | void __do_IRQ(struct pt_regs *regs) {
struct pt_regs *old_regs = set_irq_regs(regs);
void *cursp, *irqsp, *sirqsp;
cursp = (void *)(current_stack_pointer & ~(THREAD_SIZE - 1));
irqsp = hardirq_ctx[raw_smp_processor_id()];
sirqsp = softirq_ctx[raw_smp_processor_id()];
/* Already there ? If not switch stack... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/irq.c |
static void __init vmap_irqstack_init(void) {
int i;
for_each_possible_cpu(i) {
softirq_ctx[i] = alloc_vm_stack();
hardirq_ctx[i] = alloc_vm_stack();
}
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/irq_64.c | static inline void replay_soft_interrupts_irqrestore(void) {
unsigned long kuap_state = get_kuap();
kuap_assert_locked();
if (kuap_state != AMR_KUAP_BLOCKED)
set_kuap(AMR_KUAP_BLOCKED);
replay_soft_interrupts();
if (kuap_state != AMR_KUAP_BLOCKED)
set_kuap(kuap_state);
} | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/irq_64.c | bool prep_irq_for_idle(void) {
__hard_irq_disable();
local_paca->irq_happened |= PACA_IRQ_HARD_DIS;
/*
* If anything happened while we were soft-disabled,
* we return now and do not enter the low power state.
*/
if (lazy_irq_pending())
return false;
/* Tell lockdep we are about to re-enable */... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/irq_64.c |
void replay_system_reset(void) {
struct pt_regs regs;
ppc_save_regs(®s);
regs.trap = 0x100;
get_paca()->in_nmi = 1;
system_reset_exception(®s);
get_paca()->in_nmi = 0;
} | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/irq_64.c | void force_external_irq_replay(void) {
WARN_ON(!arch_irqs_disabled());
/*
* Interrupts must always be hard disabled before irq_happened is
* modified (to prevent lost update in case of interrupt between
* load and store).
*/
__hard_irq_disable();
local_paca->irq_happened |= PACA_IRQ_HARD_DIS;
/... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/isa-bridge.c | void __init isa_bridge_find_early(struct pci_controller *hose) {
struct device_node *np, *parent = NULL, *tmp;
if (isa_bridge_devnode != NULL)
return;
/* For each "isa" node in the system. Note : we do a search by
* type and not by name. It might be better to do by name but that's
* what the code used... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/kdebugfs.c |
static int __init arch_kdebugfs_init(void) {
arch_debugfs_dir = debugfs_create_dir("powerpc", NULL);
return 0;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/kgdb.c | static int kgdb_debugger(struct pt_regs *regs) {
return !kgdb_handle_exception(1, computeSignal(TRAP(regs)), DIE_OOPS, regs);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/kgdb.c |
static int kgdb_handle_breakpoint(struct pt_regs *regs) {
if (user_mode(regs))
return 0;
if (kgdb_handle_exception(1, SIGTRAP, 0, regs) != 0)
return 0;
if (*(u32 *)regs->nip == BREAK_INSTR)
regs_add_return_ip(regs, BREAK_INSTR_SIZE);
return 1;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/kgdb.c |
static int kgdb_singlestep(struct pt_regs *regs) {
if (user_mode(regs))
return 0;
kgdb_handle_exception(0, SIGTRAP, 0, regs);
return 1;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/kgdb.c |
static int kgdb_iabr_match(struct pt_regs *regs) {
if (user_mode(regs))
return 0;
if (kgdb_handle_exception(0, computeSignal(TRAP(regs)), 0, regs) != 0)
return 0;
return 1;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/kprobes.c | int arch_prepare_kprobe(struct kprobe *p) {
int ret = 0;
struct kprobe *prev;
ppc_inst_t insn = ppc_inst_read(p->addr);
if ((unsigned long)p->addr & 0x03) {
printk("Attempt to register kprobe at an unaligned address\n");
ret = -EINVAL;
} else if (!can_single_step(ppc_inst_val(insn))) {
printk("Ca... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/kprobes.c |
void arch_arm_kprobe(struct kprobe *p) {
WARN_ON_ONCE(patch_instruction(p->addr, ppc_inst(BREAKPOINT_INSTRUCTION)));
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/kprobes.c |
static nokprobe_inline void set_current_kprobe(struct kprobe *p,
struct pt_regs *regs,
struct kprobe_ctlblk *kcb) {
__this_cpu_write(current_kprobe, p);
kcb->kprobe_saved_msr = regs->msr;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/kprobes.c | static int try_to_emulate(struct kprobe *p, struct pt_regs *regs) {
int ret;
ppc_inst_t insn = ppc_inst_read(p->ainsn.insn);
ret = emulate_step(regs, insn);
if (ret > 0) {
/*
* Once this instruction has been boosted
* successfully, set the boostable flag
*/
if (unlikely(p->ainsn.boostabl... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/kprobes.c |
int arch_trampoline_kprobe(struct kprobe *p) {
if (p->addr == (kprobe_opcode_t *)&__kretprobe_trampoline)
return 1;
return 0;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/kvm.c |
static void __init kvm_patch_ins_ll(u32 *inst, long addr, u32 rt) {
#ifdef CONFIG_64BIT
kvm_patch_ins(inst, KVM_INST_LD | rt | (addr & 0x0000fffc));
#else
kvm_patch_ins(inst, KVM_INST_LWZ | rt | (addr & 0x0000fffc));
#endif
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/kvm.c | static void __init kvm_patch_ins_b(u32 *inst, int addr) {
#if defined(CONFIG_RELOCATABLE) && defined(CONFIG_PPC_BOOK3S)
if ((ulong)inst < (ulong)&__end_interrupts)
return;
#endif
kvm_patch_ins(inst, KVM_INST_B | (addr & KVM_INST_B_MASK));
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/kvm.c | static void __init kvm_patch_ins_mtmsr(u32 *inst, u32 rt) {
u32 *p;
int distance_start;
int distance_end;
ulong next_inst;
p = kvm_alloc(kvm_emulate_mtmsr_len * 4);
if (!p)
return;
distance_start = (ulong)p - (ulong)inst;
next_inst = ((ulong)inst + 4);
distance_end = next_inst - (ulong)&p[kvm_em... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/kvm.c | static void __init kvm_patch_ins_wrtee(u32 *inst, u32 rt, int imm_one) {
u32 *p;
int distance_start;
int distance_end;
ulong next_inst;
p = kvm_alloc(kvm_emulate_wrtee_len * 4);
if (!p)
return;
distance_start = (ulong)p - (ulong)inst;
next_inst = ((ulong)inst + 4);
distance_end = next_inst - (ul... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/kvm.c | static void __init kvm_patch_ins_mtsrin(u32 *inst, u32 rt, u32 rb) {
u32 *p;
int distance_start;
int distance_end;
ulong next_inst;
p = kvm_alloc(kvm_emulate_mtsrin_len * 4);
if (!p)
return;
distance_start = (ulong)p - (ulong)inst;
next_inst = ((ulong)inst + 4);
distance_end = next_inst - (ulong... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/kvm.c | static int __init kvm_guest_init(void) {
if (!kvm_para_available())
return 0;
if (!epapr_paravirt_enabled)
return 0;
if (kvm_para_has_feature(KVM_FEATURE_MAGIC_PAGE))
kvm_use_magic_page();
#ifdef CONFIG_PPC_BOOK3S_64
powersave_nap = 1;
#endif
return 0;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/legacy_serial.c |
static void tsi_serial_out(struct uart_port *p, int offset, int value) {
offset = offset << p->regshift;
if (!((offset == UART_IER) && (value & UART_IER_UUE)))
writeb(value, p->membase + offset);
} | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/legacy_serial.c | static int __init add_legacy_isa_port(struct device_node *np,
struct device_node *isa_brg) {
const __be32 *reg;
const char *typep;
int index = -1;
u64 taddr;
DBG(" -> add_legacy_isa_port(%pOF)\n", np);
reg = of_get_property(np, "reg", NULL);
if (reg == NULL)
ret... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/legacy_serial.c |
static void __init fixup_port_pio(int index, struct device_node *np,
struct plat_serial8250_port *port) {
#ifdef CONFIG_PCI
struct pci_controller *hose;
DBG("fixup_port_pio(%d)\n", index);
hose = pci_find_hose_for_OF_device(np);
if (hose) {
unsigned long offset = (unsign... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/mce.c |
int mce_register_notifier(struct notifier_block *nb) {
return blocking_notifier_chain_register(&mce_notifier_list, nb);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/mce.c | void mce_irq_work_queue(void) {
arch_irq_work_raise();
set_mce_pending_irq_work();
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/mce.c | int get_mce_event(struct machine_check_event *mce, bool release) {
int index = local_paca->mce_info->mce_nest_count - 1;
struct machine_check_event *mc_evt;
int ret = 0;
if (index < 0)
return ret;
/* Check if we have MCE info to process. */
if (index < MAX_MC_EVT) {
mc_evt = &local_paca->mce_info-... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/mce.c | static void machine_check_ue_event(struct machine_check_event *evt) {
int index;
index = local_paca->mce_info->mce_ue_count++;
if (index >= MAX_MC_EVT) {
local_paca->mce_info->mce_ue_count--;
return;
}
memcpy(&local_paca->mce_info->mce_ue_event_queue[index], evt, sizeof(*evt));
/* Queue work to p... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/mce.c | static void machine_process_ue_event(struct work_struct *work) {
int index;
struct machine_check_event *evt;
while (local_paca->mce_info->mce_ue_count > 0) {
index = local_paca->mce_info->mce_ue_count - 1;
evt = &local_paca->mce_info->mce_ue_event_queue[index];
blocking_notifier_call_chain(&mce_notif... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/mce.c | static void machine_check_process_queued_event(void) {
int index;
struct machine_check_event *evt;
add_taint(TAINT_MACHINE_CHECK, LOCKDEP_NOW_UNRELIABLE);
/*
* For now just print it to console.
* TODO: log this error event to FSP or nvram.
*/
while (local_paca->mce_info->mce_queue_count > 0) {
... | [
1,
1
] |
Linux Kernel | arch/powerpc/kernel/mce.c | static int init_debug_trig_function(void) {
int pvr;
struct device_node *cpun;
struct property *prop = NULL;
const char *str;
preempt_disable();
cpun = of_get_cpu_node(smp_processor_id(), NULL);
if (cpun) {
of_property_for_each_string(cpun, "ibm,hmi-special-triggers", prop, str) {
if (strcmp(st... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/module_32.c | static unsigned int count_relocs(const Elf32_Rela *rela, unsigned int num) {
unsigned int i, r_info, r_addend, _count_relocs;
_count_relocs = 0;
r_info = 0;
r_addend = 0;
for (i = 0; i < num; i++)
if (ELF32_R_TYPE(rela[i].r_info) == R_PPC_REL24 &&
(r_info != ELF32_R_SYM(rela[i].r_info) ||
... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/module_32.c | static unsigned long get_plt_size(const Elf32_Ehdr *hdr,
const Elf32_Shdr *sechdrs,
const char *secstrings, int is_init) {
unsigned long ret = 0;
unsigned i;
for (i = 1; i < hdr->e_shnum; i++) {
/* If it's called *.init*, and we're not init,... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/module_32.c | int module_frob_arch_sections(Elf32_Ehdr *hdr, Elf32_Shdr *sechdrs,
char *secstrings, struct module *me) {
unsigned int i;
for (i = 0; i < hdr->e_shnum; i++) {
if (strcmp(secstrings + sechdrs[i].sh_name, ".init.plt") == 0)
me->arch.init_plt_section = i;
else if (strcmp(s... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/module_64.c |
static func_desc_t func_desc(unsigned long addr) {
return *(struct func_desc *)addr;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/module_64.c |
static unsigned long func_addr(unsigned long addr) {
return func_desc(addr).addr;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/module_64.c | static void dedotify(Elf64_Sym *syms, unsigned int numsyms, char *strtab) {
unsigned int i;
for (i = 1; i < numsyms; i++) {
if (syms[i].st_shndx == SHN_UNDEF) {
char *name = strtab + syms[i].st_name;
if (name[0] == '.') {
if (strcmp(name + 1, "TOC.") == 0)
syms[i].st_shndx = SHN_A... | [
0,
1
] |
Linux Kernel | arch/powerpc/kernel/module_64.c | static inline int create_ftrace_stub(struct ppc64_stub_entry *entry,
unsigned long addr, struct module *me) {
long reladdr;
memcpy(entry->jump, stub_insns, sizeof(stub_insns));
reladdr = addr - kernel_toc_addr();
if (reladdr > 0x7FFFFFFF || reladdr < -(0x80000000L)) {
... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/module_64.c |
static bool is_mprofile_ftrace_call(const char *name) { return false; } | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/module_64.c | static inline unsigned long my_r2(const Elf64_Shdr *sechdrs,
struct module *me) {
return (sechdrs[me->arch.toc_section].sh_addr & ~0xfful) + 0x8000;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/module_64.c | static unsigned long stub_for_addr(const Elf64_Shdr *sechdrs,
unsigned long addr, struct module *me,
const char *name) {
struct ppc64_stub_entry *stubs;
unsigned int i, num_stubs;
num_stubs = sechdrs[me->arch.stubs_section].sh_size / sizeof(*s... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/module_64.c | int module_trampoline_target(struct module *mod, unsigned long addr,
unsigned long *target) {
struct ppc64_stub_entry *stub;
func_desc_t funcdata;
u32 magic;
if (!within_module_core(addr, mod)) {
pr_err("%s: stub %lx not in module %s\n", __func__, addr, mod->name);
return -... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/module_64.c |
int module_finalize_ftrace(struct module *mod, const Elf_Shdr *sechdrs) {
mod->arch.tramp = stub_for_addr(sechdrs, (unsigned long)ftrace_caller, mod,
"ftrace_caller");
#ifdef CONFIG_DYNAMIC_FTRACE_WITH_REGS
mod->arch.tramp_regs = stub_for_addr(
sechdrs, (unsigned long)ftrace... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/nvram_64.c | int nvram_write_os_partition(struct nvram_os_partition *part, char *buff,
int length, unsigned int err_type,
unsigned int error_log_cnt) {
int rc;
loff_t tmp_index;
struct err_log_info info;
if (part->index == -1)
return -ESPIPE;
if (length > par... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/nvram_64.c | static int zip_oops(size_t text_len) {
struct oops_log_info *oops_hdr = (struct oops_log_info *)oops_buf;
int zipped_len =
nvram_compress(big_oops_buf, oops_data, text_len, oops_data_sz);
if (zipped_len < 0) {
pr_err("nvram: compression failed; returned %d\n", zipped_len);
pr_err("nvram: logging unc... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/nvram_64.c | static int nvram_pstore_write(struct pstore_record *record) {
int rc;
unsigned int err_type = ERR_TYPE_KERNEL_PANIC;
struct oops_log_info *oops_hdr = (struct oops_log_info *)oops_buf;
if (record->part > 1 || (record->type != PSTORE_TYPE_DMESG))
return -1;
if (clobbering_unread_rtas_event())
return -... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/nvram_64.c | static int __init nvram_pstore_init(void) { return -1; }
#endif | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/nvram_64.c | static void __init nvram_print_partitions(char *label) {
struct nvram_partition *tmp_part;
printk(KERN_WARNING "--------%s---------\n", label);
printk(KERN_WARNING "indx\t\tsig\tchks\tlen\tname\n");
list_for_each_entry(tmp_part, &nvram_partitions, partition) {
printk(KERN_WARNING "%4d \t%02x\t%02x\t%d\t... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/nvram_64.c | static int __init nvram_can_remove_partition(struct nvram_partition *part,
const char *name, int sig,
const char *exceptions[]) {
if (part->header.signature != sig)
return 0;
if (name) {
if (strncmp(name, part->header.... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/nvram_64.c | int __init nvram_remove_partition(const char *name, int sig,
const char *exceptions[]) {
struct nvram_partition *part, *prev, *tmp;
int rc;
list_for_each_entry(part, &nvram_partitions, partition) {
if (!nvram_can_remove_partition(part, name, sig, exceptions))
continue;... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/nvram_64.c | int nvram_get_partition_size(loff_t data_index) {
struct nvram_partition *part;
list_for_each_entry(part, &nvram_partitions, partition) {
if (part->index + NVRAM_HEADER_LEN == data_index)
return (part->header.length - 1) * NVRAM_BLOCK_LEN;
}
return -1;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/optprobes.c |
void free_optinsn_page(void *page) { insn_page_in_use = false; } | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/optprobes.c | static unsigned long can_optimize(struct kprobe *p) {
struct pt_regs regs;
struct instruction_op op;
unsigned long nip = 0;
unsigned long addr = (unsigned long)p->addr;
if (p->addr == (kprobe_opcode_t *)&__kretprobe_trampoline)
return addr + sizeof(kprobe_opcode_t);
/*
* We only support optimizing ... | [
1,
1
] |
Linux Kernel | arch/powerpc/kernel/optprobes.c | static void patch_imm64_load_insns(unsigned long long val, int reg,
kprobe_opcode_t *addr) {
patch_instruction(addr++, ppc_inst(PPC_RAW_LIS(reg, PPC_HIGHEST(val))));
patch_instruction(addr++, ppc_inst(PPC_RAW_ORI(reg, reg, PPC_HIGHER(val))));
patch_instruction(addr++, ppc_inst(P... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/optprobes.c |
int arch_prepared_optinsn(struct arch_optimized_insn *optinsn) {
return optinsn->insn != NULL;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/optprobes.c | int arch_check_optimized_kprobe(struct optimized_kprobe *op) { return 0; } | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/optprobes.c |
void arch_unoptimize_kprobes(struct list_head *oplist,
struct list_head *done_list) {
struct optimized_kprobe *op;
struct optimized_kprobe *tmp;
list_for_each_entry_safe(op, tmp, oplist, list) {
arch_unoptimize_kprobe(op);
list_move(&op->list, done_list);
}
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/pci-common.c |
void __init set_pci_dma_ops(const struct dma_map_ops *dma_ops) {
pci_dma_ops = dma_ops;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/pci-common.c | static int get_phb_number(struct device_node *dn) {
int ret, phb_id = -1;
u64 prop;
ret = of_get_pci_domain_nr(dn);
if (ret >= 0) {
prop = ret;
ret = 0;
}
if (ret)
ret = of_property_read_u64(dn, "ibm,opal-phbid", &prop);
if (ret) {
ret = of_alias_get_id(dn, "pci");
if (ret >= 0) {
... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/pci-common.c | void pcibios_free_controller(struct pci_controller *phb) {
spin_lock(&hose_spinlock);
if (phb->global_number < MAX_PHBS)
clear_bit(phb->global_number, phb_bitmap);
of_node_put(phb->dn);
list_del(&phb->list_node);
spin_unlock(&hose_spinlock);
if (phb->is_dynamic)
kfree(phb);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/pci-common.c | void pcibios_free_controller_deferred(struct pci_host_bridge *bridge) {
struct pci_controller *phb = (struct pci_controller *)bridge->release_data;
pr_debug("domain %d, dynamic %d\n", phb->global_number, phb->is_dynamic);
pcibios_free_controller(phb);
} | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/pci-common.c |
void pcibios_setup_bridge(struct pci_bus *bus, unsigned long type) {
struct pci_controller *hose = pci_bus_to_host(bus);
if (hose->controller_ops.setup_bridge)
hose->controller_ops.setup_bridge(bus, type);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/pci-common.c |
void pcibios_reset_secondary_bus(struct pci_dev *dev) {
struct pci_controller *phb = pci_bus_to_host(dev->bus);
if (phb->controller_ops.reset_secondary_bus) {
phb->controller_ops.reset_secondary_bus(dev);
return;
}
pci_reset_secondary_bus(dev);
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/pci-common.c |
int pcibios_sriov_enable(struct pci_dev *pdev, u16 num_vfs) {
if (ppc_md.pcibios_sriov_enable)
return ppc_md.pcibios_sriov_enable(pdev, num_vfs);
return 0;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/pci-common.c | int pci_iobar_pfn(struct pci_dev *pdev, int bar, struct vm_area_struct *vma) {
struct pci_controller *hose = pci_bus_to_host(pdev->bus);
resource_size_t ioaddr = pci_resource_start(pdev, bar);
if (!hose)
return -EINVAL;
ioaddr -= (unsigned long)hose->io_base_virt - _IO_BASE;
vma->vm_pgoff += (ioaddr + ... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/pci-common.c | int pci_legacy_write(struct pci_bus *bus, loff_t port, u32 val, size_t size) {
unsigned long offset;
struct pci_controller *hose = pci_bus_to_host(bus);
struct resource *rp = &hose->io_resource;
void __iomem *addr;
offset = (unsigned long)hose->io_base_virt - _IO_BASE;
offset += port;
if (!(rp->flags & ... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/pci-common.c | int pci_proc_domain(struct pci_bus *bus) {
struct pci_controller *hose = pci_bus_to_host(bus);
if (!pci_has_flag(PCI_ENABLE_PROC_DOMAINS))
return 0;
if (pci_has_flag(PCI_COMPAT_DOMAIN_0))
return hose->global_number != 0;
return 1;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/pci-common.c |
int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge) {
if (ppc_md.pcibios_root_bridge_prepare)
return ppc_md.pcibios_root_bridge_prepare(bridge);
return 0;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/pci-common.c | static void pcibios_fixup_bridge(struct pci_bus *bus) {
struct resource *res;
int i;
struct pci_dev *dev = bus->self;
pci_bus_for_each_resource(bus, res, i) {
if (!res || !res->flags)
continue;
if (i >= 3 && bus->self->transparent)
continue;
if (pci_has_flag(PCI_REASSIGN_ALL_RSRC)) {
... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/pci-common.c | static inline void alloc_resource(struct pci_dev *dev, int idx) {
struct resource *pr, *r = &dev->resource[idx];
pr_debug("PCI: Allocating %s: Resource %d: %pR\n", pci_name(dev), idx, r);
pr = pci_find_parent_resource(dev, r);
if (!pr || (pr->flags & IORESOURCE_UNSET) || request_resource(pr, r) < 0) {
pri... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/pci-common.c | static void __init pcibios_allocate_resources(int pass) {
struct pci_dev *dev = NULL;
int idx, disabled;
u16 command;
struct resource *r;
for_each_pci_dev(dev) {
pci_read_config_word(dev, PCI_COMMAND, &command);
for (idx = 0; idx <= PCI_ROM_RESOURCE; idx++) {
r = &dev->resource[idx];
if (... | [
1,
0
] |
Linux Kernel | arch/powerpc/kernel/pci-common.c | void __init pcibios_resource_survey(void) {
struct pci_bus *b;
list_for_each_entry(b, &pci_root_buses, node)
pcibios_allocate_bus_resources(b);
if (!pci_has_flag(PCI_REASSIGN_ALL_RSRC)) {
pcibios_allocate_resources(0);
pcibios_allocate_resources(1);
}
/* Before we start assigning unassigned re... | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/pci-common.c |
static int null_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
int len, u32 *val) {
return PCIBIOS_DEVICE_NOT_FOUND;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/pci-common.c |
static int null_write_config(struct pci_bus *bus, unsigned int devfn,
int offset, int len, u32 val) {
return PCIBIOS_DEVICE_NOT_FOUND;
} | [
0,
0
] |
Linux Kernel | arch/powerpc/kernel/pci-common.c | void pcibios_scan_phb(struct pci_controller *hose) {
LIST_HEAD(resources);
struct pci_bus *bus;
struct device_node *node = hose->dn;
int mode;
pr_debug("PCI: Scanning PHB %pOF\n", node);
pcibios_setup_phb_io_space(hose);
/* Wire up PHB bus resources */
pcibios_setup_phb_resources(hose, &resources);
... | [
1,
0
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.