aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/include
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
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')
-rw-r--r--arch/um/include/as-layout.h1
-rw-r--r--arch/um/include/choose-mode.h18
-rw-r--r--arch/um/include/common-offsets.h3
-rw-r--r--arch/um/include/irq_user.h4
-rw-r--r--arch/um/include/kern_util.h6
-rw-r--r--arch/um/include/mode.h19
-rw-r--r--arch/um/include/mode_kern.h6
-rw-r--r--arch/um/include/os.h26
-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
-rw-r--r--arch/um/include/sysdep-x86_64/ptrace.h21
-rw-r--r--arch/um/include/sysdep-x86_64/thread.h4
-rw-r--r--arch/um/include/tt/debug.h18
-rw-r--r--arch/um/include/tt/mmu-tt.h12
-rw-r--r--arch/um/include/tt/mode-tt.h23
-rw-r--r--arch/um/include/tt/mode_kern_tt.h40
-rw-r--r--arch/um/include/tt/tt.h37
-rw-r--r--arch/um/include/tt/uaccess-tt.h46
-rw-r--r--arch/um/include/um_mmu.h23
-rw-r--r--arch/um/include/um_uaccess.h8
21 files changed, 1 insertions, 344 deletions
diff --git a/arch/um/include/as-layout.h b/arch/um/include/as-layout.h
index fccf187bf4e1..e44f32940f8a 100644
--- a/arch/um/include/as-layout.h
+++ b/arch/um/include/as-layout.h
@@ -28,7 +28,6 @@ extern unsigned long _unprotected_end;
28extern unsigned long brk_start; 28extern unsigned long brk_start;
29 29
30extern int linux_main(int argc, char **argv); 30extern int linux_main(int argc, char **argv);
31extern void set_cmdline(char *cmd);
32 31
33extern void (*sig_info[])(int, union uml_pt_regs *); 32extern void (*sig_info[])(int, union uml_pt_regs *);
34 33
diff --git a/arch/um/include/choose-mode.h b/arch/um/include/choose-mode.h
index b87b36a87d91..51a387626da2 100644
--- a/arch/um/include/choose-mode.h
+++ b/arch/um/include/choose-mode.h
@@ -8,26 +8,8 @@
8 8
9#include "uml-config.h" 9#include "uml-config.h"
10 10
11#if defined(UML_CONFIG_MODE_TT) && defined(UML_CONFIG_MODE_SKAS)
12#define CHOOSE_MODE(tt, skas) (mode_tt ? (tt) : (skas))
13
14extern int mode_tt;
15static inline void *__choose_mode(void *tt, void *skas) {
16 return mode_tt ? tt : skas;
17}
18
19#define __CHOOSE_MODE(tt, skas) (*( (typeof(tt) *) __choose_mode(&(tt), &(skas))))
20
21#elif defined(UML_CONFIG_MODE_SKAS)
22#define CHOOSE_MODE(tt, skas) (skas) 11#define CHOOSE_MODE(tt, skas) (skas)
23 12
24#elif defined(UML_CONFIG_MODE_TT)
25#define CHOOSE_MODE(tt, skas) (tt)
26
27#else
28#error CONFIG_MODE_SKAS and CONFIG_MODE_TT are both disabled
29#endif
30
31#define CHOOSE_MODE_PROC(tt, skas, args...) \ 13#define CHOOSE_MODE_PROC(tt, skas, args...) \
32 CHOOSE_MODE(tt(args), skas(args)) 14 CHOOSE_MODE(tt(args), skas(args))
33 15
diff --git a/arch/um/include/common-offsets.h b/arch/um/include/common-offsets.h
index 2378ff42e41c..439b91f141a5 100644
--- a/arch/um/include/common-offsets.h
+++ b/arch/um/include/common-offsets.h
@@ -1,9 +1,6 @@
1/* for use by sys-$SUBARCH/kernel-offsets.c */ 1/* for use by sys-$SUBARCH/kernel-offsets.c */
2 2
3DEFINE(KERNEL_MADV_REMOVE, MADV_REMOVE); 3DEFINE(KERNEL_MADV_REMOVE, MADV_REMOVE);
4#ifdef CONFIG_MODE_TT
5OFFSET(HOST_TASK_EXTERN_PID, task_struct, thread.mode.tt.extern_pid);
6#endif
7 4
8OFFSET(HOST_TASK_REGS, task_struct, thread.regs); 5OFFSET(HOST_TASK_REGS, task_struct, thread.regs);
9OFFSET(HOST_TASK_PID, task_struct, pid); 6OFFSET(HOST_TASK_PID, task_struct, pid);
diff --git a/arch/um/include/irq_user.h b/arch/um/include/irq_user.h
index 15d311b9be9e..741cb7d6f859 100644
--- a/arch/um/include/irq_user.h
+++ b/arch/um/include/irq_user.h
@@ -30,8 +30,4 @@ extern void deactivate_fd(int fd, int irqnum);
30extern int deactivate_all_fds(void); 30extern int deactivate_all_fds(void);
31extern int activate_ipi(int fd, int pid); 31extern int activate_ipi(int fd, int pid);
32 32
33#ifdef CONFIG_MODE_TT
34extern void forward_interrupts(int pid);
35#endif
36
37#endif 33#endif
diff --git a/arch/um/include/kern_util.h b/arch/um/include/kern_util.h
index b84b5dadb958..578156db3039 100644
--- a/arch/um/include/kern_util.h
+++ b/arch/um/include/kern_util.h
@@ -34,9 +34,6 @@ extern int nsyscalls;
34 UML_ROUND_DOWN(((unsigned long) addr) + PAGE_SIZE - 1) 34 UML_ROUND_DOWN(((unsigned long) addr) + PAGE_SIZE - 1)
35 35
36extern int kernel_fork(unsigned long flags, int (*fn)(void *), void * arg); 36extern int kernel_fork(unsigned long flags, int (*fn)(void *), void * arg);
37#ifdef UML_CONFIG_MODE_TT
38extern unsigned long stack_sp(unsigned long page);
39#endif
40extern int kernel_thread_proc(void *data); 37extern int kernel_thread_proc(void *data);
41extern void syscall_segv(int sig); 38extern void syscall_segv(int sig);
42extern int current_pid(void); 39extern int current_pid(void);
@@ -82,9 +79,6 @@ extern void check_stack_overflow(void *ptr);
82extern void relay_signal(int sig, union uml_pt_regs *regs); 79extern void relay_signal(int sig, union uml_pt_regs *regs);
83extern int user_context(unsigned long sp); 80extern int user_context(unsigned long sp);
84extern void timer_irq(union uml_pt_regs *regs); 81extern void timer_irq(union uml_pt_regs *regs);
85#ifdef CONFIG_MODE_TT
86extern void unprotect_stack(unsigned long stack);
87#endif
88extern void do_uml_exitcalls(void); 82extern void do_uml_exitcalls(void);
89extern int attach_debugger(int idle_pid, int pid, int stop); 83extern int attach_debugger(int idle_pid, int pid, int stop);
90extern int config_gdb(char *str); 84extern int config_gdb(char *str);
diff --git a/arch/um/include/mode.h b/arch/um/include/mode.h
index 786cf563eb05..fcce95cbc16a 100644
--- a/arch/um/include/mode.h
+++ b/arch/um/include/mode.h
@@ -6,25 +6,6 @@
6#ifndef __MODE_H__ 6#ifndef __MODE_H__
7#define __MODE_H__ 7#define __MODE_H__
8 8
9#include "uml-config.h"
10
11#ifdef UML_CONFIG_MODE_TT
12#include "mode-tt.h"
13#endif
14
15#ifdef UML_CONFIG_MODE_SKAS
16#include "mode-skas.h" 9#include "mode-skas.h"
17#endif
18 10
19#endif 11#endif
20
21/*
22 * Overrides for Emacs so that we follow Linus's tabbing style.
23 * Emacs will notice this stuff at the end of the file and automatically
24 * adjust the settings for this buffer only. This must remain at the end
25 * of the file.
26 * ---------------------------------------------------------------------------
27 * Local variables:
28 * c-file-style: "linux"
29 * End:
30 */
diff --git a/arch/um/include/mode_kern.h b/arch/um/include/mode_kern.h
index 88e5e77bf517..b2a44c0dcd00 100644
--- a/arch/um/include/mode_kern.h
+++ b/arch/um/include/mode_kern.h
@@ -6,12 +6,6 @@
6#ifndef __MODE_KERN_H__ 6#ifndef __MODE_KERN_H__
7#define __MODE_KERN_H__ 7#define __MODE_KERN_H__
8 8
9#ifdef CONFIG_MODE_TT
10#include "mode_kern_tt.h"
11#endif
12
13#ifdef CONFIG_MODE_SKAS
14#include "mode_kern_skas.h" 9#include "mode_kern_skas.h"
15#endif
16 10
17#endif 11#endif
diff --git a/arch/um/include/os.h b/arch/um/include/os.h
index c0803e67fc67..208d9b91fc93 100644
--- a/arch/um/include/os.h
+++ b/arch/um/include/os.h
@@ -178,11 +178,7 @@ extern void check_host_supports_tls(int *supports_tls, int *tls_min);
178 178
179/* Make sure they are clear when running in TT mode. Required by 179/* Make sure they are clear when running in TT mode. Required by
180 * SEGV_MAYBE_FIXABLE */ 180 * SEGV_MAYBE_FIXABLE */
181#ifdef UML_CONFIG_MODE_SKAS
182#define clear_can_do_skas() do { ptrace_faultinfo = proc_mm = 0; } while (0) 181#define clear_can_do_skas() do { ptrace_faultinfo = proc_mm = 0; } while (0)
183#else
184#define clear_can_do_skas() do {} while (0)
185#endif
186 182
187/* mem.c */ 183/* mem.c */
188extern int create_mem_file(unsigned long long len); 184extern int create_mem_file(unsigned long long len);
@@ -193,18 +189,11 @@ extern int os_process_parent(int pid);
193extern void os_stop_process(int pid); 189extern void os_stop_process(int pid);
194extern void os_kill_process(int pid, int reap_child); 190extern void os_kill_process(int pid, int reap_child);
195extern void os_kill_ptraced_process(int pid, int reap_child); 191extern void os_kill_ptraced_process(int pid, int reap_child);
196#ifdef UML_CONFIG_MODE_TT
197extern void os_usr1_process(int pid);
198#endif
199extern long os_ptrace_ldt(long pid, long addr, long data); 192extern long os_ptrace_ldt(long pid, long addr, long data);
200 193
201extern int os_getpid(void); 194extern int os_getpid(void);
202extern int os_getpgrp(void); 195extern int os_getpgrp(void);
203 196
204#ifdef UML_CONFIG_MODE_TT
205extern void init_new_thread_stack(void *sig_stack, void (*usr1_handler)(int));
206extern void stop(void);
207#endif
208extern void init_new_thread_signals(void); 197extern void init_new_thread_signals(void);
209extern int run_kernel_thread(int (*fn)(void *), void *arg, void **jmp_ptr); 198extern int run_kernel_thread(int (*fn)(void *), void *arg, void **jmp_ptr);
210 199
@@ -217,18 +206,6 @@ extern int os_drop_memory(void *addr, int length);
217extern int can_drop_memory(void); 206extern int can_drop_memory(void);
218extern void os_flush_stdout(void); 207extern void os_flush_stdout(void);
219 208
220/* tt.c
221 * for tt mode only (will be deleted in future...)
222 */
223extern void forward_ipi(int fd, int pid);
224extern void kill_child_dead(int pid);
225extern int wait_for_stop(int pid, int sig, int cont_type, void *relay);
226extern int protect_memory(unsigned long addr, unsigned long len,
227 int r, int w, int x, int must_succeed);
228extern void forward_pending_sigio(int target);
229extern int start_fork_tramp(void *arg, unsigned long temp_stack,
230 int clone_flags, int (*tramp)(void *));
231
232/* uaccess.c */ 209/* uaccess.c */
233extern unsigned long __do_user_copy(void *to, const void *from, int n, 210extern unsigned long __do_user_copy(void *to, const void *from, int n,
234 void **fault_addr, void **fault_catcher, 211 void **fault_addr, void **fault_catcher,
@@ -281,9 +258,6 @@ extern void os_dump_core(void);
281extern void switch_timers(int to_real); 258extern void switch_timers(int to_real);
282extern void idle_sleep(int secs); 259extern void idle_sleep(int secs);
283extern int set_interval(int is_virtual); 260extern int set_interval(int is_virtual);
284#ifdef CONFIG_MODE_TT
285extern void enable_timer(void);
286#endif
287extern void disable_timer(void); 261extern void disable_timer(void);
288extern void uml_idle_timer(void); 262extern void uml_idle_timer(void);
289extern unsigned long long os_nsecs(void); 263extern unsigned long long os_nsecs(void);
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
diff --git a/arch/um/include/sysdep-x86_64/ptrace.h b/arch/um/include/sysdep-x86_64/ptrace.h
index 62403bd99661..ff525bda4c11 100644
--- a/arch/um/include/sysdep-x86_64/ptrace.h
+++ b/arch/um/include/sysdep-x86_64/ptrace.h
@@ -1,5 +1,6 @@
1/* 1/*
2 * Copyright 2003 PathScale, Inc. 2 * Copyright 2003 PathScale, Inc.
3 * Copyright (C) 2003 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
3 * 4 *
4 * Licensed under the GPL 5 * Licensed under the GPL
5 */ 6 */
@@ -14,11 +15,6 @@
14#define MAX_REG_OFFSET (UM_FRAME_SIZE) 15#define MAX_REG_OFFSET (UM_FRAME_SIZE)
15#define MAX_REG_NR ((MAX_REG_OFFSET) / sizeof(unsigned long)) 16#define MAX_REG_NR ((MAX_REG_OFFSET) / sizeof(unsigned long))
16 17
17#ifdef UML_CONFIG_MODE_TT
18#include "sysdep/sc.h"
19#endif
20
21#ifdef UML_CONFIG_MODE_SKAS
22#include "skas_ptregs.h" 18#include "skas_ptregs.h"
23 19
24#define REGS_IP(r) ((r)[HOST_IP]) 20#define REGS_IP(r) ((r)[HOST_IP])
@@ -88,21 +84,10 @@
88 84
89#define REGS_ERR(r) ((r)->fault_type) 85#define REGS_ERR(r) ((r)->fault_type)
90 86
91#endif
92
93#include "choose-mode.h" 87#include "choose-mode.h"
94 88
95/* XXX */ 89/* XXX */
96union uml_pt_regs { 90union uml_pt_regs {
97#ifdef UML_CONFIG_MODE_TT
98 struct tt_regs {
99 long syscall;
100 unsigned long orig_rax;
101 void *sc;
102 struct faultinfo faultinfo;
103 } tt;
104#endif
105#ifdef UML_CONFIG_MODE_SKAS
106 struct skas_regs { 91 struct skas_regs {
107 unsigned long regs[MAX_REG_NR]; 92 unsigned long regs[MAX_REG_NR];
108 unsigned long fp[HOST_FP_SIZE]; 93 unsigned long fp[HOST_FP_SIZE];
@@ -110,14 +95,10 @@ union uml_pt_regs {
110 long syscall; 95 long syscall;
111 int is_user; 96 int is_user;
112 } skas; 97 } skas;
113#endif
114}; 98};
115 99
116#define EMPTY_UML_PT_REGS { } 100#define EMPTY_UML_PT_REGS { }
117 101
118/* XXX */
119extern int mode_tt;
120
121#define UPT_RBX(r) __CHOOSE_MODE(SC_RBX(UPT_SC(r)), REGS_RBX((r)->skas.regs)) 102#define UPT_RBX(r) __CHOOSE_MODE(SC_RBX(UPT_SC(r)), REGS_RBX((r)->skas.regs))
122#define UPT_RCX(r) __CHOOSE_MODE(SC_RCX(UPT_SC(r)), REGS_RCX((r)->skas.regs)) 103#define UPT_RCX(r) __CHOOSE_MODE(SC_RCX(UPT_SC(r)), REGS_RCX((r)->skas.regs))
123#define UPT_RDX(r) __CHOOSE_MODE(SC_RDX(UPT_SC(r)), REGS_RDX((r)->skas.regs)) 104#define UPT_RDX(r) __CHOOSE_MODE(SC_RDX(UPT_SC(r)), REGS_RDX((r)->skas.regs))
diff --git a/arch/um/include/sysdep-x86_64/thread.h b/arch/um/include/sysdep-x86_64/thread.h
index cbef3e1697f4..d73d0b0afdb7 100644
--- a/arch/um/include/sysdep-x86_64/thread.h
+++ b/arch/um/include/sysdep-x86_64/thread.h
@@ -3,8 +3,4 @@
3 3
4#include <kern_constants.h> 4#include <kern_constants.h>
5 5
6#ifdef UML_CONFIG_MODE_TT
7#define TASK_EXTERN_PID(task) *((int *) &(((char *) (task))[HOST_TASK_EXTERN_PID]))
8#endif
9
10#endif 6#endif
diff --git a/arch/um/include/tt/debug.h b/arch/um/include/tt/debug.h
deleted file mode 100644
index 9778fa838296..000000000000
--- a/arch/um/include/tt/debug.h
+++ /dev/null
@@ -1,18 +0,0 @@
1/*
2 * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com) and
3 * Lars Brinkhoff.
4 * Licensed under the GPL
5 */
6
7#ifndef __UML_TT_DEBUG_H
8#define __UML_TT_DEBUG_H
9
10extern int debugger_proxy(int status, pid_t pid);
11extern void child_proxy(pid_t pid, int status);
12extern void init_proxy (pid_t pid, int waiting, int status);
13extern int start_debugger(char *prog, int startup, int stop, int *debugger_fd);
14extern void fake_child_exit(void);
15extern int gdb_config(char *str);
16extern int gdb_remove(int unused);
17
18#endif
diff --git a/arch/um/include/tt/mmu-tt.h b/arch/um/include/tt/mmu-tt.h
deleted file mode 100644
index 572a78b22587..000000000000
--- a/arch/um/include/tt/mmu-tt.h
+++ /dev/null
@@ -1,12 +0,0 @@
1/*
2 * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
4 */
5
6#ifndef __TT_MMU_H
7#define __TT_MMU_H
8
9struct mmu_context_tt {
10};
11
12#endif
diff --git a/arch/um/include/tt/mode-tt.h b/arch/um/include/tt/mode-tt.h
deleted file mode 100644
index 2823cd56eea2..000000000000
--- a/arch/um/include/tt/mode-tt.h
+++ /dev/null
@@ -1,23 +0,0 @@
1/*
2 * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
4 */
5
6#ifndef __MODE_TT_H__
7#define __MODE_TT_H__
8
9#include "sysdep/ptrace.h"
10
11enum { OP_NONE, OP_EXEC, OP_FORK, OP_TRACE_ON, OP_REBOOT, OP_HALT, OP_CB };
12
13extern int tracing_pid;
14
15extern int tracer(int (*init_proc)(void *), void *sp);
16extern void sig_handler_common_tt(int sig, void *sc);
17extern void syscall_handler_tt(int sig, union uml_pt_regs *regs);
18extern void reboot_tt(void);
19extern void halt_tt(void);
20extern int is_tracer_winch(int pid, int fd, void *data);
21extern void kill_off_processes_tt(void);
22
23#endif
diff --git a/arch/um/include/tt/mode_kern_tt.h b/arch/um/include/tt/mode_kern_tt.h
deleted file mode 100644
index a4fc63057195..000000000000
--- a/arch/um/include/tt/mode_kern_tt.h
+++ /dev/null
@@ -1,40 +0,0 @@
1/*
2 * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
4 */
5
6#ifndef __TT_MODE_KERN_H__
7#define __TT_MODE_KERN_H__
8
9#include "linux/sched.h"
10#include "asm/page.h"
11#include "asm/ptrace.h"
12#include "asm/uaccess.h"
13
14extern void switch_to_tt(void *prev, void *next);
15extern void flush_thread_tt(void);
16extern void start_thread_tt(struct pt_regs *regs, unsigned long eip,
17 unsigned long esp);
18extern int copy_thread_tt(int nr, unsigned long clone_flags, unsigned long sp,
19 unsigned long stack_top, struct task_struct *p,
20 struct pt_regs *regs);
21extern void release_thread_tt(struct task_struct *task);
22extern void initial_thread_cb_tt(void (*proc)(void *), void *arg);
23extern void init_idle_tt(void);
24extern void flush_tlb_kernel_range_tt(unsigned long start, unsigned long end);
25extern void flush_tlb_kernel_vm_tt(void);
26extern void __flush_tlb_one_tt(unsigned long addr);
27extern void flush_tlb_range_tt(struct vm_area_struct *vma,
28 unsigned long start, unsigned long end);
29extern void flush_tlb_mm_tt(struct mm_struct *mm);
30extern void force_flush_all_tt(void);
31extern long execute_syscall_tt(void *r);
32extern void before_mem_tt(unsigned long brk_start);
33extern unsigned long set_task_sizes_tt(unsigned long *task_size_out);
34extern int start_uml_tt(void);
35extern int external_pid_tt(struct task_struct *task);
36extern int thread_pid_tt(struct task_struct *task);
37
38#define kmem_end_tt (host_task_size - ABOVE_KMEM)
39
40#endif
diff --git a/arch/um/include/tt/tt.h b/arch/um/include/tt/tt.h
deleted file mode 100644
index acb8356e1f98..000000000000
--- a/arch/um/include/tt/tt.h
+++ /dev/null
@@ -1,37 +0,0 @@
1/*
2 * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
4 */
5
6#ifndef __TT_H__
7#define __TT_H__
8
9#include "sysdep/ptrace.h"
10
11extern int gdb_pid;
12extern int debug;
13extern int debug_stop;
14extern int debug_trace;
15
16extern int honeypot;
17
18extern int fork_tramp(void *sig_stack);
19extern int do_proc_op(void *t, int proc_id);
20extern int tracer(int (*init_proc)(void *), void *sp);
21extern void attach_process(int pid);
22extern void tracer_panic(char *format, ...)
23 __attribute__ ((format (printf, 1, 2)));
24extern void set_init_pid(int pid);
25extern int set_user_mode(void *task);
26extern void set_tracing(void *t, int tracing);
27extern int is_tracing(void *task);
28extern void syscall_handler(int sig, union uml_pt_regs *regs);
29extern void exit_kernel(int pid, void *task);
30extern void do_syscall(void *task, int pid, int local_using_sysemu);
31extern void do_sigtrap(void *task);
32extern int is_valid_pid(int pid);
33extern void remap_data(void *segment_start, void *segment_end, int w);
34extern long execute_syscall_tt(void *r);
35
36#endif
37
diff --git a/arch/um/include/tt/uaccess-tt.h b/arch/um/include/tt/uaccess-tt.h
deleted file mode 100644
index 13a64f61fcf4..000000000000
--- a/arch/um/include/tt/uaccess-tt.h
+++ /dev/null
@@ -1,46 +0,0 @@
1/*
2 * Copyright (C) 2000 - 2003 Jeff Dike (jdike@addtoit.com)
3 * Licensed under the GPL
4 */
5
6#ifndef __TT_UACCESS_H
7#define __TT_UACCESS_H
8
9#include "linux/string.h"
10#include "linux/sched.h"
11#include "asm/processor.h"
12#include "asm/errno.h"
13#include "asm/current.h"
14#include "asm/a.out.h"
15#include "uml_uaccess.h"
16
17#define ABOVE_KMEM (16 * 1024 * 1024)
18
19extern unsigned long end_vm;
20extern unsigned long uml_physmem;
21
22#define is_stack(addr, size) \
23 (((unsigned long) (addr) < STACK_TOP) && \
24 ((unsigned long) (addr) >= STACK_TOP - ABOVE_KMEM) && \
25 (((unsigned long) (addr) + (size)) <= STACK_TOP))
26
27#define access_ok_tt(type, addr, size) \
28 (is_stack(addr, size))
29
30extern int __do_copy_from_user(void *to, const void *from, int n,
31 void **fault_addr, void **fault_catcher);
32extern int __do_strncpy_from_user(char *dst, const char *src, size_t n,
33 void **fault_addr, void **fault_catcher);
34extern int __do_clear_user(void *mem, size_t len, void **fault_addr,
35 void **fault_catcher);
36extern int __do_strnlen_user(const char *str, unsigned long n,
37 void **fault_addr, void **fault_catcher);
38
39extern int copy_from_user_tt(void *to, const void __user *from, int n);
40extern int copy_to_user_tt(void __user *to, const void *from, int n);
41extern int strncpy_from_user_tt(char *dst, const char __user *src, int count);
42extern int __clear_user_tt(void __user *mem, int len);
43extern int clear_user_tt(void __user *mem, int len);
44extern int strnlen_user_tt(const void __user *str, int len);
45
46#endif
diff --git a/arch/um/include/um_mmu.h b/arch/um/include/um_mmu.h
index 0fa643238300..2461be6b0a60 100644
--- a/arch/um/include/um_mmu.h
+++ b/arch/um/include/um_mmu.h
@@ -8,33 +8,10 @@
8 8
9#include "uml-config.h" 9#include "uml-config.h"
10#include "choose-mode.h" 10#include "choose-mode.h"
11
12#ifdef UML_CONFIG_MODE_TT
13#include "mmu-tt.h"
14#endif
15
16#ifdef UML_CONFIG_MODE_SKAS
17#include "mmu-skas.h" 11#include "mmu-skas.h"
18#endif
19 12
20typedef union mm_context { 13typedef union mm_context {
21#ifdef UML_CONFIG_MODE_TT
22 struct mmu_context_tt tt;
23#endif
24#ifdef UML_CONFIG_MODE_SKAS
25 struct mmu_context_skas skas; 14 struct mmu_context_skas skas;
26#endif
27} mm_context_t; 15} mm_context_t;
28 16
29#endif 17#endif
30
31/*
32 * Overrides for Emacs so that we follow Linus's tabbing style.
33 * Emacs will notice this stuff at the end of the file and automatically
34 * adjust the settings for this buffer only. This must remain at the end
35 * of the file.
36 * ---------------------------------------------------------------------------
37 * Local variables:
38 * c-file-style: "linux"
39 * End:
40 */
diff --git a/arch/um/include/um_uaccess.h b/arch/um/include/um_uaccess.h
index 5126a99b5961..6757ee768ccb 100644
--- a/arch/um/include/um_uaccess.h
+++ b/arch/um/include/um_uaccess.h
@@ -7,15 +7,7 @@
7#define __ARCH_UM_UACCESS_H 7#define __ARCH_UM_UACCESS_H
8 8
9#include "choose-mode.h" 9#include "choose-mode.h"
10
11#ifdef CONFIG_MODE_TT
12#include "uaccess-tt.h"
13#endif
14
15#ifdef CONFIG_MODE_SKAS
16#include "uaccess-skas.h" 10#include "uaccess-skas.h"
17#endif
18
19#include "asm/fixmap.h" 11#include "asm/fixmap.h"
20 12
21#define __under_task_size(addr, size) \ 13#define __under_task_size(addr, size) \