summaryrefslogtreecommitdiffstats
path: root/arch/um/include/sysdep-i386
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2007-10-16 01:26:58 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 09:43:05 -0700
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 45573088864..d765175d42b 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;
#define PTRACE_SYSEMU_SINGLESTEP 32
#endif
-union uml_pt_regs {
- struct skas_regs {
- unsigned long regs[MAX_REG_NR];
- unsigned long fp[HOST_FP_SIZE];
- unsigned long xfp[HOST_XFP_SIZE];
- struct faultinfo faultinfo;
- long syscall;
- int is_user;
- } skas;
+struct uml_pt_regs {
+ unsigned long regs[MAX_REG_NR];
+ unsigned long fp[HOST_FP_SIZE];
+ unsigned long xfp[HOST_XFP_SIZE];
+ struct faultinfo faultinfo;
+ long syscall;
+ int is_user;
};
#define EMPTY_UML_PT_REGS { }
-#define UPT_SC(r) ((r)->tt.sc)
-#define UPT_IP(r) REGS_IP((r)->skas.regs)
-#define UPT_SP(r) REGS_SP((r)->skas.regs)
-#define UPT_EFLAGS(r) REGS_EFLAGS((r)->skas.regs)
-#define UPT_EAX(r) REGS_EAX((r)->skas.regs)
-#define UPT_EBX(r) REGS_EBX((r)->skas.regs)
-#define UPT_ECX(r) REGS_ECX((r)->skas.regs)
-#define UPT_EDX(r) REGS_EDX((r)->skas.regs)
-#define UPT_ESI(r) REGS_ESI((r)->skas.regs)
-#define UPT_EDI(r) REGS_EDI((r)->skas.regs)
-#define UPT_EBP(r) REGS_EBP((r)->skas.regs)
-#define UPT_ORIG_EAX(r) ((r)->skas.syscall)
-#define UPT_CS(r) REGS_CS((r)->skas.regs)
-#define UPT_SS(r) REGS_SS((r)->skas.regs)
-#define UPT_DS(r) REGS_DS((r)->skas.regs)
-#define UPT_ES(r) REGS_ES((r)->skas.regs)
-#define UPT_FS(r) REGS_FS((r)->skas.regs)
-#define UPT_GS(r) REGS_GS((r)->skas.regs)
+#define UPT_IP(r) REGS_IP((r)->regs)
+#define UPT_SP(r) REGS_SP((r)->regs)
+#define UPT_EFLAGS(r) REGS_EFLAGS((r)->regs)
+#define UPT_EAX(r) REGS_EAX((r)->regs)
+#define UPT_EBX(r) REGS_EBX((r)->regs)
+#define UPT_ECX(r) REGS_ECX((r)->regs)
+#define UPT_EDX(r) REGS_EDX((r)->regs)
+#define UPT_ESI(r) REGS_ESI((r)->regs)
+#define UPT_EDI(r) REGS_EDI((r)->regs)
+#define UPT_EBP(r) REGS_EBP((r)->regs)
+#define UPT_ORIG_EAX(r) ((r)->syscall)
+#define UPT_CS(r) REGS_CS((r)->regs)
+#define UPT_SS(r) REGS_SS((r)->regs)
+#define UPT_DS(r) REGS_DS((r)->regs)
+#define UPT_ES(r) REGS_ES((r)->regs)
+#define UPT_FS(r) REGS_FS((r)->regs)
+#define UPT_GS(r) REGS_GS((r)->regs)
#define UPT_SYSCALL_ARG1(r) UPT_EBX(r)
#define UPT_SYSCALL_ARG2(r) UPT_ECX(r)
@@ -93,7 +90,7 @@ union uml_pt_regs {
extern int user_context(unsigned long sp);
-#define UPT_IS_USER(r) ((r)->skas.is_user)
+#define UPT_IS_USER(r) ((r)->is_user)
struct syscall_args {
unsigned long args[6];
@@ -162,14 +159,14 @@ struct syscall_args {
} while (0)
#define UPT_SET_SYSCALL_RETURN(r, res) \
- REGS_SET_SYSCALL_RETURN((r)->skas.regs, (res))
+ REGS_SET_SYSCALL_RETURN((r)->regs, (res))
-#define UPT_RESTART_SYSCALL(r) REGS_RESTART_SYSCALL((r)->skas.regs)
+#define UPT_RESTART_SYSCALL(r) REGS_RESTART_SYSCALL((r)->regs)
#define UPT_ORIG_SYSCALL(r) UPT_EAX(r)
#define UPT_SYSCALL_NR(r) UPT_ORIG_EAX(r)
#define UPT_SYSCALL_RET(r) UPT_EAX(r)
-#define UPT_FAULTINFO(r) (&(r)->skas.faultinfo)
+#define UPT_FAULTINFO(r) (&(r)->faultinfo)
#endif