aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/include/sysdep-i386
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2007-10-16 04:26:58 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 12:43:05 -0400
commit77bf4400319db9d2a8af6b00c2be6faa0f3d07cb (patch)
treeddc8fd48349b8d4dd2c0b26bce7f52f79b4e4077 /arch/um/include/sysdep-i386
parentae2587e41254e48e670346aefa332d7469d86352 (diff)
uml: remove code made redundant by CHOOSE_MODE removal
This patch makes a number of simplifications enabled by the removal of CHOOSE_MODE. There were lots of functions that looked like int foo(args){ foo_skas(args); } The bodies of foo_skas are now folded into foo, and their declarations (and sometimes entire header files) are deleted. In addition, the union uml_pt_regs, which was a union between the tt and skas register formats, is now a struct, with the tt-mode arm of the union being removed. It turns out that usr2_handler was unused, so it is gone. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/include/sysdep-i386')
-rw-r--r--arch/um/include/sysdep-i386/ptrace.h59
1 files changed, 28 insertions, 31 deletions
diff --git a/arch/um/include/sysdep-i386/ptrace.h b/arch/um/include/sysdep-i386/ptrace.h
index 45573088864c..d765175d42be 100644
--- a/arch/um/include/sysdep-i386/ptrace.h
+++ b/arch/um/include/sysdep-i386/ptrace.h
@@ -52,37 +52,34 @@ extern int sysemu_supported;
52#define PTRACE_SYSEMU_SINGLESTEP 32 52#define PTRACE_SYSEMU_SINGLESTEP 32
53#endif 53#endif
54 54
55union uml_pt_regs { 55struct uml_pt_regs {
56 struct skas_regs { 56 unsigned long regs[MAX_REG_NR];
57 unsigned long regs[MAX_REG_NR]; 57 unsigned long fp[HOST_FP_SIZE];
58 unsigned long fp[HOST_FP_SIZE]; 58 unsigned long xfp[HOST_XFP_SIZE];
59 unsigned long xfp[HOST_XFP_SIZE]; 59 struct faultinfo faultinfo;
60 struct faultinfo faultinfo; 60 long syscall;
61 long syscall; 61 int is_user;
62 int is_user;
63 } skas;
64}; 62};
65 63
66#define EMPTY_UML_PT_REGS { } 64#define EMPTY_UML_PT_REGS { }
67 65
68#define UPT_SC(r) ((r)->tt.sc) 66#define UPT_IP(r) REGS_IP((r)->regs)
69#define UPT_IP(r) REGS_IP((r)->skas.regs) 67#define UPT_SP(r) REGS_SP((r)->regs)
70#define UPT_SP(r) REGS_SP((r)->skas.regs) 68#define UPT_EFLAGS(r) REGS_EFLAGS((r)->regs)
71#define UPT_EFLAGS(r) REGS_EFLAGS((r)->skas.regs) 69#define UPT_EAX(r) REGS_EAX((r)->regs)
72#define UPT_EAX(r) REGS_EAX((r)->skas.regs) 70#define UPT_EBX(r) REGS_EBX((r)->regs)
73#define UPT_EBX(r) REGS_EBX((r)->skas.regs) 71#define UPT_ECX(r) REGS_ECX((r)->regs)
74#define UPT_ECX(r) REGS_ECX((r)->skas.regs) 72#define UPT_EDX(r) REGS_EDX((r)->regs)
75#define UPT_EDX(r) REGS_EDX((r)->skas.regs) 73#define UPT_ESI(r) REGS_ESI((r)->regs)
76#define UPT_ESI(r) REGS_ESI((r)->skas.regs) 74#define UPT_EDI(r) REGS_EDI((r)->regs)
77#define UPT_EDI(r) REGS_EDI((r)->skas.regs) 75#define UPT_EBP(r) REGS_EBP((r)->regs)
78#define UPT_EBP(r) REGS_EBP((r)->skas.regs) 76#define UPT_ORIG_EAX(r) ((r)->syscall)
79#define UPT_ORIG_EAX(r) ((r)->skas.syscall) 77#define UPT_CS(r) REGS_CS((r)->regs)
80#define UPT_CS(r) REGS_CS((r)->skas.regs) 78#define UPT_SS(r) REGS_SS((r)->regs)
81#define UPT_SS(r) REGS_SS((r)->skas.regs) 79#define UPT_DS(r) REGS_DS((r)->regs)
82#define UPT_DS(r) REGS_DS((r)->skas.regs) 80#define UPT_ES(r) REGS_ES((r)->regs)
83#define UPT_ES(r) REGS_ES((r)->skas.regs) 81#define UPT_FS(r) REGS_FS((r)->regs)
84#define UPT_FS(r) REGS_FS((r)->skas.regs) 82#define UPT_GS(r) REGS_GS((r)->regs)
85#define UPT_GS(r) REGS_GS((r)->skas.regs)
86 83
87#define UPT_SYSCALL_ARG1(r) UPT_EBX(r) 84#define UPT_SYSCALL_ARG1(r) UPT_EBX(r)
88#define UPT_SYSCALL_ARG2(r) UPT_ECX(r) 85#define UPT_SYSCALL_ARG2(r) UPT_ECX(r)
@@ -93,7 +90,7 @@ union uml_pt_regs {
93 90
94extern int user_context(unsigned long sp); 91extern int user_context(unsigned long sp);
95 92
96#define UPT_IS_USER(r) ((r)->skas.is_user) 93#define UPT_IS_USER(r) ((r)->is_user)
97 94
98struct syscall_args { 95struct syscall_args {
99 unsigned long args[6]; 96 unsigned long args[6];
@@ -162,14 +159,14 @@ struct syscall_args {
162 } while (0) 159 } while (0)
163 160
164#define UPT_SET_SYSCALL_RETURN(r, res) \ 161#define UPT_SET_SYSCALL_RETURN(r, res) \
165 REGS_SET_SYSCALL_RETURN((r)->skas.regs, (res)) 162 REGS_SET_SYSCALL_RETURN((r)->regs, (res))
166 163
167#define UPT_RESTART_SYSCALL(r) REGS_RESTART_SYSCALL((r)->skas.regs) 164#define UPT_RESTART_SYSCALL(r) REGS_RESTART_SYSCALL((r)->regs)
168 165
169#define UPT_ORIG_SYSCALL(r) UPT_EAX(r) 166#define UPT_ORIG_SYSCALL(r) UPT_EAX(r)
170#define UPT_SYSCALL_NR(r) UPT_ORIG_EAX(r) 167#define UPT_SYSCALL_NR(r) UPT_ORIG_EAX(r)
171#define UPT_SYSCALL_RET(r) UPT_EAX(r) 168#define UPT_SYSCALL_RET(r) UPT_EAX(r)
172 169
173#define UPT_FAULTINFO(r) (&(r)->skas.faultinfo) 170#define UPT_FAULTINFO(r) (&(r)->faultinfo)
174 171
175#endif 172#endif