diff options
author | Jeff Dike <jdike@addtoit.com> | 2007-10-16 04:26:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 12:43:05 -0400 |
commit | 77bf4400319db9d2a8af6b00c2be6faa0f3d07cb (patch) | |
tree | ddc8fd48349b8d4dd2c0b26bce7f52f79b4e4077 /arch/um/kernel/um_arch.c | |
parent | ae2587e41254e48e670346aefa332d7469d86352 (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/kernel/um_arch.c')
-rw-r--r-- | arch/um/kernel/um_arch.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c index 9f3a207eb81f..5f3e13c365e5 100644 --- a/arch/um/kernel/um_arch.c +++ b/arch/um/kernel/um_arch.c | |||
@@ -35,8 +35,6 @@ | |||
35 | #include "initrd.h" | 35 | #include "initrd.h" |
36 | #include "init.h" | 36 | #include "init.h" |
37 | #include "os.h" | 37 | #include "os.h" |
38 | #include "mode_kern.h" | ||
39 | #include "mode.h" | ||
40 | #include "skas.h" | 38 | #include "skas.h" |
41 | 39 | ||
42 | #define DEFAULT_COMMAND_LINE "root=98:0" | 40 | #define DEFAULT_COMMAND_LINE "root=98:0" |
@@ -67,7 +65,8 @@ struct cpuinfo_um boot_cpu_data = { | |||
67 | 65 | ||
68 | unsigned long thread_saved_pc(struct task_struct *task) | 66 | unsigned long thread_saved_pc(struct task_struct *task) |
69 | { | 67 | { |
70 | return os_process_pc(thread_pid_skas(task)); | 68 | /* FIXME: Need to look up userspace_pid by cpu */ |
69 | return os_process_pc(userspace_pid[0]); | ||
71 | } | 70 | } |
72 | 71 | ||
73 | /* Changed in setup_arch, which is called in early boot */ | 72 | /* Changed in setup_arch, which is called in early boot */ |
@@ -253,6 +252,19 @@ EXPORT_SYMBOL(end_iomem); | |||
253 | 252 | ||
254 | extern char __binary_start; | 253 | extern char __binary_start; |
255 | 254 | ||
255 | static unsigned long set_task_sizes_skas(unsigned long *task_size_out) | ||
256 | { | ||
257 | /* Round up to the nearest 4M */ | ||
258 | unsigned long host_task_size = ROUND_4M((unsigned long) | ||
259 | &host_task_size); | ||
260 | |||
261 | if (!skas_needs_stub) | ||
262 | *task_size_out = host_task_size; | ||
263 | else *task_size_out = CONFIG_STUB_START & PGDIR_MASK; | ||
264 | |||
265 | return host_task_size; | ||
266 | } | ||
267 | |||
256 | int __init linux_main(int argc, char **argv) | 268 | int __init linux_main(int argc, char **argv) |
257 | { | 269 | { |
258 | unsigned long avail, diff; | 270 | unsigned long avail, diff; |
@@ -289,7 +301,7 @@ int __init linux_main(int argc, char **argv) | |||
289 | os_fill_handlinfo(handlinfo_kern); | 301 | os_fill_handlinfo(handlinfo_kern); |
290 | 302 | ||
291 | brk_start = (unsigned long) sbrk(0); | 303 | brk_start = (unsigned long) sbrk(0); |
292 | before_mem_skas(brk_start); | 304 | |
293 | /* Increase physical memory size for exec-shield users | 305 | /* Increase physical memory size for exec-shield users |
294 | so they actually get what they asked for. This should | 306 | so they actually get what they asked for. This should |
295 | add zero for non-exec shield users */ | 307 | add zero for non-exec shield users */ |
@@ -354,7 +366,7 @@ int __init linux_main(int argc, char **argv) | |||
354 | stack_protections((unsigned long) &init_thread_info); | 366 | stack_protections((unsigned long) &init_thread_info); |
355 | os_flush_stdout(); | 367 | os_flush_stdout(); |
356 | 368 | ||
357 | return start_uml_skas(); | 369 | return start_uml(); |
358 | } | 370 | } |
359 | 371 | ||
360 | extern int uml_exitcode; | 372 | extern int uml_exitcode; |