/usr/src/linux-headers-5.15.0-190/arch/riscv/include/asm
NameSizeModeActions
vdso/-0755rm
alternative-macros.h46580644editdlrm
alternative.h9300644editdlrm
asm-offsets.h350644editdlrm
asm-prototypes.h10400644editdlrm
asm.h15580644editdlrm
atomic.h110280644editdlrm
barrier.h24580644editdlrm
bitops.h58090644editdlrm
bug.h21860644editdlrm
cache.h5160644editdlrm
cacheflush.h13990644editdlrm
cacheinfo.h5110644editdlrm
clint.h7970644editdlrm
clocksource.h1360644editdlrm
cmpxchg.h95370644editdlrm
cpu_ops.h14940644editdlrm
csr.h60620644editdlrm
current.h9400644editdlrm
delay.h4710644editdlrm
efi.h11500644editdlrm
elf.h27260644editdlrm
errata_list.h10740644editdlrm
fence.h2790644editdlrm
fixmap.h18060644editdlrm
ftrace.h30860644editdlrm
futex.h29060644editdlrm
gdb_xml.h56010644editdlrm
hugetlb.h3600644editdlrm
hwcap.h12450644editdlrm
image.h16730644editdlrm
io.h53220644editdlrm
irq.h3470644editdlrm
irqflags.h11750644editdlrm
irq_work.h2250644editdlrm
jump_label.h14400644editdlrm
kasan.h13900644editdlrm
Kbuild1780644editdlrm
kdebug.h1580644editdlrm
kexec.h13490644editdlrm
kfence.h13120644editdlrm
kgdb.h24940644editdlrm
kprobes.h11360644editdlrm
linkage.h2670644editdlrm
mmio.h53470644editdlrm
mmiowb.h3980644editdlrm
mmu.h6100644editdlrm
mmu_context.h8980644editdlrm
mmzone.h2660644editdlrm
module.h29840644editdlrm
module.lds.h2070644editdlrm
numa.h1650644editdlrm
page.h52640644editdlrm
parse_asm.h72650644editdlrm
patch.h3140644editdlrm
pci.h10620644editdlrm
perf_event.h22040644editdlrm
pgalloc.h18010644editdlrm
pgtable-32.h4980644editdlrm
pgtable-64.h18980644editdlrm
pgtable-bits.h15520644editdlrm
pgtable.h180860644editdlrm
probes.h5630644editdlrm
processor.h21380644editdlrm
ptdump.h3380644editdlrm
ptrace.h43040644editdlrm
sbi.h42230644editdlrm
seccomp.h5040644editdlrm
sections.h8830644editdlrm
set_memory.h18690644editdlrm
smp.h24270644editdlrm
soc.h6270644editdlrm
sparsemem.h2630644editdlrm
spinlock.h25080644editdlrm
spinlock_types.h5300644editdlrm
stackprotector.h7680644editdlrm
stacktrace.h4960644editdlrm
string.h10780644editdlrm
switch_to.h21070644editdlrm
syscall.h21630644editdlrm
thread_info.h39550644editdlrm
timex.h18590644editdlrm
tlb.h4030644editdlrm
tlbflush.h18030644editdlrm
uaccess.h139550644editdlrm
unistd.h3280644editdlrm
uprobes.h8280644editdlrm
vdso.h8680644editdlrm
vendorid_list.h1720644editdlrm
vermagic.h2130644editdlrm
vmalloc.h930644editdlrm
word-at-a-time.h11040644editdlrm
Edit: /usr/src/linux-headers-5.15.0-190/arch/riscv/include/asm/ptrace.h (4304B)
/* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (C) 2012 Regents of the University of California */ #ifndef _ASM_RISCV_PTRACE_H #define _ASM_RISCV_PTRACE_H #include #include #include #ifndef __ASSEMBLY__ struct pt_regs { unsigned long epc; unsigned long ra; unsigned long sp; unsigned long gp; unsigned long tp; unsigned long t0; unsigned long t1; unsigned long t2; unsigned long s0; unsigned long s1; unsigned long a0; unsigned long a1; unsigned long a2; unsigned long a3; unsigned long a4; unsigned long a5; unsigned long a6; unsigned long a7; unsigned long s2; unsigned long s3; unsigned long s4; unsigned long s5; unsigned long s6; unsigned long s7; unsigned long s8; unsigned long s9; unsigned long s10; unsigned long s11; unsigned long t3; unsigned long t4; unsigned long t5; unsigned long t6; /* Supervisor/Machine CSRs */ unsigned long status; unsigned long badaddr; unsigned long cause; /* a0 value before the syscall */ unsigned long orig_a0; }; #ifdef CONFIG_64BIT #define REG_FMT "%016lx" #else #define REG_FMT "%08lx" #endif #define user_mode(regs) (((regs)->status & SR_PP) == 0) #define MAX_REG_OFFSET offsetof(struct pt_regs, orig_a0) /* Helpers for working with the instruction pointer */ static inline unsigned long instruction_pointer(struct pt_regs *regs) { return regs->epc; } static inline void instruction_pointer_set(struct pt_regs *regs, unsigned long val) { regs->epc = val; } #define profile_pc(regs) instruction_pointer(regs) /* Helpers for working with the user stack pointer */ static inline unsigned long user_stack_pointer(struct pt_regs *regs) { return regs->sp; } static inline void user_stack_pointer_set(struct pt_regs *regs, unsigned long val) { regs->sp = val; } /* Valid only for Kernel mode traps. */ static inline unsigned long kernel_stack_pointer(struct pt_regs *regs) { return regs->sp; } /* Helpers for working with the frame pointer */ static inline unsigned long frame_pointer(struct pt_regs *regs) { return regs->s0; } static inline void frame_pointer_set(struct pt_regs *regs, unsigned long val) { regs->s0 = val; } static inline unsigned long regs_return_value(struct pt_regs *regs) { return regs->a0; } static inline void regs_set_return_value(struct pt_regs *regs, unsigned long val) { regs->a0 = val; } extern int regs_query_register_offset(const char *name); extern unsigned long regs_get_kernel_stack_nth(struct pt_regs *regs, unsigned int n); void prepare_ftrace_return(unsigned long *parent, unsigned long self_addr, unsigned long frame_pointer); int do_syscall_trace_enter(struct pt_regs *regs); void do_syscall_trace_exit(struct pt_regs *regs); /** * regs_get_register() - get register value from its offset * @regs: pt_regs from which register value is gotten * @offset: offset of the register. * * regs_get_register returns the value of a register whose offset from @regs. * The @offset is the offset of the register in struct pt_regs. * If @offset is bigger than MAX_REG_OFFSET, this returns 0. */ static inline unsigned long regs_get_register(struct pt_regs *regs, unsigned int offset) { if (unlikely(offset > MAX_REG_OFFSET)) return 0; return *(unsigned long *)((unsigned long)regs + offset); } /** * regs_get_kernel_argument() - get Nth function argument in kernel * @regs: pt_regs of that context * @n: function argument number (start from 0) * * regs_get_argument() returns @n th argument of the function call. * * Note you can get the parameter correctly if the function has no * more than eight arguments. */ static inline unsigned long regs_get_kernel_argument(struct pt_regs *regs, unsigned int n) { static const int nr_reg_arguments = 8; static const unsigned int argument_offs[] = { offsetof(struct pt_regs, a0), offsetof(struct pt_regs, a1), offsetof(struct pt_regs, a2), offsetof(struct pt_regs, a3), offsetof(struct pt_regs, a4), offsetof(struct pt_regs, a5), offsetof(struct pt_regs, a6), offsetof(struct pt_regs, a7), }; if (n < nr_reg_arguments) return regs_get_register(regs, argument_offs[n]); return 0; } #endif /* __ASSEMBLY__ */ #endif /* _ASM_RISCV_PTRACE_H */