| /linux/arch/arm64/kernel/ |
| H A D | entry-common.c | 38 static noinstr irqentry_state_t enter_from_kernel_mode(struct pt_regs *regs) in enter_from_kernel_mode() argument 42 state = irqentry_enter(regs); in enter_from_kernel_mode() 54 static void noinstr exit_to_kernel_mode(struct pt_regs *regs, in exit_to_kernel_mode() argument 58 irqentry_exit(regs, state); in exit_to_kernel_mode() 66 static __always_inline void arm64_enter_from_user_mode(struct pt_regs *regs) in arm64_enter_from_user_mode() argument 68 enter_from_user_mode(regs); in arm64_enter_from_user_mode() 78 static __always_inline void arm64_exit_to_user_mode(struct pt_regs *regs) in arm64_exit_to_user_mode() argument 81 exit_to_user_mode_prepare_legacy(regs); in arm64_exit_to_user_mode() 87 asmlinkage void noinstr asm_exit_to_user_mode(struct pt_regs *regs) in asm_exit_to_user_mode() argument 89 arm64_exit_to_user_mode(regs); in asm_exit_to_user_mode() [all …]
|
| /linux/arch/openrisc/kernel/ |
| H A D | traps.c | 43 asmlinkage void unhandled_exception(struct pt_regs *regs, int ea, int vector); 44 asmlinkage void do_trap(struct pt_regs *regs, unsigned long address); 45 asmlinkage void do_fpe_trap(struct pt_regs *regs, unsigned long address); 46 asmlinkage void do_unaligned_access(struct pt_regs *regs, unsigned long address); 47 asmlinkage void do_bus_fault(struct pt_regs *regs, unsigned long address); 48 asmlinkage void do_illegal_instruction(struct pt_regs *regs, 77 void show_registers(struct pt_regs *regs) in show_registers() argument 83 esp = (unsigned long)(regs->sp); in show_registers() 84 if (user_mode(regs)) in show_registers() 89 smp_processor_id(), regs->pc, regs->sr, regs->sp); in show_registers() [all …]
|
| /linux/arch/riscv/kernel/ |
| H A D | traps.c | 41 static int copy_code(struct pt_regs *regs, u16 *val, const u16 *insns) in copy_code() argument 45 if (!user_mode(regs)) in copy_code() 49 if (regs != task_pt_regs(current)) in copy_code() 55 static void dump_instr(const char *loglvl, struct pt_regs *regs) in dump_instr() argument 58 const u16 *insns = (u16 *)instruction_pointer(regs); in dump_instr() 64 bad = copy_code(regs, &val, &insns[i]); in dump_instr() 76 void die(struct pt_regs *regs, const char *str) in die() argument 91 if (regs) { in die() 92 show_regs(regs); in die() 93 dump_instr(KERN_EMERG, regs); in die() [all …]
|
| /linux/arch/parisc/kernel/ |
| H A D | traps.c | 60 struct pt_regs *regs, const char *loglvl); 86 static void print_gr(const char *level, struct pt_regs *regs) in print_gr() argument 93 printbinary(buf, regs->gr[0], 32); in print_gr() 97 PRINTREGS(level, regs->gr, "r", RFMT, i); in print_gr() 100 static void print_fr(const char *level, struct pt_regs *regs) in print_fr() argument 124 PRINTREGS(level, regs->fr, "fr", FFMT, i); in print_fr() 127 void show_regs(struct pt_regs *regs) in show_regs() argument 133 user = user_mode(regs); in show_regs() 138 print_gr(level, regs); in show_regs() 141 PRINTREGS(level, regs->sr, "sr", RFMT, i); in show_regs() [all …]
|
| H A D | unaligned.c | 111 static int emulate_ldh(struct pt_regs *regs, int toreg) in emulate_ldh() argument 113 unsigned long saddr = regs->ior; in emulate_ldh() 118 regs->isr, regs->ior, toreg); in emulate_ldh() 129 : "r" (saddr), "r" (regs->isr) ); in emulate_ldh() 134 regs->gr[toreg] = val; in emulate_ldh() 139 static int emulate_ldw(struct pt_regs *regs, int toreg, int flop) in emulate_ldw() argument 141 unsigned long saddr = regs->ior; in emulate_ldw() 146 regs->isr, regs->ior, toreg); in emulate_ldw() 161 : "r" (saddr), "r" (regs->isr) ); in emulate_ldw() 166 ((__u32*)(regs->fr))[toreg] = val; in emulate_ldw() [all …]
|
| /linux/arch/hexagon/kernel/ |
| H A 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 …]
|
| H A D | traps.c | 139 struct pt_regs *regs = (struct pt_regs *) (((void *)fp) in do_show_stack() local 142 if (regs->syscall_nr != -1) { in do_show_stack() 144 regs->syscall_nr); in do_show_stack() 146 pt_psp(regs), pt_elr(regs)); in do_show_stack() 152 ex_name(pt_cause(regs)), pt_cause(regs), in do_show_stack() 153 pt_badva(regs)); in do_show_stack() 156 newfp = (unsigned long *) regs->r30; in do_show_stack() 157 ip = pt_elr(regs); in do_show_stack() 180 int die(const char *str, struct pt_regs *regs, long err) in die() argument 197 if (notify_die(DIE_OOPS, str, regs, err, pt_cause(regs), SIGSEGV) == in die() [all …]
|
| /linux/arch/csky/kernel/probes/ |
| H A 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/drivers/media/tuners/ |
| H A 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/arch/mips/kernel/ |
| H A 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 …]
|
| H A 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/arch/csky/abiv2/inc/abi/ |
| H A 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/arch/sh/include/asm/ |
| H A D | syscall_32.h | 13 struct pt_regs *regs) in syscall_get_nr() argument 15 return (regs->tra >= 0) ? regs->regs[3] : -1L; in syscall_get_nr() 19 struct pt_regs *regs, in syscall_set_nr() argument 27 regs->regs[3] = nr; in syscall_set_nr() 31 struct pt_regs *regs) in syscall_rollback() argument 40 struct pt_regs *regs) in syscall_get_error() argument 42 return IS_ERR_VALUE(regs->regs[0]) ? regs->regs[0] : 0; in syscall_get_error() 46 struct pt_regs *regs) in syscall_get_return_value() argument 48 return regs->regs[0]; in syscall_get_return_value() 52 struct pt_regs *regs, in syscall_set_return_value() argument [all …]
|
| /linux/arch/sh/kernel/ |
| H A 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 …]
|
| H A D | process_32.c | 31 void show_regs(struct pt_regs * regs) in show_regs() argument 36 pr_info("PC is at %pS\n", (void *)instruction_pointer(regs)); in show_regs() 37 pr_info("PR is at %pS\n", (void *)regs->pr); in show_regs() 39 pr_info("PC : %08lx SP : %08lx SR : %08lx ", regs->pc, in show_regs() 40 regs->regs[15], regs->sr); in show_regs() 48 regs->regs[0], regs->regs[1], regs->regs[2], regs->regs[3]); in show_regs() 50 regs->regs[4], regs->regs[5], regs->regs[6], regs->regs[7]); in show_regs() 52 regs->regs[8], regs->regs[9], regs->regs[10], regs->regs[11]); in show_regs() 54 regs->regs[12], regs->regs[13], regs->regs[14]); in show_regs() 56 regs->mach, regs->macl, regs->gbr, regs->pr); in show_regs() [all …]
|
| /linux/arch/x86/um/asm/ |
| H A D | elf.h | 38 #define ELF_PLAT_INIT(regs, load_addr) do { \ argument 39 PT_REGS_BX(regs) = 0; \ 40 PT_REGS_CX(regs) = 0; \ 41 PT_REGS_DX(regs) = 0; \ 42 PT_REGS_SI(regs) = 0; \ 43 PT_REGS_DI(regs) = 0; \ 44 PT_REGS_BP(regs) = 0; \ 45 PT_REGS_AX(regs) = 0; \ 50 #define ELF_CORE_COPY_REGS(pr_reg, regs) do { \ argument 51 pr_reg[0] = PT_REGS_BX(regs); \ [all …]
|
| /linux/arch/arc/kernel/ |
| H A D | signal.c | 66 static int save_arcv2_regs(struct sigcontext __user *mctx, struct pt_regs *regs) in save_arcv2_regs() argument 72 v2abi.r30 = regs->r30; in save_arcv2_regs() 74 v2abi.r58 = regs->r58; in save_arcv2_regs() 75 v2abi.r59 = regs->r59; in save_arcv2_regs() 84 static int restore_arcv2_regs(struct sigcontext __user *mctx, struct pt_regs *regs) in restore_arcv2_regs() argument 92 regs->r30 = v2abi.r30; in restore_arcv2_regs() 94 regs->r58 = v2abi.r58; in restore_arcv2_regs() 95 regs->r59 = v2abi.r59; in restore_arcv2_regs() 102 stash_usr_regs(struct rt_sigframe __user *sf, struct pt_regs *regs, in stash_usr_regs() argument 108 uregs.scratch.bta = regs->bta; in stash_usr_regs() [all …]
|
| H A D | troubleshoot.c | 21 static noinline void print_regs_scratch(struct pt_regs *regs) in print_regs_scratch() argument 24 regs->bta, regs->sp, regs->fp, (void *)regs->blink); in print_regs_scratch() 26 regs->lp_start, regs->lp_end, regs->lp_count); in print_regs_scratch() 33 regs->r0, regs->r1, regs->r2, in print_regs_scratch() 34 regs->r3, regs->r4, regs->r5, in print_regs_scratch() 35 regs->r6, regs->r7, regs->r8, in print_regs_scratch() 36 regs->r9, regs->r10, regs->r11, in print_regs_scratch() 37 regs->r12); in print_regs_scratch() 40 static void print_regs_callee(struct callee_regs *regs) in print_regs_callee() argument 47 regs->r13, regs->r14, in print_regs_callee() [all …]
|
| /linux/drivers/media/platform/samsung/s5p-jpeg/ |
| H A 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/arch/powerpc/include/asm/ |
| H A 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/arch/x86/mm/ |
| H A D | extable.c | 16 static inline unsigned long *pt_regs_nr(struct pt_regs *regs, int nr) in pt_regs_nr() argument 18 int reg_offset = pt_regs_offset(regs, nr); in pt_regs_nr() 24 return (unsigned long *)((unsigned long)regs + reg_offset); in pt_regs_nr() 34 struct pt_regs *regs) in ex_handler_default() argument 37 regs->ax = 0; in ex_handler_default() 39 regs->dx = 0; in ex_handler_default() 41 regs->ip = ex_fixup_addr(e); in ex_handler_default() 58 struct pt_regs *regs, in ex_handler_zeropad() argument 67 len = next_ip - regs->ip; in ex_handler_zeropad() 71 if (insn_decode(&insn, (void *) regs->ip, len, INSN_MODE_KERN)) in ex_handler_zeropad() [all …]
|
| /linux/arch/x86/include/asm/ |
| H A D | syscall.h | 36 static inline int syscall_get_nr(struct task_struct *task, struct pt_regs *regs) in syscall_get_nr() argument 38 return regs->orig_ax; in syscall_get_nr() 42 struct pt_regs *regs, in syscall_set_nr() argument 45 regs->orig_ax = nr; in syscall_set_nr() 49 struct pt_regs *regs) in syscall_rollback() argument 51 regs->ax = regs->orig_ax; in syscall_rollback() 55 struct pt_regs *regs) in syscall_get_error() argument 57 unsigned long error = regs->ax; in syscall_get_error() 74 struct pt_regs *regs) in syscall_get_return_value() argument 76 return regs->ax; in syscall_get_return_value() [all …]
|
| /linux/tools/testing/selftests/powerpc/ptrace/ |
| H A 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 …]
|
| /linux/arch/loongarch/include/asm/ |
| H A D | ptrace.h | 20 unsigned long regs[32]; member 36 static __always_inline bool regs_irqs_disabled(struct pt_regs *regs) in regs_irqs_disabled() argument 38 return !(regs->csr_prmd & CSR_PRMD_PIE); 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/arch/mips/include/asm/ |
| H A D | syscall.h | 30 struct pt_regs *regs) in mips_syscall_is_indirect() argument 35 (regs->regs[2] == __NR_syscall); in mips_syscall_is_indirect() 39 struct pt_regs *regs) in syscall_get_nr() argument 45 struct pt_regs *regs, in syscall_set_nr() argument 56 task_thread_info(task)->syscall = regs->regs[2] = nr; in syscall_set_nr() 60 struct pt_regs *regs) in mips_syscall_update_nr() argument 66 if (mips_syscall_is_indirect(task, regs)) in mips_syscall_update_nr() 67 task_thread_info(task)->syscall = regs->regs[4]; in mips_syscall_update_nr() 69 task_thread_info(task)->syscall = regs->regs[2]; in mips_syscall_update_nr() 73 struct task_struct *task, struct pt_regs *regs, unsigned int n) in mips_get_syscall_arg() argument [all …]
|