aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/include/sysdep-i386
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2007-10-16 04:26:50 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 12:43:05 -0400
commit42fda66387daa53538ae13a2c858396aaf037158 (patch)
tree77955a91a958fde7be47cb0ff23ac9e1248217db /arch/um/include/sysdep-i386
parenta1ff5878d2628bbe1e42821c024c96f48318f683 (diff)
uml: throw out CONFIG_MODE_TT
This patchset throws out tt mode, which has been non-functional for a while. This is done in phases, interspersed with code cleanups on the affected files. The removal is done as follows: remove all code, config options, and files which depend on CONFIG_MODE_TT get rid of the CHOOSE_MODE macro, which decided whether to call tt-mode or skas-mode code, and replace invocations with their skas portions replace all now-trivial procedures with their skas equivalents There are now a bunch of now-redundant pieces of data structures, including mode-specific pieces of the thread structure, pt_regs, and mm_context. These are all replaced with their skas-specific contents. As part of the ongoing style compliance project, I made a style pass over all files that were changed. There are three such patches, one for each phase, covering the files affected by that phase but no later ones. I noticed that we weren't freeing the LDT state associated with a process when it exited, so that's fixed in one of the later patches. The last patch is a tidying patch which I've had for a while, but which caused inexplicable crashes under tt mode. Since that is no longer a problem, this can now go in. This patch: Start getting rid of tt mode support. This patch throws out CONFIG_MODE_TT and all config options, code, and files which depend on it. CONFIG_MODE_SKAS is gone and everything that depends on it is included unconditionally. The few changed lines are in re-written Kconfig help, lines which needed something skas-related removed from them, and a few more which weren't strictly deletions. 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.h23
-rw-r--r--arch/um/include/sysdep-i386/sigcontext.h4
-rw-r--r--arch/um/include/sysdep-i386/thread.h3
3 files changed, 0 insertions, 30 deletions
diff --git a/arch/um/include/sysdep-i386/ptrace.h b/arch/um/include/sysdep-i386/ptrace.h
index b45a72feb08c..c0ea4dbd042b 100644
--- a/arch/um/include/sysdep-i386/ptrace.h
+++ b/arch/um/include/sysdep-i386/ptrace.h
@@ -14,12 +14,7 @@
14#define MAX_REG_NR (UM_FRAME_SIZE / sizeof(unsigned long)) 14#define MAX_REG_NR (UM_FRAME_SIZE / sizeof(unsigned long))
15#define MAX_REG_OFFSET (UM_FRAME_SIZE) 15#define MAX_REG_OFFSET (UM_FRAME_SIZE)
16 16
17#ifdef UML_CONFIG_PT_PROXY
18extern void update_debugregs(int seq);
19#else
20static inline void update_debugregs(int seq) {} 17static inline void update_debugregs(int seq) {}
21#endif
22
23 18
24/* syscall emulation path in ptrace */ 19/* syscall emulation path in ptrace */
25 20
@@ -31,12 +26,6 @@ void set_using_sysemu(int value);
31int get_using_sysemu(void); 26int get_using_sysemu(void);
32extern int sysemu_supported; 27extern int sysemu_supported;
33 28
34#ifdef UML_CONFIG_MODE_TT
35#include "sysdep/sc.h"
36#endif
37
38#ifdef UML_CONFIG_MODE_SKAS
39
40#include "skas_ptregs.h" 29#include "skas_ptregs.h"
41 30
42#define REGS_IP(r) ((r)[HOST_IP]) 31#define REGS_IP(r) ((r)[HOST_IP])
@@ -60,20 +49,11 @@ extern int sysemu_supported;
60 49
61#define REGS_RESTART_SYSCALL(r) IP_RESTART_SYSCALL(REGS_IP(r)) 50#define REGS_RESTART_SYSCALL(r) IP_RESTART_SYSCALL(REGS_IP(r))
62 51
63#endif
64#ifndef PTRACE_SYSEMU_SINGLESTEP 52#ifndef PTRACE_SYSEMU_SINGLESTEP
65#define PTRACE_SYSEMU_SINGLESTEP 32 53#define PTRACE_SYSEMU_SINGLESTEP 32
66#endif 54#endif
67 55
68union uml_pt_regs { 56union uml_pt_regs {
69#ifdef UML_CONFIG_MODE_TT
70 struct tt_regs {
71 long syscall;
72 void *sc;
73 struct faultinfo faultinfo;
74 } tt;
75#endif
76#ifdef UML_CONFIG_MODE_SKAS
77 struct skas_regs { 57 struct skas_regs {
78 unsigned long regs[MAX_REG_NR]; 58 unsigned long regs[MAX_REG_NR];
79 unsigned long fp[HOST_FP_SIZE]; 59 unsigned long fp[HOST_FP_SIZE];
@@ -82,13 +62,10 @@ union uml_pt_regs {
82 long syscall; 62 long syscall;
83 int is_user; 63 int is_user;
84 } skas; 64 } skas;
85#endif
86}; 65};
87 66
88#define EMPTY_UML_PT_REGS { } 67#define EMPTY_UML_PT_REGS { }
89 68
90extern int mode_tt;
91
92#define UPT_SC(r) ((r)->tt.sc) 69#define UPT_SC(r) ((r)->tt.sc)
93#define UPT_IP(r) \ 70#define UPT_IP(r) \
94 __CHOOSE_MODE(SC_IP(UPT_SC(r)), REGS_IP((r)->skas.regs)) 71 __CHOOSE_MODE(SC_IP(UPT_SC(r)), REGS_IP((r)->skas.regs))
diff --git a/arch/um/include/sysdep-i386/sigcontext.h b/arch/um/include/sysdep-i386/sigcontext.h
index 23fd2644d7ed..8658634ca4f4 100644
--- a/arch/um/include/sysdep-i386/sigcontext.h
+++ b/arch/um/include/sysdep-i386/sigcontext.h
@@ -30,11 +30,7 @@
30#define SEGV_IS_FIXABLE(fi) ((fi)->trap_no == 14) 30#define SEGV_IS_FIXABLE(fi) ((fi)->trap_no == 14)
31 31
32/* SKAS3 has no trap_no on i386, but get_skas_faultinfo() sets it to 0. */ 32/* SKAS3 has no trap_no on i386, but get_skas_faultinfo() sets it to 0. */
33#ifdef UML_CONFIG_MODE_SKAS
34#define SEGV_MAYBE_FIXABLE(fi) ((fi)->trap_no == 0 && ptrace_faultinfo) 33#define SEGV_MAYBE_FIXABLE(fi) ((fi)->trap_no == 0 && ptrace_faultinfo)
35#else
36#define SEGV_MAYBE_FIXABLE(fi) 0
37#endif
38 34
39extern unsigned long *sc_sigmask(void *sc_ptr); 35extern unsigned long *sc_sigmask(void *sc_ptr);
40extern int sc_get_fpregs(unsigned long buf, void *sc_ptr); 36extern int sc_get_fpregs(unsigned long buf, void *sc_ptr);
diff --git a/arch/um/include/sysdep-i386/thread.h b/arch/um/include/sysdep-i386/thread.h
index 243fed44d780..0cf7bf6e9e04 100644
--- a/arch/um/include/sysdep-i386/thread.h
+++ b/arch/um/include/sysdep-i386/thread.h
@@ -4,8 +4,5 @@
4#include <kern_constants.h> 4#include <kern_constants.h>
5 5
6#define TASK_DEBUGREGS(task) ((unsigned long *) &(((char *) (task))[HOST_TASK_DEBUGREGS])) 6#define TASK_DEBUGREGS(task) ((unsigned long *) &(((char *) (task))[HOST_TASK_DEBUGREGS]))
7#ifdef UML_CONFIG_MODE_TT
8#define TASK_EXTERN_PID(task) *((int *) &(((char *) (task))[HOST_TASK_EXTERN_PID]))
9#endif
10 7
11#endif 8#endif