aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sparc64
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-sparc64')
-rw-r--r--include/asm-sparc64/elf.h30
1 files changed, 5 insertions, 25 deletions
diff --git a/include/asm-sparc64/elf.h b/include/asm-sparc64/elf.h
index 8653e8665009..217d768cf7dd 100644
--- a/include/asm-sparc64/elf.h
+++ b/include/asm-sparc64/elf.h
@@ -72,6 +72,8 @@
72#define HWCAP_SPARC_BLKINIT 64 72#define HWCAP_SPARC_BLKINIT 64
73#define HWCAP_SPARC_N2 128 73#define HWCAP_SPARC_N2 128
74 74
75#define CORE_DUMP_USE_REGSET
76
75/* 77/*
76 * These are used to set parameters in the core dumps. 78 * These are used to set parameters in the core dumps.
77 */ 79 */
@@ -80,10 +82,6 @@
80#define ELF_CLASS ELFCLASS64 82#define ELF_CLASS ELFCLASS64
81#define ELF_DATA ELFDATA2MSB 83#define ELF_DATA ELFDATA2MSB
82 84
83typedef unsigned long elf_greg_t;
84
85#define ELF_NGREG 36
86typedef elf_greg_t elf_gregset_t[ELF_NGREG];
87/* Format of 64-bit elf_gregset_t is: 85/* Format of 64-bit elf_gregset_t is:
88 * G0 --> G7 86 * G0 --> G7
89 * O0 --> O7 87 * O0 --> O7
@@ -94,24 +92,9 @@ typedef elf_greg_t elf_gregset_t[ELF_NGREG];
94 * TNPC 92 * TNPC
95 * Y 93 * Y
96 */ 94 */
97#define ELF_CORE_COPY_REGS(__elf_regs, __pt_regs) \ 95typedef unsigned long elf_greg_t;
98do { unsigned long *dest = &(__elf_regs[0]); \ 96#define ELF_NGREG 36
99 struct pt_regs *src = (__pt_regs); \ 97typedef elf_greg_t elf_gregset_t[ELF_NGREG];
100 unsigned long __user *sp; \
101 int i; \
102 for(i = 0; i < 16; i++) \
103 dest[i] = src->u_regs[i]; \
104 /* Don't try this at home kids... */ \
105 sp = (unsigned long __user *) \
106 ((src->u_regs[14] + STACK_BIAS) \
107 & 0xfffffffffffffff8UL); \
108 for(i = 0; i < 16; i++) \
109 __get_user(dest[i+16], &sp[i]); \
110 dest[32] = src->tstate; \
111 dest[33] = src->tpc; \
112 dest[34] = src->tnpc; \
113 dest[35] = src->y; \
114} while (0);
115 98
116typedef struct { 99typedef struct {
117 unsigned long pr_regs[32]; 100 unsigned long pr_regs[32];
@@ -121,9 +104,6 @@ typedef struct {
121} elf_fpregset_t; 104} elf_fpregset_t;
122#endif 105#endif
123 106
124#define ELF_CORE_COPY_TASK_REGS(__tsk, __elf_regs) \
125 ({ ELF_CORE_COPY_REGS((*(__elf_regs)), task_pt_regs(__tsk)); 1; })
126
127/* 107/*
128 * This is used to ensure we don't load something for the wrong architecture. 108 * This is used to ensure we don't load something for the wrong architecture.
129 */ 109 */