summaryrefslogtreecommitdiffstats
path: root/arch/sparc64
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-02-07 04:19:34 -0800
committerDavid S. Miller <davem@davemloft.net>2008-02-07 04:19:34 -0800
commit3389742f3c346d9ef5fb46e7baa04972bdd6d151 (patch)
tree31224496b6ba2debfe85e7a098639fee26c512e1 /arch/sparc64
parente72d71c405ef581595ec64091be9f2fda0a726a9 (diff)
[SPARC64]: Use regsets for ELF core dumping.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64')
-rw-r--r--arch/sparc64/kernel/binfmt_elf32.c31
1 files changed, 4 insertions, 27 deletions
diff --git a/arch/sparc64/kernel/binfmt_elf32.c b/arch/sparc64/kernel/binfmt_elf32.c
index 1587a29a4b0..d141300e76b 100644
--- a/arch/sparc64/kernel/binfmt_elf32.c
+++ b/arch/sparc64/kernel/binfmt_elf32.c
@@ -1,7 +1,7 @@
/*
* binfmt_elf32.c: Support 32-bit Sparc ELF binaries on Ultra.
*
- * Copyright (C) 1995, 1996, 1997, 1998 David S. Miller (davem@davemloft.net)
+ * Copyright (C) 1995, 1996, 1997, 1998, 2008 David S. Miller (davem@davemloft.net)
* Copyright (C) 1995, 1996, 1997, 1998 Jakub Jelinek (jj@ultra.linux.cz)
*/
@@ -9,13 +9,6 @@
#define ELF_CLASS ELFCLASS32
#define ELF_DATA ELFDATA2MSB;
-/* For the most part we present code dumps in the format
- * Solaris does.
- */
-typedef unsigned int elf_greg_t;
-#define ELF_NGREG 38
-typedef elf_greg_t elf_gregset_t[ELF_NGREG];
-
/* Format is:
* G0 --> G7
* O0 --> O7
@@ -23,25 +16,9 @@ typedef elf_greg_t elf_gregset_t[ELF_NGREG];
* I0 --> I7
* PSR, PC, nPC, Y, WIM, TBR
*/
-#include <asm/psrcompat.h>
-#define ELF_CORE_COPY_REGS(__elf_regs, __pt_regs) \
-do { unsigned int *dest = &(__elf_regs[0]); \
- struct pt_regs *src = (__pt_regs); \
- unsigned int __user *sp; \
- int i; \
- for(i = 0; i < 16; i++) \
- dest[i] = (unsigned int) src->u_regs[i];\
- /* Don't try this at home kids... */ \
- sp = (unsigned int __user *) (src->u_regs[14] & \
- 0x00000000fffffffc); \
- for(i = 0; i < 16; i++) \
- __get_user(dest[i+16], &sp[i]); \
- dest[32] = tstate_to_psr(src->tstate); \
- dest[33] = (unsigned int) src->tpc; \
- dest[34] = (unsigned int) src->tnpc; \
- dest[35] = src->y; \
- dest[36] = dest[37] = 0; /* XXX */ \
-} while(0);
+typedef unsigned int elf_greg_t;
+#define ELF_NGREG 38
+typedef elf_greg_t elf_gregset_t[ELF_NGREG];
typedef struct {
union {