Home
last modified time | relevance | path

Searched refs:regno (Results 1 – 25 of 37) sorted by relevance

12

/arch/m68k/kernel/
Dptrace.c75 static inline long get_reg(struct task_struct *task, int regno) in get_reg() argument
79 if (regno == PT_USP) in get_reg()
81 else if (regno < ARRAY_SIZE(regoff)) in get_reg()
82 addr = (unsigned long *)(task->thread.esp0 + regoff[regno]); in get_reg()
86 if (regno == PT_SR || regno == PT_PC) { in get_reg()
90 if (regno == PT_SR) in get_reg()
99 static inline int put_reg(struct task_struct *task, int regno, in put_reg() argument
104 if (regno == PT_USP) in put_reg()
106 else if (regno < ARRAY_SIZE(regoff)) in put_reg()
107 addr = (unsigned long *)(task->thread.esp0 + regoff[regno]); in put_reg()
[all …]
/arch/mips/kernel/
Dkgdb.c130 int dbg_set_reg(int regno, void *mem, struct pt_regs *regs) in dbg_set_reg() argument
134 if (regno < 0 || regno >= DBG_MAX_REG_NUM) in dbg_set_reg()
137 if (dbg_reg_def[regno].offset != -1 && regno < 38) { in dbg_set_reg()
138 memcpy((void *)regs + dbg_reg_def[regno].offset, mem, in dbg_set_reg()
139 dbg_reg_def[regno].size); in dbg_set_reg()
140 } else if (current && dbg_reg_def[regno].offset != -1 && regno < 72) { in dbg_set_reg()
144 if (regno == 70) { in dbg_set_reg()
147 dbg_reg_def[regno].size); in dbg_set_reg()
149 } else if (regno == 71) { in dbg_set_reg()
153 fp_reg = dbg_reg_def[regno].offset; in dbg_set_reg()
[all …]
/arch/nios2/kernel/
Dkgdb.c71 char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs) in dbg_get_reg() argument
73 if (regno >= DBG_MAX_REG_NUM || regno < 0) in dbg_get_reg()
76 if (dbg_reg_def[regno].offset != -1) in dbg_get_reg()
77 memcpy(mem, (void *)regs + dbg_reg_def[regno].offset, in dbg_get_reg()
78 dbg_reg_def[regno].size); in dbg_get_reg()
80 memset(mem, 0, dbg_reg_def[regno].size); in dbg_get_reg()
82 return dbg_reg_def[regno].name; in dbg_get_reg()
85 int dbg_set_reg(int regno, void *mem, struct pt_regs *regs) in dbg_set_reg() argument
87 if (regno >= DBG_MAX_REG_NUM || regno < 0) in dbg_set_reg()
90 if (dbg_reg_def[regno].offset != -1) in dbg_set_reg()
[all …]
/arch/arm/kernel/
Dkgdb.c51 char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs) in dbg_get_reg() argument
53 if (regno >= DBG_MAX_REG_NUM || regno < 0) in dbg_get_reg()
56 if (dbg_reg_def[regno].offset != -1) in dbg_get_reg()
57 memcpy(mem, (void *)regs + dbg_reg_def[regno].offset, in dbg_get_reg()
58 dbg_reg_def[regno].size); in dbg_get_reg()
60 memset(mem, 0, dbg_reg_def[regno].size); in dbg_get_reg()
61 return dbg_reg_def[regno].name; in dbg_get_reg()
64 int dbg_set_reg(int regno, void *mem, struct pt_regs *regs) in dbg_set_reg() argument
66 if (regno >= DBG_MAX_REG_NUM || regno < 0) in dbg_set_reg()
69 if (dbg_reg_def[regno].offset != -1) in dbg_set_reg()
[all …]
/arch/arc/kernel/
Dkgdb.c17 int regno; in to_gdb_regs() local
19 for (regno = 0; regno <= 26; regno++) in to_gdb_regs()
20 gdb_regs[_R0 + regno] = get_reg(regno, kernel_regs, cregs); in to_gdb_regs()
22 for (regno = 27; regno < GDB_MAX_REGS; regno++) in to_gdb_regs()
23 gdb_regs[regno] = 0; in to_gdb_regs()
40 int regno; in from_gdb_regs() local
42 for (regno = 0; regno <= 26; regno++) in from_gdb_regs()
43 set_reg(regno, gdb_regs[regno + _R0], kernel_regs, cregs); in from_gdb_regs()
/arch/powerpc/kernel/
Dkgdb.c319 char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs) in dbg_get_reg() argument
321 if (regno >= DBG_MAX_REG_NUM || regno < 0) in dbg_get_reg()
324 if (regno < 32 || regno >= 64) in dbg_get_reg()
327 memcpy(mem, (void *)regs + dbg_reg_def[regno].offset, in dbg_get_reg()
328 dbg_reg_def[regno].size); in dbg_get_reg()
330 if (regno >= 32 && regno < 64) { in dbg_get_reg()
334 memcpy(mem, &current->thread.evr[regno-32], in dbg_get_reg()
335 dbg_reg_def[regno].size); in dbg_get_reg()
338 memset(mem, 0, dbg_reg_def[regno].size); in dbg_get_reg()
342 return dbg_reg_def[regno].name; in dbg_get_reg()
[all …]
/arch/arm64/kernel/
Dkgdb.c104 char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs) in dbg_get_reg() argument
106 if (regno >= DBG_MAX_REG_NUM || regno < 0) in dbg_get_reg()
109 if (dbg_reg_def[regno].offset != -1) in dbg_get_reg()
110 memcpy(mem, (void *)regs + dbg_reg_def[regno].offset, in dbg_get_reg()
111 dbg_reg_def[regno].size); in dbg_get_reg()
113 memset(mem, 0, dbg_reg_def[regno].size); in dbg_get_reg()
114 return dbg_reg_def[regno].name; in dbg_get_reg()
117 int dbg_set_reg(int regno, void *mem, struct pt_regs *regs) in dbg_set_reg() argument
119 if (regno >= DBG_MAX_REG_NUM || regno < 0) in dbg_set_reg()
122 if (dbg_reg_def[regno].offset != -1) in dbg_set_reg()
[all …]
/arch/powerpc/kernel/vdso/
Dsigtramp32.S53 #define rsave(regno, ofs) \ argument
55 .uleb128 regno; /* regno */ \
69 #define vsave_msr0(regno) \ argument
71 .uleb128 regno + 77; /* regno */ \
74 .byte 0x30 + regno; /* DW_OP_lit0 */ \
99 #define vsave_msr1(regno) \ argument
101 .uleb128 regno + 77; /* regno */ \
104 .byte 0x30 + regno; /* DW_OP_lit n */ \
110 #define vsave_msr2(regno, ofs) \ argument
112 .uleb128 regno + 77; /* regno */ \
[all …]
Dsigtramp64.S58 #define rsave(regno, ofs) \ argument
60 .uleb128 regno; /* regno */ \
74 #define vsave_msr0(regno) \ argument
76 .uleb128 regno + 77; /* regno */ \
79 .byte 0x30 + regno; /* DW_OP_lit0 */ \
105 #define vsave_msr1(regno) \ argument
107 .uleb128 regno + 77; /* regno */ \
110 .byte 0x30 + regno; /* DW_OP_lit n */ \
116 #define vsave_msr2(regno, ofs) \ argument
118 .uleb128 regno + 77; /* regno */ \
[all …]
/arch/sh/kernel/
Dkgdb.c193 int dbg_set_reg(int regno, void *mem, struct pt_regs *regs) in dbg_set_reg() argument
195 if (regno < 0 || regno >= DBG_MAX_REG_NUM) in dbg_set_reg()
198 if (dbg_reg_def[regno].offset != -1) in dbg_set_reg()
199 memcpy((void *)regs + dbg_reg_def[regno].offset, mem, in dbg_set_reg()
200 dbg_reg_def[regno].size); in dbg_set_reg()
205 char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs) in dbg_get_reg() argument
207 if (regno >= DBG_MAX_REG_NUM || regno < 0) in dbg_get_reg()
210 if (dbg_reg_def[regno].size != -1) in dbg_get_reg()
211 memcpy(mem, (void *)regs + dbg_reg_def[regno].offset, in dbg_get_reg()
212 dbg_reg_def[regno].size); in dbg_get_reg()
[all …]
/arch/alpha/kernel/
Dptrace.c109 get_reg_addr(struct task_struct * task, unsigned long regno) in get_reg_addr() argument
113 if (regno == 30) { in get_reg_addr()
115 } else if (regno == 65) { in get_reg_addr()
117 } else if (regno == 31 || regno > 65) { in get_reg_addr()
121 addr = task_stack_page(task) + regoff[regno]; in get_reg_addr()
130 get_reg(struct task_struct * task, unsigned long regno) in get_reg() argument
133 if (regno == 63) { in get_reg()
134 unsigned long fpcr = *get_reg_addr(task, regno); in get_reg()
140 return *get_reg_addr(task, regno); in get_reg()
147 put_reg(struct task_struct *task, unsigned long regno, unsigned long data) in put_reg() argument
[all …]
/arch/hexagon/kernel/
Dkgdb.c78 char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs) in dbg_get_reg() argument
80 if (regno >= DBG_MAX_REG_NUM || regno < 0) in dbg_get_reg()
84 dbg_reg_def[regno].offset)); in dbg_get_reg()
86 return dbg_reg_def[regno].name; in dbg_get_reg()
89 int dbg_set_reg(int regno, void *mem, struct pt_regs *regs) in dbg_set_reg() argument
91 if (regno >= DBG_MAX_REG_NUM || regno < 0) in dbg_set_reg()
94 *((unsigned long *) ((void *)regs + dbg_reg_def[regno].offset)) = in dbg_set_reg()
/arch/x86/um/
Dptrace_32.c76 int putreg(struct task_struct *child, int regno, unsigned long value) in putreg() argument
78 regno >>= 2; in putreg()
79 switch (regno) { in putreg()
119 panic("Bad register in putreg() : %d\n", regno); in putreg()
121 child->thread.regs.regs.gp[reg_offsets[regno]] = value; in putreg()
144 unsigned long getreg(struct task_struct *child, int regno) in getreg() argument
148 regno >>= 2; in getreg()
149 switch (regno) { in getreg()
171 panic("Bad register in getreg() : %d\n", regno); in getreg()
173 return mask & child->thread.regs.regs.gp[reg_offsets[regno]]; in getreg()
Dptrace_64.c54 int putreg(struct task_struct *child, int regno, unsigned long value) in putreg() argument
56 switch (regno) { in putreg()
104 panic("Bad register in putreg(): %d\n", regno); in putreg()
107 child->thread.regs.regs.gp[reg_offsets[regno >> 3]] = value; in putreg()
130 unsigned long getreg(struct task_struct *child, int regno) in getreg() argument
134 switch (regno) { in getreg()
166 panic("Bad register in getreg: %d\n", regno); in getreg()
168 return mask & child->thread.regs.regs.gp[reg_offsets[regno >> 3]]; in getreg()
/arch/riscv/kernel/
Dkgdb.c207 char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs) in dbg_get_reg() argument
209 if (regno >= DBG_MAX_REG_NUM || regno < 0) in dbg_get_reg()
212 if (dbg_reg_def[regno].offset != -1) in dbg_get_reg()
213 memcpy(mem, (void *)regs + dbg_reg_def[regno].offset, in dbg_get_reg()
214 dbg_reg_def[regno].size); in dbg_get_reg()
216 memset(mem, 0, dbg_reg_def[regno].size); in dbg_get_reg()
217 return dbg_reg_def[regno].name; in dbg_get_reg()
220 int dbg_set_reg(int regno, void *mem, struct pt_regs *regs) in dbg_set_reg() argument
222 if (regno >= DBG_MAX_REG_NUM || regno < 0) in dbg_set_reg()
225 if (dbg_reg_def[regno].offset != -1) in dbg_set_reg()
[all …]
/arch/x86/include/asm/
Ddebugreg.h21 static __always_inline unsigned long native_get_debugreg(int regno) in native_get_debugreg() argument
25 switch (regno) { in native_get_debugreg()
63 static __always_inline void native_set_debugreg(int regno, unsigned long value) in native_set_debugreg() argument
65 switch (regno) { in native_set_debugreg()
/arch/x86/kernel/
Dkgdb.c91 int dbg_set_reg(int regno, void *mem, struct pt_regs *regs) in dbg_set_reg() argument
95 regno == GDB_SS || regno == GDB_FS || regno == GDB_GS || in dbg_set_reg()
97 regno == GDB_SP || regno == GDB_ORIG_AX) in dbg_set_reg()
100 if (dbg_reg_def[regno].offset != -1) in dbg_set_reg()
101 memcpy((void *)regs + dbg_reg_def[regno].offset, mem, in dbg_set_reg()
102 dbg_reg_def[regno].size); in dbg_set_reg()
106 char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs) in dbg_get_reg() argument
108 if (regno == GDB_ORIG_AX) { in dbg_get_reg()
112 if (regno >= DBG_MAX_REG_NUM || regno < 0) in dbg_get_reg()
115 if (dbg_reg_def[regno].offset != -1) in dbg_get_reg()
[all …]
Dparavirt.c151 static noinstr unsigned long pv_native_get_debugreg(int regno) in pv_native_get_debugreg() argument
153 return native_get_debugreg(regno); in pv_native_get_debugreg()
156 static noinstr void pv_native_set_debugreg(int regno, unsigned long val) in pv_native_set_debugreg() argument
158 native_set_debugreg(regno, val); in pv_native_set_debugreg()
Dptrace.c177 static unsigned long *pt_regs_access(struct pt_regs *regs, unsigned long regno) in pt_regs_access() argument
180 return &regs->bx + (regno >> 2); in pt_regs_access()
873 static int putreg32(struct task_struct *child, unsigned regno, u32 value) in putreg32() argument
878 switch (regno) { in putreg32()
942 regno -= offsetof(struct user32, u_debugreg[0]); in putreg32()
943 return ptrace_set_debugreg(child, regno / 4, value); in putreg32()
946 if (regno > sizeof(struct user32) || (regno & 3)) in putreg32()
971 static int getreg32(struct task_struct *child, unsigned regno, u32 *val) in getreg32() argument
975 switch (regno) { in getreg32()
1001 regno -= offsetof(struct user32, u_debugreg[0]); in getreg32()
[all …]
/arch/x86/lib/
Dinsn-eval.c440 int pt_regs_offset(struct pt_regs *regs, int regno) in pt_regs_offset() argument
442 if ((unsigned)regno < ARRAY_SIZE(pt_regoff)) in pt_regs_offset()
443 return pt_regoff[regno]; in pt_regs_offset()
450 int regno = 0; in get_regno() local
461 regno = X86_MODRM_RM(insn->modrm.value); in get_regno()
467 if (!X86_MODRM_MOD(insn->modrm.value) && regno == 5) in get_regno()
471 regno += 8; in get_regno()
475 regno = X86_MODRM_REG(insn->modrm.value); in get_regno()
478 regno += 8; in get_regno()
482 regno = X86_SIB_INDEX(insn->sib.value); in get_regno()
[all …]
/arch/loongarch/kernel/
Dkgdb.c107 char *dbg_get_reg(int regno, void *mem, struct pt_regs *regs) in dbg_get_reg() argument
111 if (regno < 0 || regno >= DBG_MAX_REG_NUM) in dbg_get_reg()
114 reg_offset = dbg_reg_def[regno].offset; in dbg_get_reg()
115 reg_size = dbg_reg_def[regno].size; in dbg_get_reg()
121 if (regno <= DBG_PT_REGS_END) { in dbg_get_reg()
132 switch (regno) { in dbg_get_reg()
147 return dbg_reg_def[regno].name; in dbg_get_reg()
150 int dbg_set_reg(int regno, void *mem, struct pt_regs *regs) in dbg_set_reg() argument
154 if (regno < 0 || regno >= DBG_MAX_REG_NUM) in dbg_set_reg()
157 reg_offset = dbg_reg_def[regno].offset; in dbg_set_reg()
[all …]
/arch/um/include/asm/
Dptrace-generic.h36 extern unsigned long getreg(struct task_struct *child, int regno);
37 extern int putreg(struct task_struct *child, int regno, unsigned long value);
/arch/powerpc/kernel/ptrace/
Dptrace-view.c160 int ptrace_get_reg(struct task_struct *task, int regno, unsigned long *data) in ptrace_get_reg() argument
167 if (regno == PT_MSR) { in ptrace_get_reg()
172 if (regno == PT_DSCR) in ptrace_get_reg()
180 if (IS_ENABLED(CONFIG_PPC64) && regno == PT_SOFTE) { in ptrace_get_reg()
186 if (regno < regs_max) { in ptrace_get_reg()
187 regno = array_index_nospec(regno, regs_max); in ptrace_get_reg()
188 *data = ((unsigned long *)task->thread.regs)[regno]; in ptrace_get_reg()
198 int ptrace_put_reg(struct task_struct *task, int regno, unsigned long data) in ptrace_put_reg() argument
203 if (regno == PT_MSR) in ptrace_put_reg()
205 if (regno == PT_TRAP) in ptrace_put_reg()
[all …]
/arch/xtensa/kernel/
Dptrace.c268 static int ptrace_peekusr(struct task_struct *child, long regno, in ptrace_peekusr() argument
277 switch(regno) { in ptrace_peekusr()
279 tmp = regs->areg[regno - REG_AR_BASE]; in ptrace_peekusr()
283 tmp = regs->areg[regno - REG_A_BASE]; in ptrace_peekusr()
335 static int ptrace_pokeusr(struct task_struct *child, long regno, long val) in ptrace_pokeusr() argument
340 switch (regno) { in ptrace_pokeusr()
342 regs->areg[regno - REG_AR_BASE] = val; in ptrace_pokeusr()
346 regs->areg[regno - REG_A_BASE] = val; in ptrace_pokeusr()
/arch/parisc/kernel/vdso64/
Dsigtramp.S64 .macro rsave regno,ofs
66 .uleb128 \regno; /* regno */

12