aboutsummaryrefslogtreecommitdiffstats
path: root/arch/tile/kernel/kgdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/tile/kernel/kgdb.c')
-rw-r--r--arch/tile/kernel/kgdb.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/tile/kernel/kgdb.c b/arch/tile/kernel/kgdb.c
index 4cd88381a83e..ff5335ae050d 100644
--- a/arch/tile/kernel/kgdb.c
+++ b/arch/tile/kernel/kgdb.c
@@ -125,9 +125,7 @@ int dbg_set_reg(int regno, void *mem, struct pt_regs *regs)
125void 125void
126sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *task) 126sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *task)
127{ 127{
128 int reg;
129 struct pt_regs *thread_regs; 128 struct pt_regs *thread_regs;
130 unsigned long *ptr = gdb_regs;
131 129
132 if (task == NULL) 130 if (task == NULL)
133 return; 131 return;
@@ -136,9 +134,7 @@ sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *task)
136 memset(gdb_regs, 0, NUMREGBYTES); 134 memset(gdb_regs, 0, NUMREGBYTES);
137 135
138 thread_regs = task_pt_regs(task); 136 thread_regs = task_pt_regs(task);
139 for (reg = 0; reg <= TREG_LAST_GPR; reg++) 137 memcpy(gdb_regs, thread_regs, TREG_LAST_GPR * sizeof(unsigned long));
140 *(ptr++) = thread_regs->regs[reg];
141
142 gdb_regs[TILEGX_PC_REGNUM] = thread_regs->pc; 138 gdb_regs[TILEGX_PC_REGNUM] = thread_regs->pc;
143 gdb_regs[TILEGX_FAULTNUM_REGNUM] = thread_regs->faultnum; 139 gdb_regs[TILEGX_FAULTNUM_REGNUM] = thread_regs->faultnum;
144} 140}