summaryrefslogtreecommitdiffstats
path: root/include/asm-sparc64
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-07 19:21:26 +0100
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-07 19:21:26 +0100
commit0afc2edfada50980bec999f94dcea26ebad3dda6 (patch)
tree8963dd8fd78ee5c3481acad5903bc459bd3d055c /include/asm-sparc64
parentMerge git://git.infradead.org/mtd-2.6 (diff)
parent[SPARC32]: Use regsets in arch_ptrace(). (diff)
downloadlinux-0afc2edfada50980bec999f94dcea26ebad3dda6.tar.xz
linux-0afc2edfada50980bec999f94dcea26ebad3dda6.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6: [SPARC32]: Use regsets in arch_ptrace(). [SPARC64]: Use regsets in arch_ptrace(). [SPARC32]: Use regsets for ELF core dumping. [SPARC64]: Use regsets for ELF core dumping. [SPARC64]: Remove unintentional ptrace debugging messages. [SPARC]: Move over to arch_ptrace(). [SPARC]: Remove PTRACE_SUN* handling. [SPARC]: Kill DEBUG_PTRACE code. [SPARC32]: Add user regset support. [SPARC64]: Add user regsets. [SPARC64]: Fix booting on non-zero cpu.
Diffstat (limited to 'include/asm-sparc64')
-rw-r--r--include/asm-sparc64/elf.h30
-rw-r--r--include/asm-sparc64/ptrace.h18
2 files changed, 5 insertions, 43 deletions
diff --git a/include/asm-sparc64/elf.h b/include/asm-sparc64/elf.h
index dc7bc63e507e..272a65873f2e 100644
--- a/include/asm-sparc64/elf.h
+++ b/include/asm-sparc64/elf.h
@@ -70,6 +70,8 @@
#define HWCAP_SPARC_BLKINIT 64
#define HWCAP_SPARC_N2 128
+#define CORE_DUMP_USE_REGSET
+
/*
* These are used to set parameters in the core dumps.
*/
@@ -78,10 +80,6 @@
#define ELF_CLASS ELFCLASS64
#define ELF_DATA ELFDATA2MSB
-typedef unsigned long elf_greg_t;
-
-#define ELF_NGREG 36
-typedef elf_greg_t elf_gregset_t[ELF_NGREG];
/* Format of 64-bit elf_gregset_t is:
* G0 --> G7
* O0 --> O7
@@ -92,24 +90,9 @@ typedef elf_greg_t elf_gregset_t[ELF_NGREG];
* TNPC
* Y
*/
-#define ELF_CORE_COPY_REGS(__elf_regs, __pt_regs) \
-do { unsigned long *dest = &(__elf_regs[0]); \
- struct pt_regs *src = (__pt_regs); \
- unsigned long __user *sp; \
- int i; \
- for(i = 0; i < 16; i++) \
- dest[i] = src->u_regs[i]; \
- /* Don't try this at home kids... */ \
- sp = (unsigned long __user *) \
- ((src->u_regs[14] + STACK_BIAS) \
- & 0xfffffffffffffff8UL); \
- for(i = 0; i < 16; i++) \
- __get_user(dest[i+16], &sp[i]); \
- dest[32] = src->tstate; \
- dest[33] = src->tpc; \
- dest[34] = src->tnpc; \
- dest[35] = src->y; \
-} while (0);
+typedef unsigned long elf_greg_t;
+#define ELF_NGREG 36
+typedef elf_greg_t elf_gregset_t[ELF_NGREG];
typedef struct {
unsigned long pr_regs[32];
@@ -119,9 +102,6 @@ typedef struct {
} elf_fpregset_t;
#endif
-#define ELF_CORE_COPY_TASK_REGS(__tsk, __elf_regs) \
- ({ ELF_CORE_COPY_REGS((*(__elf_regs)), task_pt_regs(__tsk)); 1; })
-
/*
* This is used to ensure we don't load something for the wrong architecture.
*/
diff --git a/include/asm-sparc64/ptrace.h b/include/asm-sparc64/ptrace.h
index 7eba90c6c753..734a767f0a4e 100644
--- a/include/asm-sparc64/ptrace.h
+++ b/include/asm-sparc64/ptrace.h
@@ -95,8 +95,6 @@ struct sparc_trapf {
#ifdef __KERNEL__
-#define __ARCH_SYS_PTRACE 1
-
#define force_successful_syscall_return() \
do { current_thread_info()->syscall_noerror = 1; \
} while (0)
@@ -261,8 +259,6 @@ extern void show_regs(struct pt_regs *);
#define SF_XXARG 0x5c
/* Stuff for the ptrace system call */
-#define PTRACE_SUNATTACH 10
-#define PTRACE_SUNDETACH 11
#define PTRACE_GETREGS 12
#define PTRACE_SETREGS 13
#define PTRACE_GETFPREGS 14
@@ -284,18 +280,4 @@ extern void show_regs(struct pt_regs *);
#define PTRACE_GETFPREGS64 25
#define PTRACE_SETFPREGS64 26
-#define PTRACE_GETUCODE 29 /* stupid bsd-ism */
-
-/* These are for 32-bit processes debugging 64-bit ones.
- * Here addr and addr2 are passed in %g2 and %g3 respectively.
- */
-#define PTRACE_PEEKTEXT64 (30 + PTRACE_PEEKTEXT)
-#define PTRACE_POKETEXT64 (30 + PTRACE_POKETEXT)
-#define PTRACE_PEEKDATA64 (30 + PTRACE_PEEKDATA)
-#define PTRACE_POKEDATA64 (30 + PTRACE_POKEDATA)
-#define PTRACE_READDATA64 (30 + PTRACE_READDATA)
-#define PTRACE_WRITEDATA64 (30 + PTRACE_WRITEDATA)
-#define PTRACE_READTEXT64 (30 + PTRACE_READTEXT)
-#define PTRACE_WRITETEXT64 (30 + PTRACE_WRITETEXT)
-
#endif /* !(_SPARC64_PTRACE_H) */