aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/kernel/tt
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-07-17 09:25:26 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2006-07-17 09:25:26 -0400
commit4bf311ddfbffe12d41ad1a3c311ab727db6f72cb (patch)
tree9d19a2774e83637d86dc876f3af22af1dacf0bec /arch/um/kernel/tt
parent597d0cae0f99f62501e229bed50e8149604015bb (diff)
parent82d6897fefca6206bca7153805b4c5359ce97fc4 (diff)
Merge branch 'master'
Diffstat (limited to 'arch/um/kernel/tt')
-rw-r--r--arch/um/kernel/tt/exec_kern.c2
-rw-r--r--arch/um/kernel/tt/mem.c21
-rw-r--r--arch/um/kernel/tt/process_kern.c2
-rw-r--r--arch/um/kernel/tt/syscall_kern.c12
-rw-r--r--arch/um/kernel/tt/tracer.c22
5 files changed, 10 insertions, 49 deletions
diff --git a/arch/um/kernel/tt/exec_kern.c b/arch/um/kernel/tt/exec_kern.c
index 5c1e4cc1c049..ad66df17d9d7 100644
--- a/arch/um/kernel/tt/exec_kern.c
+++ b/arch/um/kernel/tt/exec_kern.c
@@ -21,7 +21,7 @@
21static int exec_tramp(void *sig_stack) 21static int exec_tramp(void *sig_stack)
22{ 22{
23 init_new_thread_stack(sig_stack, NULL); 23 init_new_thread_stack(sig_stack, NULL);
24 init_new_thread_signals(1); 24 init_new_thread_signals();
25 os_stop_process(os_getpid()); 25 os_stop_process(os_getpid());
26 return(0); 26 return(0);
27} 27}
diff --git a/arch/um/kernel/tt/mem.c b/arch/um/kernel/tt/mem.c
index bcb8796c3cb1..84a23b14f770 100644
--- a/arch/um/kernel/tt/mem.c
+++ b/arch/um/kernel/tt/mem.c
@@ -24,22 +24,13 @@ void before_mem_tt(unsigned long brk_start)
24#define SIZE ((CONFIG_NEST_LEVEL + CONFIG_KERNEL_HALF_GIGS) * 0x20000000) 24#define SIZE ((CONFIG_NEST_LEVEL + CONFIG_KERNEL_HALF_GIGS) * 0x20000000)
25#define START (CONFIG_TOP_ADDR - SIZE) 25#define START (CONFIG_TOP_ADDR - SIZE)
26 26
27unsigned long set_task_sizes_tt(int arg, unsigned long *host_size_out, 27unsigned long set_task_sizes_tt(unsigned long *task_size_out)
28 unsigned long *task_size_out)
29{ 28{
29 unsigned long host_task_size;
30
30 /* Round up to the nearest 4M */ 31 /* Round up to the nearest 4M */
31 *host_size_out = ROUND_4M((unsigned long) &arg); 32 host_task_size = ROUND_4M((unsigned long) &host_task_size);
32 *task_size_out = START; 33 *task_size_out = START;
33 return(START);
34}
35 34
36/* 35 return host_task_size;
37 * Overrides for Emacs so that we follow Linus's tabbing style. 36}
38 * Emacs will notice this stuff at the end of the file and automatically
39 * adjust the settings for this buffer only. This must remain at the end
40 * of the file.
41 * ---------------------------------------------------------------------------
42 * Local variables:
43 * c-file-style: "linux"
44 * End:
45 */
diff --git a/arch/um/kernel/tt/process_kern.c b/arch/um/kernel/tt/process_kern.c
index 8368c2dbe635..1e86f0bfef72 100644
--- a/arch/um/kernel/tt/process_kern.c
+++ b/arch/um/kernel/tt/process_kern.c
@@ -142,7 +142,7 @@ static void new_thread_handler(int sig)
142 schedule_tail(current->thread.prev_sched); 142 schedule_tail(current->thread.prev_sched);
143 current->thread.prev_sched = NULL; 143 current->thread.prev_sched = NULL;
144 144
145 init_new_thread_signals(1); 145 init_new_thread_signals();
146 enable_timer(); 146 enable_timer();
147 free_page(current->thread.temp_stack); 147 free_page(current->thread.temp_stack);
148 set_cmdline("(kernel thread)"); 148 set_cmdline("(kernel thread)");
diff --git a/arch/um/kernel/tt/syscall_kern.c b/arch/um/kernel/tt/syscall_kern.c
index 3fda9a03c59a..293caa6d0c2d 100644
--- a/arch/um/kernel/tt/syscall_kern.c
+++ b/arch/um/kernel/tt/syscall_kern.c
@@ -21,18 +21,11 @@ void syscall_handler_tt(int sig, struct pt_regs *regs)
21 void *sc; 21 void *sc;
22 long result; 22 long result;
23 int syscall; 23 int syscall;
24#ifdef CONFIG_SYSCALL_DEBUG 24
25 int index;
26#endif
27 sc = UPT_SC(&regs->regs); 25 sc = UPT_SC(&regs->regs);
28 SC_START_SYSCALL(sc); 26 SC_START_SYSCALL(sc);
29 27
30 syscall = UPT_SYSCALL_NR(&regs->regs); 28 syscall = UPT_SYSCALL_NR(&regs->regs);
31
32#ifdef CONFIG_SYSCALL_DEBUG
33 index = record_syscall_start(syscall);
34#endif
35
36 syscall_trace(&regs->regs, 0); 29 syscall_trace(&regs->regs, 0);
37 30
38 current->thread.nsyscalls++; 31 current->thread.nsyscalls++;
@@ -50,7 +43,4 @@ void syscall_handler_tt(int sig, struct pt_regs *regs)
50 SC_SET_SYSCALL_RETURN(sc, result); 43 SC_SET_SYSCALL_RETURN(sc, result);
51 44
52 syscall_trace(&regs->regs, 1); 45 syscall_trace(&regs->regs, 1);
53#ifdef CONFIG_SYSCALL_DEBUG
54 record_syscall_end(index, result);
55#endif
56} 46}
diff --git a/arch/um/kernel/tt/tracer.c b/arch/um/kernel/tt/tracer.c
index 71daae24e48a..9882342206ec 100644
--- a/arch/um/kernel/tt/tracer.c
+++ b/arch/um/kernel/tt/tracer.c
@@ -188,10 +188,7 @@ int tracer(int (*init_proc)(void *), void *sp)
188 int status, pid = 0, sig = 0, cont_type, tracing = 0, op = 0; 188 int status, pid = 0, sig = 0, cont_type, tracing = 0, op = 0;
189 int proc_id = 0, n, err, old_tracing = 0, strace = 0; 189 int proc_id = 0, n, err, old_tracing = 0, strace = 0;
190 int local_using_sysemu = 0; 190 int local_using_sysemu = 0;
191#ifdef UML_CONFIG_SYSCALL_DEBUG 191
192 unsigned long eip = 0;
193 int last_index;
194#endif
195 signal(SIGPIPE, SIG_IGN); 192 signal(SIGPIPE, SIG_IGN);
196 setup_tracer_winch(); 193 setup_tracer_winch();
197 tracing_pid = os_getpid(); 194 tracing_pid = os_getpid();
@@ -282,23 +279,6 @@ int tracer(int (*init_proc)(void *), void *sp)
282 else if(WIFSTOPPED(status)){ 279 else if(WIFSTOPPED(status)){
283 proc_id = pid_to_processor_id(pid); 280 proc_id = pid_to_processor_id(pid);
284 sig = WSTOPSIG(status); 281 sig = WSTOPSIG(status);
285#ifdef UML_CONFIG_SYSCALL_DEBUG
286 if(signal_index[proc_id] == 1024){
287 signal_index[proc_id] = 0;
288 last_index = 1023;
289 }
290 else last_index = signal_index[proc_id] - 1;
291 if(((sig == SIGPROF) || (sig == SIGVTALRM) ||
292 (sig == SIGALRM)) &&
293 (signal_record[proc_id][last_index].signal == sig)&&
294 (signal_record[proc_id][last_index].pid == pid))
295 signal_index[proc_id] = last_index;
296 signal_record[proc_id][signal_index[proc_id]].pid = pid;
297 gettimeofday(&signal_record[proc_id][signal_index[proc_id]].time, NULL);
298 eip = ptrace(PTRACE_PEEKUSR, pid, PT_IP_OFFSET, 0);
299 signal_record[proc_id][signal_index[proc_id]].addr = eip;
300 signal_record[proc_id][signal_index[proc_id]++].signal = sig;
301#endif
302 if(proc_id == -1){ 282 if(proc_id == -1){
303 sleeping_process_signal(pid, sig); 283 sleeping_process_signal(pid, sig);
304 continue; 284 continue;