/linux-6.6.21/arch/arm64/kernel/ |
D | entry-common.c | 38 static __always_inline void __enter_from_kernel_mode(struct pt_regs *regs) in __enter_from_kernel_mode() argument 40 regs->exit_rcu = false; in __enter_from_kernel_mode() 47 regs->exit_rcu = true; in __enter_from_kernel_mode() 56 static void noinstr enter_from_kernel_mode(struct pt_regs *regs) in enter_from_kernel_mode() argument 58 __enter_from_kernel_mode(regs); in enter_from_kernel_mode() 71 static __always_inline void __exit_to_kernel_mode(struct pt_regs *regs) in __exit_to_kernel_mode() argument 75 if (interrupts_enabled(regs)) { in __exit_to_kernel_mode() 76 if (regs->exit_rcu) { in __exit_to_kernel_mode() 86 if (regs->exit_rcu) in __exit_to_kernel_mode() 91 static void noinstr exit_to_kernel_mode(struct pt_regs *regs) in exit_to_kernel_mode() argument [all …]
|
/linux-6.6.21/arch/hexagon/kernel/ |
D | vm_events.c | 22 void show_regs(struct pt_regs *regs) in show_regs() argument 27 regs->restart_r0, regs->syscall_nr); in show_regs() 28 printk(KERN_EMERG "preds: \t\t0x%08lx\n", regs->preds); in show_regs() 30 regs->lc0, regs->sa0, regs->m0); in show_regs() 32 regs->lc1, regs->sa1, regs->m1); in show_regs() 34 regs->gp, regs->ugp, regs->usr); in show_regs() 36 regs->cs0, regs->cs1); in show_regs() 37 printk(KERN_EMERG "r0: \t0x%08lx %08lx %08lx %08lx\n", regs->r00, in show_regs() 38 regs->r01, in show_regs() 39 regs->r02, in show_regs() [all …]
|
/linux-6.6.21/arch/riscv/kernel/ |
D | traps.c | 39 static void dump_kernel_instr(const char *loglvl, struct pt_regs *regs) in dump_kernel_instr() argument 42 const u16 *insns = (u16 *)instruction_pointer(regs); in dump_kernel_instr() 60 void die(struct pt_regs *regs, const char *str) in die() argument 75 if (regs) { in die() 76 show_regs(regs); in die() 77 dump_kernel_instr(KERN_EMERG, regs); in die() 80 cause = regs ? regs->cause : -1; in die() 81 ret = notify_die(DIE_OOPS, str, regs, 0, cause, SIGSEGV); in die() 84 crash_kexec(regs); in die() 99 void do_trap(struct pt_regs *regs, int signo, int code, unsigned long addr) in do_trap() argument [all …]
|
/linux-6.6.21/arch/openrisc/kernel/ |
D | traps.c | 42 asmlinkage void unhandled_exception(struct pt_regs *regs, int ea, int vector); 43 asmlinkage void do_trap(struct pt_regs *regs, unsigned long address); 44 asmlinkage void do_fpe_trap(struct pt_regs *regs, unsigned long address); 45 asmlinkage void do_unaligned_access(struct pt_regs *regs, unsigned long address); 46 asmlinkage void do_bus_fault(struct pt_regs *regs, unsigned long address); 47 asmlinkage void do_illegal_instruction(struct pt_regs *regs, 76 void show_registers(struct pt_regs *regs) in show_registers() argument 82 esp = (unsigned long)(regs->sp); in show_registers() 83 if (user_mode(regs)) in show_registers() 88 smp_processor_id(), regs->pc, regs->sr, regs->sp, in show_registers() [all …]
|
/linux-6.6.21/arch/arm64/include/asm/ |
D | ptrace.h | 128 #define compat_usr(x) regs[(x)] 129 #define compat_fp regs[11] 130 #define compat_sp regs[13] 131 #define compat_lr regs[14] 132 #define compat_sp_hyp regs[15] 133 #define compat_lr_irq regs[16] 134 #define compat_sp_irq regs[17] 135 #define compat_lr_svc regs[18] 136 #define compat_sp_svc regs[19] 137 #define compat_lr_abt regs[20] [all …]
|
/linux-6.6.21/arch/csky/kernel/probes/ |
D | simulate-insn.c | 10 static inline bool csky_insn_reg_get_val(struct pt_regs *regs, in csky_insn_reg_get_val() argument 15 *ptr = *(®s->a0 + index); in csky_insn_reg_get_val() 18 *ptr = *(®s->exregs[0] + index - 16); in csky_insn_reg_get_val() 22 *ptr = regs->usp; in csky_insn_reg_get_val() 25 *ptr = regs->lr; in csky_insn_reg_get_val() 28 *ptr = regs->tls; in csky_insn_reg_get_val() 39 static inline bool csky_insn_reg_set_val(struct pt_regs *regs, in csky_insn_reg_set_val() argument 44 *(®s->a0 + index) = val; in csky_insn_reg_set_val() 47 *(®s->exregs[0] + index - 16) = val; in csky_insn_reg_set_val() 51 regs->usp = val; in csky_insn_reg_set_val() [all …]
|
/linux-6.6.21/arch/parisc/kernel/ |
D | traps.c | 57 struct pt_regs *regs, const char *loglvl); 83 static void print_gr(const char *level, struct pt_regs *regs) in print_gr() argument 90 printbinary(buf, regs->gr[0], 32); in print_gr() 94 PRINTREGS(level, regs->gr, "r", RFMT, i); in print_gr() 97 static void print_fr(const char *level, struct pt_regs *regs) in print_fr() argument 121 PRINTREGS(level, regs->fr, "fr", FFMT, i); in print_fr() 124 void show_regs(struct pt_regs *regs) in show_regs() argument 130 user = user_mode(regs); in show_regs() 135 print_gr(level, regs); in show_regs() 138 PRINTREGS(level, regs->sr, "sr", RFMT, i); in show_regs() [all …]
|
D | kgdb.c | 28 struct pt_regs *regs = args->regs; in __kgdb_notify() local 30 if (kgdb_handle_exception(1, args->signr, cmd, regs)) in __kgdb_notify() 63 void pt_regs_to_gdb_regs(unsigned long *gdb_regs, struct pt_regs *regs) in pt_regs_to_gdb_regs() argument 69 memcpy(gr->gpr, regs->gr, sizeof(gr->gpr)); in pt_regs_to_gdb_regs() 70 memcpy(gr->fr, regs->fr, sizeof(gr->fr)); in pt_regs_to_gdb_regs() 72 gr->sr0 = regs->sr[0]; in pt_regs_to_gdb_regs() 73 gr->sr1 = regs->sr[1]; in pt_regs_to_gdb_regs() 74 gr->sr2 = regs->sr[2]; in pt_regs_to_gdb_regs() 75 gr->sr3 = regs->sr[3]; in pt_regs_to_gdb_regs() 76 gr->sr4 = regs->sr[4]; in pt_regs_to_gdb_regs() [all …]
|
D | unaligned.c | 108 static int emulate_ldh(struct pt_regs *regs, int toreg) in emulate_ldh() argument 110 unsigned long saddr = regs->ior; in emulate_ldh() 115 regs->isr, regs->ior, toreg); in emulate_ldh() 126 : "r" (saddr), "r" (regs->isr) ); in emulate_ldh() 131 regs->gr[toreg] = val; in emulate_ldh() 136 static int emulate_ldw(struct pt_regs *regs, int toreg, int flop) in emulate_ldw() argument 138 unsigned long saddr = regs->ior; in emulate_ldw() 143 regs->isr, regs->ior, toreg); in emulate_ldw() 158 : "r" (saddr), "r" (regs->isr) ); in emulate_ldw() 163 ((__u32*)(regs->fr))[toreg] = val; in emulate_ldw() [all …]
|
/linux-6.6.21/arch/csky/abiv2/inc/abi/ |
D | elf.h | 7 #define ELF_CORE_COPY_REGS(pr_reg, regs) do { \ argument 8 pr_reg[0] = regs->pc; \ 9 pr_reg[1] = regs->a1; \ 10 pr_reg[2] = regs->a0; \ 11 pr_reg[3] = regs->sr; \ 12 pr_reg[4] = regs->a2; \ 13 pr_reg[5] = regs->a3; \ 14 pr_reg[6] = regs->regs[0]; \ 15 pr_reg[7] = regs->regs[1]; \ 16 pr_reg[8] = regs->regs[2]; \ [all …]
|
/linux-6.6.21/arch/powerpc/kernel/ |
D | traps.c | 74 int (*__debugger)(struct pt_regs *regs) __read_mostly; 75 int (*__debugger_ipi)(struct pt_regs *regs) __read_mostly; 76 int (*__debugger_bpt)(struct pt_regs *regs) __read_mostly; 77 int (*__debugger_sstep)(struct pt_regs *regs) __read_mostly; 78 int (*__debugger_iabr_match)(struct pt_regs *regs) __read_mostly; 79 int (*__debugger_break_match)(struct pt_regs *regs) __read_mostly; 80 int (*__debugger_fault_handler)(struct pt_regs *regs) __read_mostly; 181 static unsigned long oops_begin(struct pt_regs *regs) in oops_begin() argument 207 static void oops_end(unsigned long flags, struct pt_regs *regs, in oops_end() argument 225 if (TRAP(regs) == INTERRUPT_SYSTEM_RESET) in oops_end() [all …]
|
/linux-6.6.21/drivers/media/tuners/ |
D | tda18271-common.c | 57 unsigned char *regs = priv->tda18271_regs; in tda18271_dump_regs() local 60 tda_reg("ID_BYTE = 0x%02x\n", 0xff & regs[R_ID]); in tda18271_dump_regs() 61 tda_reg("THERMO_BYTE = 0x%02x\n", 0xff & regs[R_TM]); in tda18271_dump_regs() 62 tda_reg("POWER_LEVEL_BYTE = 0x%02x\n", 0xff & regs[R_PL]); in tda18271_dump_regs() 63 tda_reg("EASY_PROG_BYTE_1 = 0x%02x\n", 0xff & regs[R_EP1]); in tda18271_dump_regs() 64 tda_reg("EASY_PROG_BYTE_2 = 0x%02x\n", 0xff & regs[R_EP2]); in tda18271_dump_regs() 65 tda_reg("EASY_PROG_BYTE_3 = 0x%02x\n", 0xff & regs[R_EP3]); in tda18271_dump_regs() 66 tda_reg("EASY_PROG_BYTE_4 = 0x%02x\n", 0xff & regs[R_EP4]); in tda18271_dump_regs() 67 tda_reg("EASY_PROG_BYTE_5 = 0x%02x\n", 0xff & regs[R_EP5]); in tda18271_dump_regs() 68 tda_reg("CAL_POST_DIV_BYTE = 0x%02x\n", 0xff & regs[R_CPD]); in tda18271_dump_regs() [all …]
|
/linux-6.6.21/arch/x86/kernel/ |
D | traps.c | 94 struct pt_regs *regs, long error_code) in do_trap_no_signal() argument 96 if (v8086_mode(regs)) { in do_trap_no_signal() 102 if (!handle_vm86_trap((struct kernel_vm86_regs *) regs, in do_trap_no_signal() 106 } else if (!user_mode(regs)) { in do_trap_no_signal() 107 if (fixup_exception(regs, trapnr, error_code, 0)) in do_trap_no_signal() 112 die(str, regs, error_code); in do_trap_no_signal() 114 if (fixup_vdso_exception(regs, trapnr, error_code, 0)) in do_trap_no_signal() 135 struct pt_regs *regs, long error_code) in show_signal() argument 141 regs->ip, regs->sp, error_code); in show_signal() 142 print_vma_addr(KERN_CONT " in ", regs->ip); in show_signal() [all …]
|
/linux-6.6.21/arch/sh/kernel/ |
D | signal_32.c | 90 struct pt_regs *regs) in save_sigcontext_fpu() argument 108 unlazy_fpu(tsk, regs); in save_sigcontext_fpu() 115 restore_sigcontext(struct pt_regs *regs, struct sigcontext __user *sc, int *r0_p) in restore_sigcontext() argument 118 unsigned int sr = regs->sr & ~SR_USER_MASK; in restore_sigcontext() 120 #define COPY(x) err |= __get_user(regs->x, &sc->sc_##x) in restore_sigcontext() 121 COPY(regs[1]); in restore_sigcontext() 122 COPY(regs[2]); COPY(regs[3]); in restore_sigcontext() 123 COPY(regs[4]); COPY(regs[5]); in restore_sigcontext() 124 COPY(regs[6]); COPY(regs[7]); in restore_sigcontext() 125 COPY(regs[8]); COPY(regs[9]); in restore_sigcontext() [all …]
|
/linux-6.6.21/arch/powerpc/include/asm/ |
D | ptrace.h | 172 extern unsigned long profile_pc(struct pt_regs *regs); 174 #define profile_pc(regs) instruction_pointer(regs) argument 177 long do_syscall_trace_enter(struct pt_regs *regs); 178 void do_syscall_trace_leave(struct pt_regs *regs); 188 static inline void regs_set_return_ip(struct pt_regs *regs, unsigned long ip) in regs_set_return_ip() argument 190 regs->nip = ip; in regs_set_return_ip() 194 static inline void regs_set_return_msr(struct pt_regs *regs, unsigned long msr) in regs_set_return_msr() argument 196 regs->msr = msr; in regs_set_return_msr() 200 static inline void regs_add_return_ip(struct pt_regs *regs, long offset) in regs_add_return_ip() argument 202 regs_set_return_ip(regs, regs->nip + offset); in regs_add_return_ip() [all …]
|
/linux-6.6.21/arch/mips/kernel/ |
D | mips-r2-to-r6-emul.c | 78 static inline int mipsr6_emul(struct pt_regs *regs, u32 ir) in mipsr6_emul() argument 83 regs->regs[MIPSInst_RT(ir)] = in mipsr6_emul() 84 (s32)regs->regs[MIPSInst_RS(ir)] + in mipsr6_emul() 92 regs->regs[MIPSInst_RT(ir)] = in mipsr6_emul() 93 (s64)regs->regs[MIPSInst_RS(ir)] + in mipsr6_emul() 106 regs->regs[MIPSInst_RD(ir)] = in mipsr6_emul() 107 regs->regs[MIPSInst_RS(ir)] | in mipsr6_emul() 108 regs->regs[MIPSInst_RT(ir)]; in mipsr6_emul() 115 regs->regs[MIPSInst_RD(ir)] = in mipsr6_emul() 116 (s32)(((u32)regs->regs[MIPSInst_RT(ir)]) << in mipsr6_emul() [all …]
|
D | branch.c | 29 int __isa_exception_epc(struct pt_regs *regs) in __isa_exception_epc() argument 32 long epc = regs->cp0_epc; in __isa_exception_epc() 59 int __mm_isBranchInstr(struct pt_regs *regs, struct mm_decoded_insn dec_insn, in __mm_isBranchInstr() argument 79 regs->regs[insn.mm_i_format.rt] = in __mm_isBranchInstr() 80 regs->cp0_epc + in __mm_isBranchInstr() 83 *contpc = regs->regs[insn.mm_i_format.rs]; in __mm_isBranchInstr() 92 regs->regs[31] = regs->cp0_epc + in __mm_isBranchInstr() 97 if ((long)regs->regs[insn.mm_i_format.rs] < 0) in __mm_isBranchInstr() 98 *contpc = regs->cp0_epc + in __mm_isBranchInstr() 102 *contpc = regs->cp0_epc + in __mm_isBranchInstr() [all …]
|
/linux-6.6.21/drivers/media/platform/samsung/s5p-jpeg/ |
D | jpeg-hw-s5p.c | 17 void s5p_jpeg_reset(void __iomem *regs) in s5p_jpeg_reset() argument 21 writel(1, regs + S5P_JPG_SW_RESET); in s5p_jpeg_reset() 22 reg = readl(regs + S5P_JPG_SW_RESET); in s5p_jpeg_reset() 26 reg = readl(regs + S5P_JPG_SW_RESET); in s5p_jpeg_reset() 30 void s5p_jpeg_poweron(void __iomem *regs) in s5p_jpeg_poweron() argument 32 writel(S5P_POWER_ON, regs + S5P_JPGCLKCON); in s5p_jpeg_poweron() 35 void s5p_jpeg_input_raw_mode(void __iomem *regs, unsigned long mode) in s5p_jpeg_input_raw_mode() argument 45 reg = readl(regs + S5P_JPGCMOD); in s5p_jpeg_input_raw_mode() 48 writel(reg, regs + S5P_JPGCMOD); in s5p_jpeg_input_raw_mode() 51 void s5p_jpeg_proc_mode(void __iomem *regs, unsigned long mode) in s5p_jpeg_proc_mode() argument [all …]
|
/linux-6.6.21/arch/x86/mm/ |
D | extable.c | 15 static inline unsigned long *pt_regs_nr(struct pt_regs *regs, int nr) in pt_regs_nr() argument 17 int reg_offset = pt_regs_offset(regs, nr); in pt_regs_nr() 23 return (unsigned long *)((unsigned long)regs + reg_offset); in pt_regs_nr() 33 struct pt_regs *regs) in ex_handler_default() argument 36 regs->ax = 0; in ex_handler_default() 38 regs->dx = 0; in ex_handler_default() 40 regs->ip = ex_fixup_addr(e); in ex_handler_default() 57 struct pt_regs *regs, in ex_handler_zeropad() argument 66 len = next_ip - regs->ip; in ex_handler_zeropad() 70 if (insn_decode(&insn, (void *) regs->ip, len, INSN_MODE_KERN)) in ex_handler_zeropad() [all …]
|
/linux-6.6.21/arch/x86/um/asm/ |
D | elf.h | 36 #define ELF_PLAT_INIT(regs, load_addr) do { \ argument 37 PT_REGS_BX(regs) = 0; \ 38 PT_REGS_CX(regs) = 0; \ 39 PT_REGS_DX(regs) = 0; \ 40 PT_REGS_SI(regs) = 0; \ 41 PT_REGS_DI(regs) = 0; \ 42 PT_REGS_BP(regs) = 0; \ 43 PT_REGS_AX(regs) = 0; \ 48 #define ELF_CORE_COPY_REGS(pr_reg, regs) do { \ argument 49 pr_reg[0] = PT_REGS_BX(regs); \ [all …]
|
/linux-6.6.21/arch/arc/kernel/ |
D | signal.c | 65 static int save_arcv2_regs(struct sigcontext __user *mctx, struct pt_regs *regs) in save_arcv2_regs() argument 71 v2abi.r30 = regs->r30; in save_arcv2_regs() 73 v2abi.r58 = regs->r58; in save_arcv2_regs() 74 v2abi.r59 = regs->r59; in save_arcv2_regs() 83 static int restore_arcv2_regs(struct sigcontext __user *mctx, struct pt_regs *regs) in restore_arcv2_regs() argument 91 regs->r30 = v2abi.r30; in restore_arcv2_regs() 93 regs->r58 = v2abi.r58; in restore_arcv2_regs() 94 regs->r59 = v2abi.r59; in restore_arcv2_regs() 101 stash_usr_regs(struct rt_sigframe __user *sf, struct pt_regs *regs, in stash_usr_regs() argument 107 uregs.scratch.bta = regs->bta; in stash_usr_regs() [all …]
|
/linux-6.6.21/tools/testing/selftests/x86/ |
D | ptrace_syscall.c | 201 struct user_regs_struct regs; in test_ptrace_syscall_restart() local 208 if (ptrace(PTRACE_GETREGS, chld, 0, ®s) != 0) in test_ptrace_syscall_restart() 211 if (regs.user_syscall_nr != SYS_gettid || in test_ptrace_syscall_restart() 212 regs.user_arg0 != 10 || regs.user_arg1 != 11 || in test_ptrace_syscall_restart() 213 regs.user_arg2 != 12 || regs.user_arg3 != 13 || in test_ptrace_syscall_restart() 214 regs.user_arg4 != 14 || regs.user_arg5 != 15) { in test_ptrace_syscall_restart() 215 …regs.user_syscall_nr, (unsigned long)regs.user_arg0, (unsigned long)regs.user_arg1, (unsigned long… in test_ptrace_syscall_restart() 222 (unsigned long)regs.user_ip); in test_ptrace_syscall_restart() 230 regs.user_ax = regs.user_syscall_nr; in test_ptrace_syscall_restart() 231 regs.user_ip -= 2; in test_ptrace_syscall_restart() [all …]
|
/linux-6.6.21/arch/loongarch/include/asm/ |
D | ptrace.h | 20 unsigned long regs[32]; member 36 static inline int regs_irqs_disabled(struct pt_regs *regs) in regs_irqs_disabled() argument 38 return arch_irqs_disabled_flags(regs->csr_prmd); in regs_irqs_disabled() 41 static inline unsigned long kernel_stack_pointer(struct pt_regs *regs) in kernel_stack_pointer() argument 43 return regs->regs[3]; in kernel_stack_pointer() 51 static inline void instruction_pointer_set(struct pt_regs *regs, unsigned long val) in instruction_pointer_set() argument 53 regs->csr_era = val; in instruction_pointer_set() 69 static inline unsigned long regs_get_register(struct pt_regs *regs, unsigned int offset) in regs_get_register() argument 74 return *(unsigned long *)((unsigned long)regs + offset); in regs_get_register() 85 static inline int regs_within_kernel_stack(struct pt_regs *regs, unsigned long addr) in regs_within_kernel_stack() argument [all …]
|
/linux-6.6.21/arch/x86/entry/ |
D | common.c | 41 static __always_inline bool do_syscall_x64(struct pt_regs *regs, int nr) in do_syscall_x64() argument 51 regs->ax = sys_call_table[unr](regs); in do_syscall_x64() 57 static __always_inline bool do_syscall_x32(struct pt_regs *regs, int nr) in do_syscall_x32() argument 68 regs->ax = x32_sys_call_table[xnr](regs); in do_syscall_x32() 74 __visible noinstr void do_syscall_64(struct pt_regs *regs, int nr) in do_syscall_64() argument 77 nr = syscall_enter_from_user_mode(regs, nr); in do_syscall_64() 81 if (!do_syscall_x64(regs, nr) && !do_syscall_x32(regs, nr) && nr != -1) { in do_syscall_64() 83 regs->ax = __x64_sys_ni_syscall(regs); in do_syscall_64() 87 syscall_exit_to_user_mode(regs); in do_syscall_64() 92 static __always_inline int syscall_32_enter(struct pt_regs *regs) in syscall_32_enter() argument [all …]
|
/linux-6.6.21/tools/testing/selftests/powerpc/ptrace/ |
D | ptrace-syscall.c | 56 struct pt_regs regs; in test_ptrace_syscall_restart() local 96 if (ptrace(PTRACE_GETREGS, chld, 0, ®s) != 0) in test_ptrace_syscall_restart() 103 if (regs.user_syscall_nr != SYS_gettid || in test_ptrace_syscall_restart() 104 regs.user_arg0 != 10 || regs.user_arg1 != 11 || in test_ptrace_syscall_restart() 105 regs.user_arg2 != 12 || regs.user_arg3 != 13 || in test_ptrace_syscall_restart() 106 regs.user_arg4 != 14 || regs.user_arg5 != 15) { in test_ptrace_syscall_restart() 108 (unsigned long)regs.user_syscall_nr, in test_ptrace_syscall_restart() 109 (unsigned long)regs.user_arg0, in test_ptrace_syscall_restart() 110 (unsigned long)regs.user_arg1, in test_ptrace_syscall_restart() 111 (unsigned long)regs.user_arg2, in test_ptrace_syscall_restart() [all …]
|