aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/process.c
diff options
context:
space:
mode:
authorAlex Smith <alex@alex-smith.me.uk>2014-07-23 09:40:14 -0400
committerRalf Baechle <ralf@linux-mips.org>2014-08-01 18:06:37 -0400
commit30852ad0039b4a54b5062efd66877125e519dc30 (patch)
tree4283df5b6aefc3b0e21e74d346d1b46f2fd34e81 /arch/mips/kernel/process.c
parenta79ebea620109cf5e58711077177b34d60960898 (diff)
MIPS: Remove old core dump functions
Since the core dumper now uses regsets, the old core dump functions are now unused. Remove them. Signed-off-by: Alex Smith <alex@alex-smith.me.uk> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/7456/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/process.c')
-rw-r--r--arch/mips/kernel/process.c55
1 files changed, 0 insertions, 55 deletions
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c
index 0a1ec0f3beff..7564c371c660 100644
--- a/arch/mips/kernel/process.c
+++ b/arch/mips/kernel/process.c
@@ -152,61 +152,6 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
152 return 0; 152 return 0;
153} 153}
154 154
155/* Fill in the fpu structure for a core dump.. */
156int dump_fpu(struct pt_regs *regs, elf_fpregset_t *r)
157{
158 int i;
159
160 for (i = 0; i < NUM_FPU_REGS; i++)
161 memcpy(&r[i], &current->thread.fpu.fpr[i], sizeof(*r));
162
163 memcpy(&r[NUM_FPU_REGS], &current->thread.fpu.fcr31,
164 sizeof(current->thread.fpu.fcr31));
165
166 return 1;
167}
168
169void elf_dump_regs(elf_greg_t *gp, struct pt_regs *regs)
170{
171 int i;
172
173 for (i = 0; i < EF_R0; i++)
174 gp[i] = 0;
175 gp[EF_R0] = 0;
176 for (i = 1; i <= 31; i++)
177 gp[EF_R0 + i] = regs->regs[i];
178 gp[EF_R26] = 0;
179 gp[EF_R27] = 0;
180 gp[EF_LO] = regs->lo;
181 gp[EF_HI] = regs->hi;
182 gp[EF_CP0_EPC] = regs->cp0_epc;
183 gp[EF_CP0_BADVADDR] = regs->cp0_badvaddr;
184 gp[EF_CP0_STATUS] = regs->cp0_status;
185 gp[EF_CP0_CAUSE] = regs->cp0_cause;
186#ifdef EF_UNUSED0
187 gp[EF_UNUSED0] = 0;
188#endif
189}
190
191int dump_task_regs(struct task_struct *tsk, elf_gregset_t *regs)
192{
193 elf_dump_regs(*regs, task_pt_regs(tsk));
194 return 1;
195}
196
197int dump_task_fpu(struct task_struct *t, elf_fpregset_t *fpr)
198{
199 int i;
200
201 for (i = 0; i < NUM_FPU_REGS; i++)
202 memcpy(&fpr[i], &t->thread.fpu.fpr[i], sizeof(*fpr));
203
204 memcpy(&fpr[NUM_FPU_REGS], &t->thread.fpu.fcr31,
205 sizeof(t->thread.fpu.fcr31));
206
207 return 1;
208}
209
210#ifdef CONFIG_CC_STACKPROTECTOR 155#ifdef CONFIG_CC_STACKPROTECTOR
211#include <linux/stackprotector.h> 156#include <linux/stackprotector.h>
212unsigned long __stack_chk_guard __read_mostly; 157unsigned long __stack_chk_guard __read_mostly;