aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sparc64
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-08 12:29:39 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-08 12:29:39 -0500
commitf3aafa6c2535d36542a6dfc8647cd2fdb5999648 (patch)
tree6d0ffd38855ffe3710a05b169587438447ebebc0 /include/asm-sparc64
parent3668805a544a6229d6135a4427b8dfe7c343b61f (diff)
parent48c946a482661d8466cd24bae5df749147ff1b1d (diff)
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: [SPARC64]: Make use of the new fs/compat_binfmt_elf.c [SPARC64]: Make use of compat_sys_ptrace() Manually fixed trivial delete/modift conflict in arch/sparc64/kernel/binfmt_elf32.c
Diffstat (limited to 'include/asm-sparc64')
-rw-r--r--include/asm-sparc64/elf.h59
-rw-r--r--include/asm-sparc64/ptrace.h2
2 files changed, 53 insertions, 8 deletions
diff --git a/include/asm-sparc64/elf.h b/include/asm-sparc64/elf.h
index 272a65873f2e..11c8e68d712a 100644
--- a/include/asm-sparc64/elf.h
+++ b/include/asm-sparc64/elf.h
@@ -75,7 +75,6 @@
75/* 75/*
76 * These are used to set parameters in the core dumps. 76 * These are used to set parameters in the core dumps.
77 */ 77 */
78#ifndef ELF_ARCH
79#define ELF_ARCH EM_SPARCV9 78#define ELF_ARCH EM_SPARCV9
80#define ELF_CLASS ELFCLASS64 79#define ELF_CLASS ELFCLASS64
81#define ELF_DATA ELFDATA2MSB 80#define ELF_DATA ELFDATA2MSB
@@ -100,14 +99,59 @@ typedef struct {
100 unsigned long pr_gsr; 99 unsigned long pr_gsr;
101 unsigned long pr_fprs; 100 unsigned long pr_fprs;
102} elf_fpregset_t; 101} elf_fpregset_t;
103#endif 102
103/* Format of 32-bit elf_gregset_t is:
104 * G0 --> G7
105 * O0 --> O7
106 * L0 --> L7
107 * I0 --> I7
108 * PSR, PC, nPC, Y, WIM, TBR
109 */
110typedef unsigned int compat_elf_greg_t;
111#define COMPAT_ELF_NGREG 38
112typedef compat_elf_greg_t compat_elf_gregset_t[COMPAT_ELF_NGREG];
113
114typedef struct {
115 union {
116 unsigned int pr_regs[32];
117 unsigned long pr_dregs[16];
118 } pr_fr;
119 unsigned int __unused;
120 unsigned int pr_fsr;
121 unsigned char pr_qcnt;
122 unsigned char pr_q_entrysize;
123 unsigned char pr_en;
124 unsigned int pr_q[64];
125} compat_elf_fpregset_t;
126
127/* UltraSparc extensions. Still unused, but will be eventually. */
128typedef struct {
129 unsigned int pr_type;
130 unsigned int pr_align;
131 union {
132 struct {
133 union {
134 unsigned int pr_regs[32];
135 unsigned long pr_dregs[16];
136 long double pr_qregs[8];
137 } pr_xfr;
138 } pr_v8p;
139 unsigned int pr_xfsr;
140 unsigned int pr_fprs;
141 unsigned int pr_xg[8];
142 unsigned int pr_xo[8];
143 unsigned long pr_tstate;
144 unsigned int pr_filler[8];
145 } pr_un;
146} elf_xregset_t;
104 147
105/* 148/*
106 * This is used to ensure we don't load something for the wrong architecture. 149 * This is used to ensure we don't load something for the wrong architecture.
107 */ 150 */
108#ifndef elf_check_arch 151#define elf_check_arch(x) ((x)->e_machine == ELF_ARCH)
109#define elf_check_arch(x) ((x)->e_machine == ELF_ARCH) /* Might be EM_SPARCV9 or EM_SPARC */ 152#define compat_elf_check_arch(x) ((x)->e_machine == EM_SPARC || \
110#endif 153 (x)->e_machine == EM_SPARC32PLUS)
154#define compat_start_thread start_thread32
111 155
112#define USE_ELF_CORE_DUMP 156#define USE_ELF_CORE_DUMP
113#define ELF_EXEC_PAGESIZE PAGE_SIZE 157#define ELF_EXEC_PAGESIZE PAGE_SIZE
@@ -117,9 +161,8 @@ typedef struct {
117 the loader. We need to make sure that it is out of the way of the program 161 the loader. We need to make sure that it is out of the way of the program
118 that it will "exec", and that there is sufficient room for the brk. */ 162 that it will "exec", and that there is sufficient room for the brk. */
119 163
120#ifndef ELF_ET_DYN_BASE 164#define ELF_ET_DYN_BASE 0x0000010000000000UL
121#define ELF_ET_DYN_BASE 0x0000010000000000UL 165#define COMPAT_ELF_ET_DYN_BASE 0x0000000070000000UL
122#endif
123 166
124 167
125/* This yields a mask that user programs can use to figure out what 168/* This yields a mask that user programs can use to figure out what
diff --git a/include/asm-sparc64/ptrace.h b/include/asm-sparc64/ptrace.h
index 734a767f0a4e..8617c3a5143b 100644
--- a/include/asm-sparc64/ptrace.h
+++ b/include/asm-sparc64/ptrace.h
@@ -95,6 +95,8 @@ struct sparc_trapf {
95 95
96#ifdef __KERNEL__ 96#ifdef __KERNEL__
97 97
98#define __ARCH_WANT_COMPAT_SYS_PTRACE
99
98#define force_successful_syscall_return() \ 100#define force_successful_syscall_return() \
99do { current_thread_info()->syscall_noerror = 1; \ 101do { current_thread_info()->syscall_noerror = 1; \
100} while (0) 102} while (0)