Commit a3267e6f authored by David S. Miller's avatar David S. Miller

[SPARC]: Update elf coredump macros for recent threading changes.

parent 2cc0f037
......@@ -32,12 +32,10 @@ do { unsigned int *dest = &(__elf_regs[0]); \
for(i = 0; i < 16; i++) \
dest[i] = (unsigned int) src->u_regs[i];\
/* Don't try this at home kids... */ \
set_fs(USER_DS); \
sp = (unsigned int *) (src->u_regs[14] & \
0x00000000fffffffc); \
for(i = 0; i < 16; i++) \
__get_user(dest[i+16], &sp[i]); \
set_fs(KERNEL_DS); \
dest[32] = tstate_to_psr(src->tstate); \
dest[33] = (unsigned int) src->tpc; \
dest[34] = (unsigned int) src->tnpc; \
......
......@@ -32,11 +32,9 @@ do { unsigned long *dest = &(__elf_regs[0]); \
memcpy(&dest[0], &src->u_regs[0], \
sizeof(unsigned long) * 16); \
/* Don't try this at home kids... */ \
set_fs(USER_DS); \
sp = (unsigned long *) src->u_regs[14]; \
copy_from_user(&dest[16], sp, \
sizeof(unsigned long) * 16); \
set_fs(KERNEL_DS); \
dest[32] = src->psr; \
dest[33] = src->pc; \
dest[34] = src->npc; \
......@@ -57,6 +55,9 @@ typedef struct {
unsigned int pr_q[64];
} elf_fpregset_t;
#define ELF_CORE_COPY_TASK_REGS(__tsk, __elf_regs) \
({ ELF_CORE_COPY_REGS((*(__elf_regs)), (__tsk)->thread_info->kregs); 1; })
/*
* This is used to ensure we don't load something for the wrong architecture.
*/
......
......@@ -42,13 +42,11 @@ do { unsigned long *dest = &(__elf_regs[0]); \
for(i = 0; i < 16; i++) \
dest[i] = src->u_regs[i]; \
/* Don't try this at home kids... */ \
set_fs(USER_DS); \
sp = (unsigned long *) \
((src->u_regs[14] + STACK_BIAS) \
& 0xfffffffffffffff8UL); \
for(i = 0; i < 16; i++) \
__get_user(dest[i+16], &sp[i]); \
set_fs(KERNEL_DS); \
dest[32] = src->tstate; \
dest[33] = src->tpc; \
dest[34] = src->tnpc; \
......@@ -63,6 +61,9 @@ typedef struct {
} elf_fpregset_t;
#endif
#define ELF_CORE_COPY_TASK_REGS(__tsk, __elf_regs) \
({ ELF_CORE_COPY_REGS((*(__elf_regs)), (__tsk)->thread_info->kregs); 1; })
/*
* This is used to ensure we don't load something for the wrong architecture.
*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment