diff options
Diffstat (limited to 'arch/um/kernel')
| -rw-r--r-- | arch/um/kernel/main.c | 1 | ||||
| -rw-r--r-- | arch/um/kernel/process_kern.c | 6 | ||||
| -rw-r--r-- | arch/um/kernel/reboot.c | 9 | ||||
| -rw-r--r-- | arch/um/kernel/skas/Makefile | 4 | ||||
| -rw-r--r-- | arch/um/kernel/skas/include/mode-skas.h | 1 | ||||
| -rw-r--r-- | arch/um/kernel/skas/process_kern.c | 15 | ||||
| -rw-r--r-- | arch/um/kernel/skas/time.c | 30 | ||||
| -rw-r--r-- | arch/um/kernel/syscall_kern.c | 19 | ||||
| -rw-r--r-- | arch/um/kernel/time.c | 31 | ||||
| -rw-r--r-- | arch/um/kernel/time_kern.c | 2 | ||||
| -rw-r--r-- | arch/um/kernel/tt/Makefile | 4 | ||||
| -rw-r--r-- | arch/um/kernel/tt/gdb.c | 4 | ||||
| -rw-r--r-- | arch/um/kernel/tt/gdb_kern.c | 2 | ||||
| -rw-r--r-- | arch/um/kernel/tt/include/debug.h | 17 | ||||
| -rw-r--r-- | arch/um/kernel/tt/include/mode-tt.h | 1 | ||||
| -rw-r--r-- | arch/um/kernel/tt/process_kern.c | 17 | ||||
| -rw-r--r-- | arch/um/kernel/tt/time.c | 28 |
17 files changed, 41 insertions, 150 deletions
diff --git a/arch/um/kernel/main.c b/arch/um/kernel/main.c index e59f58152678..1e1a87f1c510 100644 --- a/arch/um/kernel/main.c +++ b/arch/um/kernel/main.c | |||
| @@ -69,7 +69,6 @@ static __init void do_uml_initcalls(void) | |||
| 69 | 69 | ||
| 70 | static void last_ditch_exit(int sig) | 70 | static void last_ditch_exit(int sig) |
| 71 | { | 71 | { |
| 72 | kmalloc_ok = 0; | ||
| 73 | signal(SIGINT, SIG_DFL); | 72 | signal(SIGINT, SIG_DFL); |
| 74 | signal(SIGTERM, SIG_DFL); | 73 | signal(SIGTERM, SIG_DFL); |
| 75 | signal(SIGHUP, SIG_DFL); | 74 | signal(SIGHUP, SIG_DFL); |
diff --git a/arch/um/kernel/process_kern.c b/arch/um/kernel/process_kern.c index 157584ae4792..d4036ed680bc 100644 --- a/arch/um/kernel/process_kern.c +++ b/arch/um/kernel/process_kern.c | |||
| @@ -96,8 +96,8 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) | |||
| 96 | 96 | ||
| 97 | current->thread.request.u.thread.proc = fn; | 97 | current->thread.request.u.thread.proc = fn; |
| 98 | current->thread.request.u.thread.arg = arg; | 98 | current->thread.request.u.thread.arg = arg; |
| 99 | pid = do_fork(CLONE_VM | CLONE_UNTRACED | flags, 0, NULL, 0, NULL, | 99 | pid = do_fork(CLONE_VM | CLONE_UNTRACED | flags, 0, |
| 100 | NULL); | 100 | ¤t->thread.regs, 0, NULL, NULL); |
| 101 | if(pid < 0) | 101 | if(pid < 0) |
| 102 | panic("do_fork failed in kernel_thread, errno = %d", pid); | 102 | panic("do_fork failed in kernel_thread, errno = %d", pid); |
| 103 | return(pid); | 103 | return(pid); |
| @@ -169,7 +169,7 @@ int current_pid(void) | |||
| 169 | 169 | ||
| 170 | void default_idle(void) | 170 | void default_idle(void) |
| 171 | { | 171 | { |
| 172 | uml_idle_timer(); | 172 | CHOOSE_MODE(uml_idle_timer(), (void) 0); |
| 173 | 173 | ||
| 174 | atomic_inc(&init_mm.mm_count); | 174 | atomic_inc(&init_mm.mm_count); |
| 175 | current->mm = &init_mm; | 175 | current->mm = &init_mm; |
diff --git a/arch/um/kernel/reboot.c b/arch/um/kernel/reboot.c index 207f89d74908..fcec51da1d37 100644 --- a/arch/um/kernel/reboot.c +++ b/arch/um/kernel/reboot.c | |||
| @@ -38,14 +38,14 @@ static void kill_off_processes(void) | |||
| 38 | 38 | ||
| 39 | void uml_cleanup(void) | 39 | void uml_cleanup(void) |
| 40 | { | 40 | { |
| 41 | kill_off_processes(); | 41 | kmalloc_ok = 0; |
| 42 | do_uml_exitcalls(); | 42 | do_uml_exitcalls(); |
| 43 | kill_off_processes(); | ||
| 43 | } | 44 | } |
| 44 | 45 | ||
| 45 | void machine_restart(char * __unused) | 46 | void machine_restart(char * __unused) |
| 46 | { | 47 | { |
| 47 | do_uml_exitcalls(); | 48 | uml_cleanup(); |
| 48 | kill_off_processes(); | ||
| 49 | CHOOSE_MODE(reboot_tt(), reboot_skas()); | 49 | CHOOSE_MODE(reboot_tt(), reboot_skas()); |
| 50 | } | 50 | } |
| 51 | 51 | ||
| @@ -53,8 +53,7 @@ EXPORT_SYMBOL(machine_restart); | |||
| 53 | 53 | ||
| 54 | void machine_power_off(void) | 54 | void machine_power_off(void) |
| 55 | { | 55 | { |
| 56 | do_uml_exitcalls(); | 56 | uml_cleanup(); |
| 57 | kill_off_processes(); | ||
| 58 | CHOOSE_MODE(halt_tt(), halt_skas()); | 57 | CHOOSE_MODE(halt_tt(), halt_skas()); |
| 59 | } | 58 | } |
| 60 | 59 | ||
diff --git a/arch/um/kernel/skas/Makefile b/arch/um/kernel/skas/Makefile index d37d1bfcd6f7..ff69c4b312c0 100644 --- a/arch/um/kernel/skas/Makefile +++ b/arch/um/kernel/skas/Makefile | |||
| @@ -4,10 +4,10 @@ | |||
| 4 | # | 4 | # |
| 5 | 5 | ||
| 6 | obj-y := exec_kern.o mem.o mem_user.o mmu.o process.o process_kern.o \ | 6 | obj-y := exec_kern.o mem.o mem_user.o mmu.o process.o process_kern.o \ |
| 7 | syscall_kern.o syscall_user.o time.o tlb.o trap_user.o uaccess.o \ | 7 | syscall_kern.o syscall_user.o tlb.o trap_user.o uaccess.o \ |
| 8 | 8 | ||
| 9 | subdir- := util | 9 | subdir- := util |
| 10 | 10 | ||
| 11 | USER_OBJS := process.o time.o | 11 | USER_OBJS := process.o |
| 12 | 12 | ||
| 13 | include arch/um/scripts/Makefile.rules | 13 | include arch/um/scripts/Makefile.rules |
diff --git a/arch/um/kernel/skas/include/mode-skas.h b/arch/um/kernel/skas/include/mode-skas.h index c1e33bd788db..bcd26a6a3888 100644 --- a/arch/um/kernel/skas/include/mode-skas.h +++ b/arch/um/kernel/skas/include/mode-skas.h | |||
| @@ -13,7 +13,6 @@ extern unsigned long exec_fp_regs[]; | |||
| 13 | extern unsigned long exec_fpx_regs[]; | 13 | extern unsigned long exec_fpx_regs[]; |
| 14 | extern int have_fpx_regs; | 14 | extern int have_fpx_regs; |
| 15 | 15 | ||
| 16 | extern void user_time_init_skas(void); | ||
| 17 | extern void sig_handler_common_skas(int sig, void *sc_ptr); | 16 | extern void sig_handler_common_skas(int sig, void *sc_ptr); |
| 18 | extern void halt_skas(void); | 17 | extern void halt_skas(void); |
| 19 | extern void reboot_skas(void); | 18 | extern void reboot_skas(void); |
diff --git a/arch/um/kernel/skas/process_kern.c b/arch/um/kernel/skas/process_kern.c index fc71ef295782..0a7b8aa55db8 100644 --- a/arch/um/kernel/skas/process_kern.c +++ b/arch/um/kernel/skas/process_kern.c | |||
| @@ -111,8 +111,7 @@ int copy_thread_skas(int nr, unsigned long clone_flags, unsigned long sp, | |||
| 111 | void (*handler)(int); | 111 | void (*handler)(int); |
| 112 | 112 | ||
| 113 | if(current->thread.forking){ | 113 | if(current->thread.forking){ |
| 114 | memcpy(&p->thread.regs.regs.skas, | 114 | memcpy(&p->thread.regs.regs.skas, ®s->regs.skas, |
| 115 | ¤t->thread.regs.regs.skas, | ||
| 116 | sizeof(p->thread.regs.regs.skas)); | 115 | sizeof(p->thread.regs.regs.skas)); |
| 117 | REGS_SET_SYSCALL_RETURN(p->thread.regs.regs.skas.regs, 0); | 116 | REGS_SET_SYSCALL_RETURN(p->thread.regs.regs.skas.regs, 0); |
| 118 | if(sp != 0) REGS_SP(p->thread.regs.regs.skas.regs) = sp; | 117 | if(sp != 0) REGS_SP(p->thread.regs.regs.skas.regs) = sp; |
| @@ -181,7 +180,6 @@ int start_uml_skas(void) | |||
| 181 | start_userspace(0); | 180 | start_userspace(0); |
| 182 | 181 | ||
| 183 | init_new_thread_signals(1); | 182 | init_new_thread_signals(1); |
| 184 | uml_idle_timer(); | ||
| 185 | 183 | ||
| 186 | init_task.thread.request.u.thread.proc = start_kernel_proc; | 184 | init_task.thread.request.u.thread.proc = start_kernel_proc; |
| 187 | init_task.thread.request.u.thread.arg = NULL; | 185 | init_task.thread.request.u.thread.arg = NULL; |
| @@ -201,14 +199,3 @@ int thread_pid_skas(struct task_struct *task) | |||
| 201 | #warning Need to look up userspace_pid by cpu | 199 | #warning Need to look up userspace_pid by cpu |
| 202 | return(userspace_pid[0]); | 200 | return(userspace_pid[0]); |
| 203 | } | 201 | } |
| 204 | |||
| 205 | /* | ||
| 206 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
| 207 | * Emacs will notice this stuff at the end of the file and automatically | ||
| 208 | * adjust the settings for this buffer only. This must remain at the end | ||
| 209 | * of the file. | ||
| 210 | * --------------------------------------------------------------------------- | ||
| 211 | * Local variables: | ||
| 212 | * c-file-style: "linux" | ||
| 213 | * End: | ||
| 214 | */ | ||
diff --git a/arch/um/kernel/skas/time.c b/arch/um/kernel/skas/time.c deleted file mode 100644 index 98091494b897..000000000000 --- a/arch/um/kernel/skas/time.c +++ /dev/null | |||
| @@ -1,30 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) | ||
| 3 | * Licensed under the GPL | ||
| 4 | */ | ||
| 5 | |||
| 6 | #include <sys/signal.h> | ||
| 7 | #include <sys/time.h> | ||
| 8 | #include "time_user.h" | ||
| 9 | #include "process.h" | ||
| 10 | #include "user.h" | ||
| 11 | |||
| 12 | void user_time_init_skas(void) | ||
| 13 | { | ||
| 14 | if(signal(SIGALRM, (__sighandler_t) alarm_handler) == SIG_ERR) | ||
| 15 | panic("Couldn't set SIGALRM handler"); | ||
| 16 | if(signal(SIGVTALRM, (__sighandler_t) alarm_handler) == SIG_ERR) | ||
| 17 | panic("Couldn't set SIGVTALRM handler"); | ||
| 18 | set_interval(ITIMER_VIRTUAL); | ||
| 19 | } | ||
| 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/kernel/syscall_kern.c b/arch/um/kernel/syscall_kern.c index b7a55251e897..8e1a3501ff46 100644 --- a/arch/um/kernel/syscall_kern.c +++ b/arch/um/kernel/syscall_kern.c | |||
| @@ -31,7 +31,8 @@ long sys_fork(void) | |||
| 31 | long ret; | 31 | long ret; |
| 32 | 32 | ||
| 33 | current->thread.forking = 1; | 33 | current->thread.forking = 1; |
| 34 | ret = do_fork(SIGCHLD, 0, NULL, 0, NULL, NULL); | 34 | ret = do_fork(SIGCHLD, UPT_SP(¤t->thread.regs.regs), |
| 35 | ¤t->thread.regs, 0, NULL, NULL); | ||
| 35 | current->thread.forking = 0; | 36 | current->thread.forking = 0; |
| 36 | return(ret); | 37 | return(ret); |
| 37 | } | 38 | } |
| @@ -41,8 +42,9 @@ long sys_vfork(void) | |||
| 41 | long ret; | 42 | long ret; |
| 42 | 43 | ||
| 43 | current->thread.forking = 1; | 44 | current->thread.forking = 1; |
| 44 | ret = do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, 0, NULL, 0, NULL, | 45 | ret = do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, |
| 45 | NULL); | 46 | UPT_SP(¤t->thread.regs.regs), |
| 47 | ¤t->thread.regs, 0, NULL, NULL); | ||
| 46 | current->thread.forking = 0; | 48 | current->thread.forking = 0; |
| 47 | return(ret); | 49 | return(ret); |
| 48 | } | 50 | } |
| @@ -162,14 +164,3 @@ int next_syscall_index(int limit) | |||
| 162 | spin_unlock(&syscall_lock); | 164 | spin_unlock(&syscall_lock); |
| 163 | return(ret); | 165 | return(ret); |
| 164 | } | 166 | } |
| 165 | |||
| 166 | /* | ||
| 167 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
| 168 | * Emacs will notice this stuff at the end of the file and automatically | ||
| 169 | * adjust the settings for this buffer only. This must remain at the end | ||
| 170 | * of the file. | ||
| 171 | * --------------------------------------------------------------------------- | ||
| 172 | * Local variables: | ||
| 173 | * c-file-style: "linux" | ||
| 174 | * End: | ||
| 175 | */ | ||
diff --git a/arch/um/kernel/time.c b/arch/um/kernel/time.c index c40c86a3f918..f829b309b63c 100644 --- a/arch/um/kernel/time.c +++ b/arch/um/kernel/time.c | |||
| @@ -33,7 +33,7 @@ void timer(void) | |||
| 33 | timeradd(&xtime, &local_offset, &xtime); | 33 | timeradd(&xtime, &local_offset, &xtime); |
| 34 | } | 34 | } |
| 35 | 35 | ||
| 36 | void set_interval(int timer_type) | 36 | static void set_interval(int timer_type) |
| 37 | { | 37 | { |
| 38 | int usec = 1000000/hz(); | 38 | int usec = 1000000/hz(); |
| 39 | struct itimerval interval = ((struct itimerval) { { 0, usec }, | 39 | struct itimerval interval = ((struct itimerval) { { 0, usec }, |
| @@ -45,12 +45,7 @@ void set_interval(int timer_type) | |||
| 45 | 45 | ||
| 46 | void enable_timer(void) | 46 | void enable_timer(void) |
| 47 | { | 47 | { |
| 48 | int usec = 1000000/hz(); | 48 | set_interval(ITIMER_VIRTUAL); |
| 49 | struct itimerval enable = ((struct itimerval) { { 0, usec }, | ||
| 50 | { 0, usec }}); | ||
| 51 | if(setitimer(ITIMER_VIRTUAL, &enable, NULL)) | ||
| 52 | printk("enable_timer - setitimer failed, errno = %d\n", | ||
| 53 | errno); | ||
| 54 | } | 49 | } |
| 55 | 50 | ||
| 56 | void disable_timer(void) | 51 | void disable_timer(void) |
| @@ -155,13 +150,15 @@ void idle_sleep(int secs) | |||
| 155 | nanosleep(&ts, NULL); | 150 | nanosleep(&ts, NULL); |
| 156 | } | 151 | } |
| 157 | 152 | ||
| 158 | /* | 153 | /* XXX This partly duplicates init_irq_signals */ |
| 159 | * Overrides for Emacs so that we follow Linus's tabbing style. | 154 | |
| 160 | * Emacs will notice this stuff at the end of the file and automatically | 155 | void user_time_init(void) |
| 161 | * adjust the settings for this buffer only. This must remain at the end | 156 | { |
| 162 | * of the file. | 157 | set_handler(SIGVTALRM, (__sighandler_t) alarm_handler, |
| 163 | * --------------------------------------------------------------------------- | 158 | SA_ONSTACK | SA_RESTART, SIGUSR1, SIGIO, SIGWINCH, |
| 164 | * Local variables: | 159 | SIGALRM, SIGUSR2, -1); |
| 165 | * c-file-style: "linux" | 160 | set_handler(SIGALRM, (__sighandler_t) alarm_handler, |
| 166 | * End: | 161 | SA_ONSTACK | SA_RESTART, SIGUSR1, SIGIO, SIGWINCH, |
| 167 | */ | 162 | SIGVTALRM, SIGUSR2, -1); |
| 163 | set_interval(ITIMER_VIRTUAL); | ||
| 164 | } | ||
diff --git a/arch/um/kernel/time_kern.c b/arch/um/kernel/time_kern.c index 6516fc52afe0..a8b4ef601f59 100644 --- a/arch/um/kernel/time_kern.c +++ b/arch/um/kernel/time_kern.c | |||
| @@ -162,7 +162,7 @@ int __init timer_init(void) | |||
| 162 | { | 162 | { |
| 163 | int err; | 163 | int err; |
| 164 | 164 | ||
| 165 | CHOOSE_MODE(user_time_init_tt(), user_time_init_skas()); | 165 | user_time_init(); |
| 166 | err = request_irq(TIMER_IRQ, um_timer, SA_INTERRUPT, "timer", NULL); | 166 | err = request_irq(TIMER_IRQ, um_timer, SA_INTERRUPT, "timer", NULL); |
| 167 | if(err != 0) | 167 | if(err != 0) |
| 168 | printk(KERN_ERR "timer_init : request_irq failed - " | 168 | printk(KERN_ERR "timer_init : request_irq failed - " |
diff --git a/arch/um/kernel/tt/Makefile b/arch/um/kernel/tt/Makefile index 3fd2554e60b6..6939e5af8472 100644 --- a/arch/um/kernel/tt/Makefile +++ b/arch/um/kernel/tt/Makefile | |||
| @@ -4,11 +4,11 @@ | |||
| 4 | # | 4 | # |
| 5 | 5 | ||
| 6 | obj-y = exec_kern.o exec_user.o gdb.o ksyms.o mem.o mem_user.o process_kern.o \ | 6 | obj-y = exec_kern.o exec_user.o gdb.o ksyms.o mem.o mem_user.o process_kern.o \ |
| 7 | syscall_kern.o syscall_user.o time.o tlb.o tracer.o trap_user.o \ | 7 | syscall_kern.o syscall_user.o tlb.o tracer.o trap_user.o \ |
| 8 | uaccess.o uaccess_user.o | 8 | uaccess.o uaccess_user.o |
| 9 | 9 | ||
| 10 | obj-$(CONFIG_PT_PROXY) += gdb_kern.o ptproxy/ | 10 | obj-$(CONFIG_PT_PROXY) += gdb_kern.o ptproxy/ |
| 11 | 11 | ||
| 12 | USER_OBJS := gdb.o time.o tracer.o | 12 | USER_OBJS := gdb.o tracer.o |
| 13 | 13 | ||
| 14 | include arch/um/scripts/Makefile.rules | 14 | include arch/um/scripts/Makefile.rules |
diff --git a/arch/um/kernel/tt/gdb.c b/arch/um/kernel/tt/gdb.c index 19a0ad7b35b3..37e22d71a0d9 100644 --- a/arch/um/kernel/tt/gdb.c +++ b/arch/um/kernel/tt/gdb.c | |||
| @@ -153,10 +153,10 @@ void remove_gdb_cb(void *unused) | |||
| 153 | exit_debugger_cb(NULL); | 153 | exit_debugger_cb(NULL); |
| 154 | } | 154 | } |
| 155 | 155 | ||
| 156 | int gdb_remove(char *unused) | 156 | int gdb_remove(int unused) |
| 157 | { | 157 | { |
| 158 | initial_thread_cb(remove_gdb_cb, NULL); | 158 | initial_thread_cb(remove_gdb_cb, NULL); |
| 159 | return(0); | 159 | return 0; |
| 160 | } | 160 | } |
| 161 | 161 | ||
| 162 | void signal_usr1(int sig) | 162 | void signal_usr1(int sig) |
diff --git a/arch/um/kernel/tt/gdb_kern.c b/arch/um/kernel/tt/gdb_kern.c index 93fb121f86af..26506388a6aa 100644 --- a/arch/um/kernel/tt/gdb_kern.c +++ b/arch/um/kernel/tt/gdb_kern.c | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | #ifdef CONFIG_MCONSOLE | 10 | #ifdef CONFIG_MCONSOLE |
| 11 | 11 | ||
| 12 | extern int gdb_config(char *str); | 12 | extern int gdb_config(char *str); |
| 13 | extern int gdb_remove(char *unused); | 13 | extern int gdb_remove(int n); |
| 14 | 14 | ||
| 15 | static struct mc_device gdb_mc = { | 15 | static struct mc_device gdb_mc = { |
| 16 | .name = "gdb", | 16 | .name = "gdb", |
diff --git a/arch/um/kernel/tt/include/debug.h b/arch/um/kernel/tt/include/debug.h index 8eff674107ca..738435461e13 100644 --- a/arch/um/kernel/tt/include/debug.h +++ b/arch/um/kernel/tt/include/debug.h | |||
| @@ -4,8 +4,8 @@ | |||
| 4 | * Licensed under the GPL | 4 | * Licensed under the GPL |
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| 7 | #ifndef __DEBUG_H | 7 | #ifndef __UML_TT_DEBUG_H |
| 8 | #define __DEBUG_H | 8 | #define __UML_TT_DEBUG_H |
| 9 | 9 | ||
| 10 | extern int debugger_proxy(int status, pid_t pid); | 10 | extern int debugger_proxy(int status, pid_t pid); |
| 11 | extern void child_proxy(pid_t pid, int status); | 11 | extern void child_proxy(pid_t pid, int status); |
| @@ -13,17 +13,6 @@ extern void init_proxy (pid_t pid, int waiting, int status); | |||
| 13 | extern int start_debugger(char *prog, int startup, int stop, int *debugger_fd); | 13 | extern int start_debugger(char *prog, int startup, int stop, int *debugger_fd); |
| 14 | extern void fake_child_exit(void); | 14 | extern void fake_child_exit(void); |
| 15 | extern int gdb_config(char *str); | 15 | extern int gdb_config(char *str); |
| 16 | extern int gdb_remove(char *unused); | 16 | extern int gdb_remove(int unused); |
| 17 | 17 | ||
| 18 | #endif | 18 | #endif |
| 19 | |||
| 20 | /* | ||
| 21 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
| 22 | * Emacs will notice this stuff at the end of the file and automatically | ||
| 23 | * adjust the settings for this buffer only. This must remain at the end | ||
| 24 | * of the file. | ||
| 25 | * --------------------------------------------------------------------------- | ||
| 26 | * Local variables: | ||
| 27 | * c-file-style: "linux" | ||
| 28 | * End: | ||
| 29 | */ | ||
diff --git a/arch/um/kernel/tt/include/mode-tt.h b/arch/um/kernel/tt/include/mode-tt.h index efe462019069..e171e15fead5 100644 --- a/arch/um/kernel/tt/include/mode-tt.h +++ b/arch/um/kernel/tt/include/mode-tt.h | |||
| @@ -13,7 +13,6 @@ enum { OP_NONE, OP_EXEC, OP_FORK, OP_TRACE_ON, OP_REBOOT, OP_HALT, OP_CB }; | |||
| 13 | extern int tracing_pid; | 13 | extern int tracing_pid; |
| 14 | 14 | ||
| 15 | extern int tracer(int (*init_proc)(void *), void *sp); | 15 | extern int tracer(int (*init_proc)(void *), void *sp); |
| 16 | extern void user_time_init_tt(void); | ||
| 17 | extern void sig_handler_common_tt(int sig, void *sc); | 16 | extern void sig_handler_common_tt(int sig, void *sc); |
| 18 | extern void syscall_handler_tt(int sig, union uml_pt_regs *regs); | 17 | extern void syscall_handler_tt(int sig, union uml_pt_regs *regs); |
| 19 | extern void reboot_tt(void); | 18 | extern void reboot_tt(void); |
diff --git a/arch/um/kernel/tt/process_kern.c b/arch/um/kernel/tt/process_kern.c index 776310fd5b8b..a189a2b92935 100644 --- a/arch/um/kernel/tt/process_kern.c +++ b/arch/um/kernel/tt/process_kern.c | |||
| @@ -266,10 +266,10 @@ int copy_thread_tt(int nr, unsigned long clone_flags, unsigned long sp, | |||
| 266 | } | 266 | } |
| 267 | 267 | ||
| 268 | if(current->thread.forking){ | 268 | if(current->thread.forking){ |
| 269 | sc_to_sc(UPT_SC(&p->thread.regs.regs), | 269 | sc_to_sc(UPT_SC(&p->thread.regs.regs), UPT_SC(®s->regs)); |
| 270 | UPT_SC(¤t->thread.regs.regs)); | ||
| 271 | SC_SET_SYSCALL_RETURN(UPT_SC(&p->thread.regs.regs), 0); | 270 | SC_SET_SYSCALL_RETURN(UPT_SC(&p->thread.regs.regs), 0); |
| 272 | if(sp != 0) SC_SP(UPT_SC(&p->thread.regs.regs)) = sp; | 271 | if(sp != 0) |
| 272 | SC_SP(UPT_SC(&p->thread.regs.regs)) = sp; | ||
| 273 | } | 273 | } |
| 274 | p->thread.mode.tt.extern_pid = new_pid; | 274 | p->thread.mode.tt.extern_pid = new_pid; |
| 275 | 275 | ||
| @@ -459,14 +459,3 @@ int is_valid_pid(int pid) | |||
| 459 | read_unlock(&tasklist_lock); | 459 | read_unlock(&tasklist_lock); |
| 460 | return(0); | 460 | return(0); |
| 461 | } | 461 | } |
| 462 | |||
| 463 | /* | ||
| 464 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
| 465 | * Emacs will notice this stuff at the end of the file and automatically | ||
| 466 | * adjust the settings for this buffer only. This must remain at the end | ||
| 467 | * of the file. | ||
| 468 | * --------------------------------------------------------------------------- | ||
| 469 | * Local variables: | ||
| 470 | * c-file-style: "linux" | ||
| 471 | * End: | ||
| 472 | */ | ||
diff --git a/arch/um/kernel/tt/time.c b/arch/um/kernel/tt/time.c deleted file mode 100644 index 8565b71b07cd..000000000000 --- a/arch/um/kernel/tt/time.c +++ /dev/null | |||
| @@ -1,28 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com) | ||
| 3 | * Licensed under the GPL | ||
| 4 | */ | ||
| 5 | |||
| 6 | #include <signal.h> | ||
| 7 | #include <sys/time.h> | ||
| 8 | #include <time_user.h> | ||
| 9 | #include "process.h" | ||
| 10 | #include "user.h" | ||
| 11 | |||
| 12 | void user_time_init_tt(void) | ||
| 13 | { | ||
| 14 | if(signal(SIGVTALRM, (__sighandler_t) alarm_handler) == SIG_ERR) | ||
| 15 | panic("Couldn't set SIGVTALRM handler"); | ||
| 16 | set_interval(ITIMER_VIRTUAL); | ||
| 17 | } | ||
| 18 | |||
| 19 | /* | ||
| 20 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
| 21 | * Emacs will notice this stuff at the end of the file and automatically | ||
| 22 | * adjust the settings for this buffer only. This must remain at the end | ||
| 23 | * of the file. | ||
| 24 | * --------------------------------------------------------------------------- | ||
| 25 | * Local variables: | ||
| 26 | * c-file-style: "linux" | ||
| 27 | * End: | ||
| 28 | */ | ||
