diff options
author | Jeff Dike <jdike@addtoit.com> | 2007-10-16 04:26:50 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 12:43:05 -0400 |
commit | 42fda66387daa53538ae13a2c858396aaf037158 (patch) | |
tree | 77955a91a958fde7be47cb0ff23ac9e1248217db /arch/um/sys-i386/signal.c | |
parent | a1ff5878d2628bbe1e42821c024c96f48318f683 (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/sys-i386/signal.c')
-rw-r--r-- | arch/um/sys-i386/signal.c | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/arch/um/sys-i386/signal.c b/arch/um/sys-i386/signal.c index 1cbf95f6858a..187ea27536bd 100644 --- a/arch/um/sys-i386/signal.c +++ b/arch/um/sys-i386/signal.c | |||
@@ -13,9 +13,6 @@ | |||
13 | #include "sigcontext.h" | 13 | #include "sigcontext.h" |
14 | #include "registers.h" | 14 | #include "registers.h" |
15 | #include "mode.h" | 15 | #include "mode.h" |
16 | |||
17 | #ifdef CONFIG_MODE_SKAS | ||
18 | |||
19 | #include "skas.h" | 16 | #include "skas.h" |
20 | 17 | ||
21 | void copy_sc(union uml_pt_regs *regs, void *from) | 18 | void copy_sc(union uml_pt_regs *regs, void *from) |
@@ -108,61 +105,6 @@ int copy_sc_to_user_skas(struct sigcontext __user *to, struct _fpstate __user *t | |||
108 | return copy_to_user(to, &sc, sizeof(sc)) || | 105 | return copy_to_user(to, &sc, sizeof(sc)) || |
109 | copy_to_user(to_fp, fpregs, sizeof(fpregs)); | 106 | copy_to_user(to_fp, fpregs, sizeof(fpregs)); |
110 | } | 107 | } |
111 | #endif | ||
112 | |||
113 | #ifdef CONFIG_MODE_TT | ||
114 | |||
115 | /* These copy a sigcontext to/from userspace. They copy the fpstate pointer, | ||
116 | * blowing away the old, good one. So, that value is saved, and then restored | ||
117 | * after the sigcontext copy. In copy_from, the variable holding the saved | ||
118 | * fpstate pointer, and the sigcontext that it should be restored to are both | ||
119 | * in the kernel, so we can just restore using an assignment. In copy_to, the | ||
120 | * saved pointer is in the kernel, but the sigcontext is in userspace, so we | ||
121 | * copy_to_user it. | ||
122 | */ | ||
123 | int copy_sc_from_user_tt(struct sigcontext *to, struct sigcontext __user *from, | ||
124 | int fpsize) | ||
125 | { | ||
126 | struct _fpstate *to_fp; | ||
127 | struct _fpstate __user *from_fp; | ||
128 | unsigned long sigs; | ||
129 | int err; | ||
130 | |||
131 | to_fp = to->fpstate; | ||
132 | sigs = to->oldmask; | ||
133 | err = copy_from_user(to, from, sizeof(*to)); | ||
134 | from_fp = to->fpstate; | ||
135 | to->oldmask = sigs; | ||
136 | to->fpstate = to_fp; | ||
137 | if(to_fp != NULL) | ||
138 | err |= copy_from_user(to_fp, from_fp, fpsize); | ||
139 | return err; | ||
140 | } | ||
141 | |||
142 | int copy_sc_to_user_tt(struct sigcontext __user *to, struct _fpstate __user *fp, | ||
143 | struct sigcontext *from, int fpsize, unsigned long sp) | ||
144 | { | ||
145 | struct _fpstate __user *to_fp; | ||
146 | struct _fpstate *from_fp; | ||
147 | int err; | ||
148 | |||
149 | to_fp = (fp ? fp : (struct _fpstate __user *) (to + 1)); | ||
150 | from_fp = from->fpstate; | ||
151 | err = copy_to_user(to, from, sizeof(*to)); | ||
152 | |||
153 | /* The SP in the sigcontext is the updated one for the signal | ||
154 | * delivery. The sp passed in is the original, and this needs | ||
155 | * to be restored, so we stick it in separately. | ||
156 | */ | ||
157 | err |= copy_to_user(&SC_SP(to), &sp, sizeof(sp)); | ||
158 | |||
159 | if(from_fp != NULL){ | ||
160 | err |= copy_to_user(&to->fpstate, &to_fp, sizeof(to->fpstate)); | ||
161 | err |= copy_to_user(to_fp, from_fp, fpsize); | ||
162 | } | ||
163 | return err; | ||
164 | } | ||
165 | #endif | ||
166 | 108 | ||
167 | static int copy_sc_from_user(struct pt_regs *to, void __user *from) | 109 | static int copy_sc_from_user(struct pt_regs *to, void __user *from) |
168 | { | 110 | { |