Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
⌀
Function
large_stringlengths
11
3.45k
Label
list
Linux Kernel
arch/powerpc/xmon/ppc-opc.c
static long extract_bo(unsigned long insn, ppc_cpu_t dialect, int *invalid) { long value; value = (insn >> 21) & 0x1f; if (!valid_bo(value, dialect, 1)) *invalid = 1; return value; }
[ 1, 0 ]
Linux Kernel
arch/powerpc/xmon/ppc-opc.c
static long extract_dxdn(unsigned long insn, ppc_cpu_t dialect ATTRIBUTE_UNUSED, int *invalid ATTRIBUTE_UNUSED) { return -extract_dxd(insn, dialect, invalid); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/xmon/ppc-opc.c
static long extract_li20(unsigned long insn, ppc_cpu_t dialect ATTRIBUTE_UNUSED, int *invalid ATTRIBUTE_UNUSED) { long ext = ((insn & 0x4000) == 0x4000) ? 0xfff00000 : 0x00000000; return ext | (((insn >> 11) & 0xf) << 16) | (((insn >> 17) & 0xf) << 12) | (((insn >> 16) & 0x1) << ...
[ 1, 0 ]
Linux Kernel
arch/powerpc/xmon/ppc-opc.c
static unsigned long insert_mbe(unsigned long insn, long value, ppc_cpu_t dialect ATTRIBUTE_UNUSED, const char **errmsg) { unsigned long uval, mask; int mb, me, mx, count, last; uval = value; if (uval == 0) { *errmsg = _("illegal bitmask"); ...
[ 1, 0 ]
Linux Kernel
arch/powerpc/xmon/ppc-opc.c
static unsigned long insert_nbi(unsigned long insn, long value, ppc_cpu_t dialect ATTRIBUTE_UNUSED, const char **errmsg ATTRIBUTE_UNUSED) { long rtvalue = (insn & RT_MASK) >> 21; long ravalue = (insn & RA_MASK) >> 16; if (value == 0) value = 32;...
[ 1, 0 ]
Linux Kernel
arch/powerpc/xmon/ppc-opc.c
static unsigned long insert_nsi(unsigned long insn, long value, ppc_cpu_t dialect ATTRIBUTE_UNUSED, const char **errmsg ATTRIBUTE_UNUSED) { return insn | (-value & 0xffff); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/xmon/ppc-opc.c
static unsigned long insert_ram(unsigned long insn, long value, ppc_cpu_t dialect ATTRIBUTE_UNUSED, const char **errmsg) { if ((unsigned long)value >= ((insn >> 21) & 0x1f)) *errmsg = _("index register in load range"); return insn | ((value & 0x1f)...
[ 1, 0 ]
Linux Kernel
arch/powerpc/xmon/ppc-opc.c
static unsigned long insert_raq(unsigned long insn, long value, ppc_cpu_t dialect ATTRIBUTE_UNUSED, const char **errmsg) { long rtvalue = (insn & RT_MASK) >> 21; if (value == rtvalue) *errmsg = _("source and target register operands must be differ...
[ 0, 0 ]
Linux Kernel
arch/powerpc/xmon/ppc-opc.c
static unsigned long insert_rbs(unsigned long insn, long value ATTRIBUTE_UNUSED, ppc_cpu_t dialect ATTRIBUTE_UNUSED, const char **errmsg ATTRIBUTE_UNUSED) { return insn | (((insn >> 21) & 0x1f) << 11); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/xmon/ppc-opc.c
static unsigned long insert_sci8(unsigned long insn, long value, ppc_cpu_t dialect ATTRIBUTE_UNUSED, const char **errmsg) { unsigned int fill_scale = 0; unsigned long ui8 = value; if ((ui8 & 0xffffff00) == 0) ; else if ((ui8 & 0xffffff00) ==...
[ 1, 0 ]
Linux Kernel
arch/powerpc/xmon/ppc-opc.c
static long extract_sci8n(unsigned long insn, ppc_cpu_t dialect, int *invalid) { return -extract_sci8(insn, dialect, invalid); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/xmon/ppc-opc.c
static long extract_sd4h(unsigned long insn, ppc_cpu_t dialect ATTRIBUTE_UNUSED, int *invalid ATTRIBUTE_UNUSED) { return ((insn >> 8) & 0xf) << 1; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/xmon/ppc-opc.c
static unsigned long insert_oimm(unsigned long insn, long value, ppc_cpu_t dialect ATTRIBUTE_UNUSED, const char **errmsg ATTRIBUTE_UNUSED) { return insn | (((value - 1) & 0x1f) << 4); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/xmon/ppc-opc.c
static long extract_xtq6(unsigned long insn, ppc_cpu_t dialect ATTRIBUTE_UNUSED, int *invalid ATTRIBUTE_UNUSED) { return ((insn << 2) & 0x20) | ((insn >> 21) & 0x1f); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/xmon/ppc-opc.c
static long extract_xa6(unsigned long insn, ppc_cpu_t dialect ATTRIBUTE_UNUSED, int *invalid ATTRIBUTE_UNUSED) { return ((insn << 3) & 0x20) | ((insn >> 16) & 0x1f); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/xmon/ppc-opc.c
static long extract_xb6(unsigned long insn, ppc_cpu_t dialect ATTRIBUTE_UNUSED, int *invalid ATTRIBUTE_UNUSED) { return ((insn << 4) & 0x20) | ((insn >> 11) & 0x1f); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/xmon/ppc-opc.c
static unsigned long insert_xc6(unsigned long insn, long value, ppc_cpu_t dialect ATTRIBUTE_UNUSED, const char **errmsg ATTRIBUTE_UNUSED) { return insn | ((value & 0x1f) << 6) | ((value & 0x20) >> 2); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/xmon/ppc-opc.c
static long extract_dm(unsigned long insn, ppc_cpu_t dialect ATTRIBUTE_UNUSED, int *invalid) { long value; value = (insn >> 8) & 3; if (value != 0 && value != 3) *invalid = 1; return (value) ? 1 : 0; }
[ 1, 0 ]
Linux Kernel
arch/powerpc/xmon/ppc-opc.c
static unsigned long insert_vlesi(unsigned long insn, long value, ppc_cpu_t dialect ATTRIBUTE_UNUSED, const char **errmsg ATTRIBUTE_UNUSED) { return insn | ((value & 0xf800) << 10) | (value & 0x7ff); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/xmon/xmon.c
static inline void disable_surveillance(void) { #ifdef CONFIG_PPC_PSERIES static struct rtas_args args; /* * At this point we have got all the cpus we can into * xmon, so there is hopefully no other cpu calling RTAS * at the moment, even though we don't take rtas.lock. * If we did try to take rtas.loc...
[ 0, 0 ]
Linux Kernel
arch/powerpc/xmon/xmon.c
static void xmon_touch_watchdogs(void) { touch_softlockup_watchdog_sync(); rcu_cpu_stall_reset(); touch_nmi_watchdog(); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/xmon/xmon.c
int xmon(struct pt_regs *excp) { struct pt_regs regs; if (excp == NULL) { ppc_save_regs(&regs); excp = &regs; } return xmon_core(excp, 0); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/xmon/xmon.c
irqreturn_t xmon_irq(int irq, void *d) { unsigned long flags; local_irq_save(flags); printf("Keyboard interrupt\n"); xmon(get_irq_regs()); local_irq_restore(flags); return IRQ_HANDLED; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/xmon/xmon.c
static inline void force_enable_xmon(void) { if (!xmon_on) { printf("xmon: Enabling debugger hooks\n"); xmon_on = 1; } }
[ 0, 0 ]
Linux Kernel
arch/powerpc/xmon/xmon.c
static struct bpt *new_breakpoint(unsigned long a) { struct bpt *bp; a &= ~3UL; bp = at_breakpoint(a); if (bp) return bp; for (bp = bpts; bp < &bpts[NBPTS]; ++bp) { if (!bp->enabled && atomic_read(&bp->ref_count) == 0) { bp->address = a; bp->instr = (void *)(bpt_table + ((bp - bpts) * B...
[ 0, 0 ]
Linux Kernel
arch/powerpc/xmon/xmon.c
static void insert_cpu_bpts(void) { int i; struct arch_hw_breakpoint brk; for (i = 0; i < nr_wp_slots(); i++) { if (dabr[i].enabled) { brk.address = dabr[i].address; brk.type = (dabr[i].enabled & HW_BRK_TYPE_DABR) | HW_BRK_TYPE_PRIV_ALL; brk.len = 8; brk.hw_len = 8; __set_break...
[ 0, 0 ]
Linux Kernel
arch/powerpc/xmon/xmon.c
static void set_lpp_cmd(void) { unsigned long lpp; if (!scanhex(&lpp)) { printf("Invalid number.\n"); lpp = 0; } xmon_set_pagination_lpp(lpp); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/xmon/xmon.c
static void bootcmds(void) { char tmp[64]; int cmd; cmd = inchar(); if (cmd == 'r') { getstring(tmp, 64); ppc_md.restart(tmp); } else if (cmd == 'h') { ppc_md.halt(); } else if (cmd == 'p') { do_kernel_power_off(); } }
[ 0, 0 ]
Linux Kernel
arch/powerpc/xmon/xmon.c
static int batch_cmds(struct pt_regs *excp) { int cmd; cmd = xmon_batch; termch = '\n'; last_cmd = NULL; xmon_regs = excp; printf("%x:", smp_processor_id()); printf("mon> "); printf("%c\n", (char)cmd); switch (cmd) { case 'r': prregs(excp); /* print regs */ break; case 'S': super_r...
[ 1, 0 ]
Linux Kernel
arch/powerpc/xmon/xmon.c
static void backtrace(struct pt_regs *excp) { unsigned long sp; if (scanhex(&sp)) xmon_show_stack(sp, 0, 0); else xmon_show_stack(excp->gpr[1], excp->link, excp->nip); scannl(); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/xmon/xmon.c
static int read_spr(int n, unsigned long *vp) { unsigned long ret = -1UL; int ok = 0; if (setjmp(bus_error_jmp) == 0) { catch_spr_faults = 1; sync(); ret = xmon_mfspr(n, *vp); sync(); *vp = ret; ok = 1; } catch_spr_faults = 0; return ok; }
[ 1, 0 ]
Linux Kernel
arch/powerpc/xmon/xmon.c
static void dump_300_sprs(void) { #ifdef CONFIG_PPC64 bool hv = mfmsr() & MSR_HV; if (!cpu_has_feature(CPU_FTR_ARCH_300)) return; if (cpu_has_feature(CPU_FTR_P9_TIDR)) { printf("pidr = %.16lx tidr = %.16lx\n", mfspr(SPRN_PID), mfspr(SPRN_TIDR)); } else { printf("pidr = %.16lx\n",...
[ 0, 0 ]
Linux Kernel
arch/powerpc/xmon/xmon.c
static void dump_310_sprs(void) { #ifdef CONFIG_PPC64 if (!cpu_has_feature(CPU_FTR_ARCH_31)) return; printf("mmcr3 = %.16lx, sier2 = %.16lx, sier3 = %.16lx\n", mfspr(SPRN_MMCR3), mfspr(SPRN_SIER2), mfspr(SPRN_SIER3)); #endif }
[ 0, 0 ]
Linux Kernel
arch/powerpc/xmon/xmon.c
static void dump_one_spr(int spr, bool show_unimplemented) { unsigned long val; val = 0xdeadbeef; if (!read_spr(spr, &val)) { printf("SPR 0x%03x (%4d) Faulted during read\n", spr, spr); return; } if (val == 0xdeadbeef) { val = 0x0badcafe; if (!read_spr(spr, &val)) { printf("SPR 0x%03x...
[ 1, 0 ]
Linux Kernel
arch/powerpc/xmon/xmon.c
static int mwrite(unsigned long adrs, void *buf, int size) { volatile int n; char *p, *q; n = 0; if (xmon_is_ro) { printf(xmon_ro_msg); return n; } if (setjmp(bus_error_jmp) == 0) { catch_memory_errors = 1; sync(); p = (char *)adrs; q = (char *)buf; switch (size) { case 2:...
[ 0, 0 ]
Linux Kernel
arch/powerpc/xmon/xmon.c
static int handle_fault(struct pt_regs *regs) { fault_except = TRAP(regs); switch (TRAP(regs)) { case 0x200: fault_type = 0; break; case 0x300: case 0x380: fault_type = 1; break; default: fault_type = 2; } longjmp(bus_error_jmp, 1); return 0; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/xmon/xmon.c
static void byterev(unsigned char *val, int size) { int t; switch (size) { case 2: SWAP(val[0], val[1], t); break; case 4: SWAP(val[0], val[3], t); SWAP(val[1], val[2], t); break; case 8: SWAP(val[0], val[7], t); SWAP(val[1], val[6], t); SWAP(val[2], val[5], t); SWAP(val[3...
[ 1, 0 ]
Linux Kernel
arch/powerpc/xmon/xmon.c
static void dump_all_pacas(void) { int cpu; if (num_possible_cpus() == 0) { printf("No possible cpus, use 'dp #' to dump individual cpus\n"); return; } for_each_possible_cpu(cpu) dump_one_paca(cpu); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/xmon/xmon.c
static int ppc_inst_dump(unsigned long adr, long count, int praddr) { return generic_inst_dump(adr, count, praddr, print_insn_powerpc); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/xmon/xmon.c
static void dump_opal_msglog(void) { unsigned char buf[128]; ssize_t res; volatile loff_t pos = 0; if (!firmware_has_feature(FW_FEATURE_OPAL)) { printf("Machine is not running OPAL firmware.\n"); return; } if (setjmp(bus_error_jmp) != 0) { printf("Error dumping OPAL msglog!\n"); return; ...
[ 1, 0 ]
Linux Kernel
arch/powerpc/xmon/xmon.c
static void memops(int cmd) { scanhex((void *)&mdest); if (termch != '\n') termch = 0; scanhex((void *)(cmd == 's' ? &mval : &msrc)); if (termch != '\n') termch = 0; scanhex((void *)&mcount); switch (cmd) { case 'm': if (xmon_is_ro) { printf(xmon_ro_msg); break; } memmove(...
[ 1, 0 ]
Linux Kernel
arch/powerpc/xmon/xmon.c
static void memdiffs(unsigned char *p1, unsigned char *p2, unsigned nb, unsigned maxpr) { unsigned n, prt; prt = 0; for (n = nb; n > 0; --n) if (*p1++ != *p2++) if (++prt <= maxpr) printf("%px %.2x # %px %.2x\n", p1 - 1, p1[-1], p2 - 1, p2[-1]); if (prt > maxpr) prin...
[ 1, 0 ]
Linux Kernel
arch/powerpc/xmon/xmon.c
static void memzcan(void) { unsigned char v; unsigned a; int ok, ook; scanhex(&mdest); if (termch != '\n') termch = 0; scanhex(&mskip); if (termch != '\n') termch = 0; scanhex(&mlim); ook = 0; for (a = mdest; a < mlim; a += mskip) { ok = mread(a, &v, 1); if (ok && !ook) { pri...
[ 0, 0 ]
Linux Kernel
arch/powerpc/xmon/xmon.c
static void show_task(struct task_struct *volatile tsk) { unsigned int p_state = READ_ONCE(tsk->__state); char state; state = (p_state == TASK_RUNNING) ? 'R' : (p_state & TASK_UNINTERRUPTIBLE) ? 'D' : (p_state & TASK_STOPPED) ? 'T' : (p_state & TASK_TRACED) ...
[ 1, 0 ]
Linux Kernel
arch/powerpc/xmon/xmon.c
static void show_pte(unsigned long addr) { printf("show_pte not yet implemented\n"); } #endif
[ 0, 0 ]
Linux Kernel
arch/powerpc/xmon/xmon.c
static void show_tasks(void) { unsigned long tskv; struct task_struct *volatile tsk = NULL; printf(" task_struct ->thread.ksp ->thread.regs PID PPID S " "P CMD\n"); if (scanhex(&tskv)) tsk = (struct task_struct *)tskv; if (setjmp(bus_error_jmp) != 0) { catch_memory_errors...
[ 0, 0 ]
Linux Kernel
arch/powerpc/xmon/xmon.c
static void scannl(void) { int c; c = termch; termch = 0; while (c != '\n') c = inchar(); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/xmon/xmon.c
static void take_input(char *str) { lineptr = str; }
[ 0, 0 ]
Linux Kernel
arch/powerpc/xmon/xmon.c
static void xmon_print_symbol(unsigned long address, const char *mid, const char *after) { char *modname; const char *volatile name = NULL; unsigned long offset, size; printf(REG, address); if (setjmp(bus_error_jmp) == 0) { catch_memory_errors = 1; sync(); name = kal...
[ 1, 0 ]
Linux Kernel
arch/powerpc/xmon/xmon.c
void dump_segments(void) { int i; unsigned long esid, vsid; unsigned long llp; printf("SLB contents of cpu 0x%x\n", smp_processor_id()); for (i = 0; i < mmu_slb_size; i++) { asm volatile("slbmfee %0,%1" : "=r"(esid) : "r"(i)); asm volatile("slbmfev %0,%1" : "=r"(vsid) : "r"(i)); if (!esid && ...
[ 0, 0 ]
Linux Kernel
arch/powerpc/xmon/xmon.c
void dump_segments(void) { int i; printf("sr0-15 ="); for (i = 0; i < 16; ++i) printf(" %x", mfsr(i << 28)); printf("\n"); }
[ 0, 0 ]
Linux Kernel
arch/powerpc/xmon/xmon.c
static void dump_tlb_44x(void) { int i; for (i = 0; i < PPC44x_TLB_SIZE; i++) { unsigned long w0, w1, w2; asm volatile("tlbre %0,%1,0" : "=r"(w0) : "r"(i)); asm volatile("tlbre %0,%1,1" : "=r"(w1) : "r"(i)); asm volatile("tlbre %0,%1,2" : "=r"(w2) : "r"(i)); printf("[%02x] %08lx %08lx %08lx ...
[ 0, 0 ]
Linux Kernel
arch/powerpc/xmon/xmon.c
static int __init early_parse_xmon(char *p) { if (xmon_is_locked_down()) { xmon_init(0); xmon_early = 0; xmon_on = 0; } else if (!p || strncmp(p, "early", 5) == 0) { xmon_init(1); xmon_early = 1; xmon_on = 1; } else if (strncmp(p, "on", 2) == 0) { xmon_init(1); xmon_on = 1; } el...
[ 0, 0 ]
Linux Kernel
arch/powerpc/xmon/xmon.c
void __init xmon_register_spus(struct list_head *list) { struct spu *spu; list_for_each_entry(spu, list, full_list) { if (spu->number >= XMON_NUM_SPUS) { WARN_ON(1); continue; } spu_info[spu->number].spu = spu; spu_info[spu->number].stopped_ok = 0; spu_info[spu->number].dump_addr ...
[ 0, 0 ]
Linux Kernel
arch/riscv/errata/sifive/errata.c
static bool errata_cip_1200_check_func(unsigned long arch_id, unsigned long impid) { if (arch_id != 0x8000000000000007 && arch_id != 0x1) return false; if ((impid & 0xffffff) > 0x200630 || impid == 0x1200626) return false; return true; }
[ 1, 0 ]
Linux Kernel
arch/riscv/errata/sifive/errata.c
void __init_or_module sifive_errata_patch_func(struct alt_entry *begin, struct alt_entry *end, unsigned long archid, unsigned long impid, ...
[ 1, 0 ]
Linux Kernel
arch/riscv/errata/thead/errata.c
static bool errata_probe_pbmt(unsigned int stage, unsigned long arch_id, unsigned long impid) { if (!IS_ENABLED(CONFIG_ERRATA_THEAD_PBMT)) return false; if (arch_id != 0 || impid != 0) return false; if (stage == RISCV_ALTERNATIVES_EARLY_BOOT || stage == RISCV_ALTERNA...
[ 1, 0 ]
Linux Kernel
arch/riscv/errata/thead/errata.c
void __init_or_module thead_errata_patch_func(struct alt_entry *begin, struct alt_entry *end, unsigned long archid, unsigned long impid, ...
[ 1, 0 ]
Linux Kernel
arch/riscv/include/asm/alternative.h
static inline void apply_early_boot_alternatives(void) {}
[ 0, 0 ]
Linux Kernel
arch/riscv/include/asm/alternative.h
static inline void apply_module_alternatives(void *start, size_t length) {} #endif
[ 0, 0 ]
Linux Kernel
arch/riscv/include/asm/atomic.h
static __always_inline s64 arch_atomic64_read(const atomic64_t *v) { return READ_ONCE(v->counter); }
[ 0, 0 ]
Linux Kernel
arch/riscv/include/asm/atomic.h
static __always_inline void arch_atomic64_set(atomic64_t *v, s64 i) { WRITE_ONCE(v->counter, i); } #endif #define ATOMIC_OP(op, asm_op, I, asm_type, c_type, prefix) \ static __always_inline void arch_atomic##prefix##_##op( \ c_type i, atomic##prefix##_t *v) { ...
[ 0, 0 ]
Linux Kernel
arch/riscv/include/asm/atomic.h
static __always_inline bool arch_atomic_inc_unless_negative(atomic_t *v) { int prev, rc; __asm__ __volatile__("0: lr.w %[p], %[c]\n" " bltz %[p], 1f\n" " addi %[rc], %[p], 1\n" " sc.w.rl %[rc], %[rc], %[c]\n" ...
[ 0, 0 ]
Linux Kernel
arch/riscv/include/asm/bitops.h
static inline int test_and_change_bit(int nr, volatile unsigned long *addr) { return __test_and_op_bit(xor, __NOP, nr, addr); }
[ 0, 0 ]
Linux Kernel
arch/riscv/include/asm/bitops.h
static inline void change_bit(int nr, volatile unsigned long *addr) { __op_bit(xor, __NOP, nr, addr); }
[ 0, 0 ]
Linux Kernel
arch/riscv/include/asm/cacheflush.h
static inline void flush_dcache_page(struct page *page) { if (test_bit(PG_dcache_clean, &page->flags)) clear_bit(PG_dcache_clean, &page->flags); } #define ARCH_IMPLEMENTS_FLUSH_DCACHE_PAGE 1 #define flush_icache_range(start, end) flush_icache_all() #define flush_icache_user_page(vma, pg, addr, len) ...
[ 0, 0 ]
Linux Kernel
arch/riscv/include/asm/efi.h
static inline unsigned long efi_get_max_initrd_addr(unsigned long image_addr) { return ULONG_MAX; }
[ 0, 0 ]
Linux Kernel
arch/riscv/include/asm/irqflags.h
static inline void arch_local_irq_enable(void) { csr_set(CSR_STATUS, SR_IE); }
[ 0, 0 ]
Linux Kernel
arch/riscv/include/asm/kfence.h
static inline bool kfence_protect_page(unsigned long addr, bool protect) { pte_t *pte = virt_to_kpte(addr); if (protect) set_pte(pte, __pte(pte_val(*pte) & ~_PAGE_PRESENT)); else set_pte(pte, __pte(pte_val(*pte) | _PAGE_PRESENT)); flush_tlb_kernel_range(addr, addr + PAGE_SIZE); return true; }
[ 0, 0 ]
Linux Kernel
arch/riscv/include/asm/kvm_host.h
static inline void kvm_arch_sched_in(struct kvm_vcpu *vcpu, int cpu) {} #define KVM_ARCH_WANT_MMU_NOTIFIER #define KVM_RISCV_GSTAGE_TLB_MIN_ORDER 12
[ 0, 0 ]
Linux Kernel
arch/riscv/include/asm/kvm_vcpu_fp.h
static inline void kvm_riscv_vcpu_fp_reset(struct kvm_vcpu *vcpu) {}
[ 0, 0 ]
Linux Kernel
arch/riscv/include/asm/mmu_context.h
static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next) { switch_mm(prev, next, NULL); }
[ 0, 0 ]
Linux Kernel
arch/riscv/include/asm/module.h
static inline struct got_entry emit_got_entry(unsigned long val) { return (struct got_entry){val}; }
[ 0, 0 ]
Linux Kernel
arch/riscv/include/asm/module.h
static inline int get_got_plt_idx(unsigned long val, const struct mod_section *sec) { struct got_entry *got_plt = (struct got_entry *)sec->shdr->sh_addr; int i; for (i = 0; i < sec->num_entries; i++) { if (got_plt[i].symbol_addr == val) return i; } return -1; }
[ 0, 0 ]
Linux Kernel
arch/riscv/include/asm/module.h
static inline struct plt_entry * get_plt_entry(unsigned long val, const struct mod_section *sec_plt, const struct mod_section *sec_got_plt) { struct plt_entry *plt = (struct plt_entry *)sec_plt->shdr->sh_addr; int got_plt_idx = get_got_plt_idx(val, sec_got_plt); if (got_plt_idx >= 0) return plt...
[ 0, 0 ]
Linux Kernel
arch/riscv/include/asm/pgalloc.h
static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, pte_t *pte) { unsigned long pfn = virt_to_pfn(pte); set_pmd(pmd, __pmd((pfn << _PAGE_PFN_SHIFT) | _PAGE_TABLE)); }
[ 1, 0 ]
Linux Kernel
arch/riscv/include/asm/pgalloc.h
static inline void p4d_populate(struct mm_struct *mm, p4d_t *p4d, pud_t *pud) { if (pgtable_l4_enabled) { unsigned long pfn = virt_to_pfn(pud); set_p4d(p4d, __p4d((pfn << _PAGE_PFN_SHIFT) | _PAGE_TABLE)); } }
[ 1, 0 ]
Linux Kernel
arch/riscv/include/asm/pgalloc.h
static inline void pgd_populate(struct mm_struct *mm, pgd_t *pgd, p4d_t *p4d) { if (pgtable_l5_enabled) { unsigned long pfn = virt_to_pfn(p4d); set_pgd(pgd, __pgd((pfn << _PAGE_PFN_SHIFT) | _PAGE_TABLE)); } }
[ 1, 0 ]
Linux Kernel
arch/riscv/include/asm/pgalloc.h
static inline void pgd_populate_safe(struct mm_struct *mm, pgd_t *pgd, p4d_t *p4d) { if (pgtable_l5_enabled) { unsigned long pfn = virt_to_pfn(p4d); set_pgd_safe(pgd, __pgd((pfn << _PAGE_PFN_SHIFT) | _PAGE_TABLE)); } }
[ 1, 0 ]
Linux Kernel
arch/riscv/include/asm/pgalloc.h
static inline void p4d_free(struct mm_struct *mm, p4d_t *p4d) { if (pgtable_l5_enabled) __p4d_free(mm, p4d); }
[ 0, 0 ]
Linux Kernel
arch/riscv/include/asm/pgalloc.h
static inline pgd_t *pgd_alloc(struct mm_struct *mm) { pgd_t *pgd; pgd = (pgd_t *)__get_free_page(GFP_KERNEL); if (likely(pgd != NULL)) { memset(pgd, 0, USER_PTRS_PER_PGD * sizeof(pgd_t)); sync_kernel_mappings(pgd); } return pgd; } #ifndef __PAGETABLE_PMD_FOLDED #define __pmd_free_tlb(tlb, pmd, ad...
[ 1, 0 ]
Linux Kernel
arch/riscv/include/asm/pgtable-64.h
static inline void set_pud(pud_t *pudp, pud_t pud) { *pudp = pud; }
[ 0, 0 ]
Linux Kernel
arch/riscv/include/asm/pgtable-64.h
static inline unsigned long _pud_pfn(pud_t pud) { return __page_val_to_pfn(pud_val(pud)); }
[ 0, 0 ]
Linux Kernel
arch/riscv/include/asm/pgtable-64.h
static inline bool mm_pud_folded(struct mm_struct *mm) { if (pgtable_l4_enabled) return false; return true; }
[ 0, 0 ]
Linux Kernel
arch/riscv/include/asm/pgtable-64.h
static inline void set_p4d(p4d_t *p4dp, p4d_t p4d) { if (pgtable_l4_enabled) *p4dp = p4d; else set_pud((pud_t *)p4dp, (pud_t){p4d_val(p4d)}); }
[ 0, 0 ]
Linux Kernel
arch/riscv/include/asm/pgtable-64.h
static inline int p4d_present(p4d_t p4d) { if (pgtable_l4_enabled) return (p4d_val(p4d) & _PAGE_PRESENT); return 1; }
[ 0, 0 ]
Linux Kernel
arch/riscv/include/asm/pgtable-64.h
static inline pud_t *p4d_pgtable(p4d_t p4d) { if (pgtable_l4_enabled) return (pud_t *)pfn_to_virt(__page_val_to_pfn(p4d_val(p4d))); return (pud_t *)pud_pgtable((pud_t){p4d_val(p4d)}); }
[ 0, 0 ]
Linux Kernel
arch/riscv/include/asm/pgtable-64.h
static inline int pgd_bad(pgd_t pgd) { if (pgtable_l5_enabled) return !pgd_present(pgd); return 0; }
[ 0, 0 ]
Linux Kernel
arch/riscv/include/asm/pgtable-64.h
static inline void pgd_clear(pgd_t *pgd) { if (pgtable_l5_enabled) set_pgd(pgd, __pgd(0)); }
[ 0, 0 ]
Linux Kernel
arch/riscv/include/asm/pgtable-64.h
static inline p4d_t *pgd_pgtable(pgd_t pgd) { if (pgtable_l5_enabled) return (p4d_t *)pfn_to_virt(__page_val_to_pfn(pgd_val(pgd))); return (p4d_t *)p4d_pgtable((p4d_t){pgd_val(pgd)}); }
[ 0, 0 ]
Linux Kernel
arch/riscv/include/asm/pgtable.h
static inline int pmd_present(pmd_t pmd) { return (pmd_val(pmd) & (_PAGE_PRESENT | _PAGE_PROT_NONE | _PAGE_LEAF)); }
[ 0, 0 ]
Linux Kernel
arch/riscv/include/asm/pgtable.h
static inline void set_pmd(pmd_t *pmdp, pmd_t pmd) { *pmdp = pmd; }
[ 0, 0 ]
Linux Kernel
arch/riscv/include/asm/pgtable.h
static inline void pmd_clear(pmd_t *pmdp) { set_pmd(pmdp, __pmd(0)); }
[ 0, 0 ]
Linux Kernel
arch/riscv/include/asm/pgtable.h
static inline pgd_t pfn_pgd(unsigned long pfn, pgprot_t prot) { unsigned long prot_val = pgprot_val(prot); ALT_THEAD_PMA(prot_val); return __pgd((pfn << _PAGE_PFN_SHIFT) | prot_val); }
[ 1, 0 ]
Linux Kernel
arch/riscv/include/asm/pgtable.h
static inline unsigned long pmd_page_vaddr(pmd_t pmd) { return (unsigned long)pfn_to_virt(__page_val_to_pfn(pmd_val(pmd))); }
[ 0, 0 ]
Linux Kernel
arch/riscv/include/asm/pgtable.h
static inline unsigned long pte_pfn(pte_t pte) { return __page_val_to_pfn(pte_val(pte)); }
[ 0, 0 ]
Linux Kernel
arch/riscv/include/asm/pgtable.h
static inline int pte_none(pte_t pte) { return (pte_val(pte) == 0); }
[ 0, 0 ]
Linux Kernel
arch/riscv/include/asm/pgtable.h
static inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_WRITE; }
[ 0, 0 ]
Linux Kernel
arch/riscv/include/asm/pgtable.h
static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; }
[ 0, 0 ]
Linux Kernel
arch/riscv/include/asm/pgtable.h
static inline int pte_special(pte_t pte) { return pte_val(pte) & _PAGE_SPECIAL; }
[ 0, 0 ]