Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 77747
b: refs/heads/master
c: e7e0a4b
h: refs/heads/master
i:
  77745: c82e28a
  77743: 78e1772
v: v3
  • Loading branch information
Paul Mundt committed Jan 28, 2008
1 parent 51aaf1d commit 7a61ae9
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 29 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a7aa92d1b499a3ad67b36137445ecb1411a4533b
refs/heads/master: e7e0a4b54a7f225f770d313f9e042f83ece57a35
1 change: 1 addition & 0 deletions trunk/arch/sh/kernel/Makefile_32
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o
obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
obj-$(CONFIG_PM) += pm.o
obj-$(CONFIG_STACKTRACE) += stacktrace.o
obj-$(CONFIG_BINFMT_ELF) += dump_task.o

EXTRA_CFLAGS += -Werror
1 change: 1 addition & 0 deletions trunk/arch/sh/kernel/Makefile_64
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o
obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
obj-$(CONFIG_PM) += pm.o
obj-$(CONFIG_STACKTRACE) += stacktrace.o
obj-$(CONFIG_BINFMT_ELF) += dump_task.o

EXTRA_CFLAGS += -Werror
31 changes: 31 additions & 0 deletions trunk/arch/sh/kernel/dump_task.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#include <linux/elfcore.h>
#include <linux/sched.h>

/*
* Capture the user space registers if the task is not running (in user space)
*/
int dump_task_regs(struct task_struct *tsk, elf_gregset_t *regs)
{
struct pt_regs ptregs;

ptregs = *task_pt_regs(tsk);
elf_core_copy_regs(regs, &ptregs);

return 1;
}

int dump_task_fpu(struct task_struct *tsk, elf_fpregset_t *fpu)
{
int fpvalid = 0;

#if defined(CONFIG_SH_FPU)
fpvalid = !!tsk_used_math(tsk);
if (fpvalid) {
unlazy_fpu(tsk, task_pt_regs(tsk));
memcpy(fpu, &tsk->thread.fpu.hard, sizeof(*fpu));
}
#endif

return fpvalid;
}

28 changes: 0 additions & 28 deletions trunk/arch/sh/kernel/process_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,34 +230,6 @@ int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpu)
return fpvalid;
}

/*
* Capture the user space registers if the task is not running (in user space)
*/
int dump_task_regs(struct task_struct *tsk, elf_gregset_t *regs)
{
struct pt_regs ptregs;

ptregs = *task_pt_regs(tsk);
elf_core_copy_regs(regs, &ptregs);

return 1;
}

int dump_task_fpu(struct task_struct *tsk, elf_fpregset_t *fpu)
{
int fpvalid = 0;

#if defined(CONFIG_SH_FPU)
fpvalid = !!tsk_used_math(tsk);
if (fpvalid) {
unlazy_fpu(tsk, task_pt_regs(tsk));
memcpy(fpu, &tsk->thread.fpu.hard, sizeof(*fpu));
}
#endif

return fpvalid;
}

asmlinkage void ret_from_fork(void);

int copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
Expand Down

0 comments on commit 7a61ae9

Please sign in to comment.