diff options
author | Paul Mundt <lethal@linux-sh.org> | 2008-09-12 10:27:46 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-09-12 10:27:46 -0400 |
commit | 0e660d2d433393f983cd58fe8c54f831fa7c7713 (patch) | |
tree | d29fd22e42d6f29aa3501a19b4f5c698a31843a9 /arch/sh/kernel | |
parent | 72461997c3c66c29775afa68ca31bea16bf17f39 (diff) |
sh: Tidy up ELF core dumps.
These have been using overrides for ELF_CORE_COPY_TASK_REGS and
ELF_CORE_COPY_FPREGS while the generic versions can be used instead.
Presently the pt_regs are also duplicated across elf_core_copy_regs()
and elf_core_copy_task_regs(), this switches to simply copying out
through elf_core_copy_regs() instead.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel')
-rw-r--r-- | arch/sh/kernel/Makefile_32 | 1 | ||||
-rw-r--r-- | arch/sh/kernel/Makefile_64 | 1 | ||||
-rw-r--r-- | arch/sh/kernel/dump_task.c | 32 |
3 files changed, 0 insertions, 34 deletions
diff --git a/arch/sh/kernel/Makefile_32 b/arch/sh/kernel/Makefile_32 index 12e617beba20..8497de8afbff 100644 --- a/arch/sh/kernel/Makefile_32 +++ b/arch/sh/kernel/Makefile_32 | |||
@@ -21,7 +21,6 @@ obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o | |||
21 | obj-$(CONFIG_CRASH_DUMP) += crash_dump.o | 21 | obj-$(CONFIG_CRASH_DUMP) += crash_dump.o |
22 | obj-$(CONFIG_PM) += pm.o | 22 | obj-$(CONFIG_PM) += pm.o |
23 | obj-$(CONFIG_STACKTRACE) += stacktrace.o | 23 | obj-$(CONFIG_STACKTRACE) += stacktrace.o |
24 | obj-$(CONFIG_ELF_CORE) += dump_task.o | ||
25 | obj-$(CONFIG_IO_TRAPPED) += io_trapped.o | 24 | obj-$(CONFIG_IO_TRAPPED) += io_trapped.o |
26 | obj-$(CONFIG_KPROBES) += kprobes.o | 25 | obj-$(CONFIG_KPROBES) += kprobes.o |
27 | 26 | ||
diff --git a/arch/sh/kernel/Makefile_64 b/arch/sh/kernel/Makefile_64 index 6edf53b93d94..e987eb2e9bb5 100644 --- a/arch/sh/kernel/Makefile_64 +++ b/arch/sh/kernel/Makefile_64 | |||
@@ -17,7 +17,6 @@ obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o | |||
17 | obj-$(CONFIG_CRASH_DUMP) += crash_dump.o | 17 | obj-$(CONFIG_CRASH_DUMP) += crash_dump.o |
18 | obj-$(CONFIG_PM) += pm.o | 18 | obj-$(CONFIG_PM) += pm.o |
19 | obj-$(CONFIG_STACKTRACE) += stacktrace.o | 19 | obj-$(CONFIG_STACKTRACE) += stacktrace.o |
20 | obj-$(CONFIG_BINFMT_ELF) += dump_task.o | ||
21 | obj-$(CONFIG_IO_TRAPPED) += io_trapped.o | 20 | obj-$(CONFIG_IO_TRAPPED) += io_trapped.o |
22 | 21 | ||
23 | EXTRA_CFLAGS += -Werror | 22 | EXTRA_CFLAGS += -Werror |
diff --git a/arch/sh/kernel/dump_task.c b/arch/sh/kernel/dump_task.c deleted file mode 100644 index 1db7ce0f25d4..000000000000 --- a/arch/sh/kernel/dump_task.c +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | #include <linux/elfcore.h> | ||
2 | #include <linux/sched.h> | ||
3 | #include <asm/fpu.h> | ||
4 | |||
5 | /* | ||
6 | * Capture the user space registers if the task is not running (in user space) | ||
7 | */ | ||
8 | int dump_task_regs(struct task_struct *tsk, elf_gregset_t *regs) | ||
9 | { | ||
10 | struct pt_regs ptregs; | ||
11 | |||
12 | ptregs = *task_pt_regs(tsk); | ||
13 | elf_core_copy_regs(regs, &ptregs); | ||
14 | |||
15 | return 1; | ||
16 | } | ||
17 | |||
18 | int dump_task_fpu(struct task_struct *tsk, elf_fpregset_t *fpu) | ||
19 | { | ||
20 | int fpvalid = 0; | ||
21 | |||
22 | #if defined(CONFIG_SH_FPU) | ||
23 | fpvalid = !!tsk_used_math(tsk); | ||
24 | if (fpvalid) { | ||
25 | unlazy_fpu(tsk, task_pt_regs(tsk)); | ||
26 | memcpy(fpu, &tsk->thread.fpu.hard, sizeof(*fpu)); | ||
27 | } | ||
28 | #endif | ||
29 | |||
30 | return fpvalid; | ||
31 | } | ||
32 | |||