diff options
author | Bodo Stroesser <bstroesser@fujitsu-siemens.com> | 2006-01-18 20:42:51 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-18 22:20:20 -0500 |
commit | 097fdf06c63741e6ac1a4e01c2255861dd0a1c49 (patch) | |
tree | 0aa53ac292ce1dd31cc5a416231ffc47eb0da940 /arch/um | |
parent | c83d4635ee8c8fe16046ff6cabcff708be16df75 (diff) |
[PATCH] uml: TT mode softint fixes
Some fixes to make softints work in tt mode.
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um')
-rw-r--r-- | arch/um/kernel/time_kern.c | 5 | ||||
-rw-r--r-- | arch/um/kernel/tt/trap_user.c | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/arch/um/kernel/time_kern.c b/arch/um/kernel/time_kern.c index 6fa4e1b892b7..3c7626cdba4b 100644 --- a/arch/um/kernel/time_kern.c +++ b/arch/um/kernel/time_kern.c | |||
@@ -187,8 +187,9 @@ void timer_handler(int sig, union uml_pt_regs *regs) | |||
187 | { | 187 | { |
188 | local_irq_disable(); | 188 | local_irq_disable(); |
189 | irq_enter(); | 189 | irq_enter(); |
190 | update_process_times(CHOOSE_MODE(user_context(UPT_SP(regs)), | 190 | update_process_times(CHOOSE_MODE( |
191 | (regs)->skas.is_user)); | 191 | (UPT_SC(regs) && user_context(UPT_SP(regs))), |
192 | (regs)->skas.is_user)); | ||
192 | irq_exit(); | 193 | irq_exit(); |
193 | local_irq_enable(); | 194 | local_irq_enable(); |
194 | if(current_thread->cpu == 0) | 195 | if(current_thread->cpu == 0) |
diff --git a/arch/um/kernel/tt/trap_user.c b/arch/um/kernel/tt/trap_user.c index a414c529fbcd..b5d9d64d91e4 100644 --- a/arch/um/kernel/tt/trap_user.c +++ b/arch/um/kernel/tt/trap_user.c | |||
@@ -18,7 +18,7 @@ void sig_handler_common_tt(int sig, void *sc_ptr) | |||
18 | { | 18 | { |
19 | struct sigcontext *sc = sc_ptr; | 19 | struct sigcontext *sc = sc_ptr; |
20 | struct tt_regs save_regs, *r; | 20 | struct tt_regs save_regs, *r; |
21 | int save_errno = errno, is_user; | 21 | int save_errno = errno, is_user = 0; |
22 | void (*handler)(int, union uml_pt_regs *); | 22 | void (*handler)(int, union uml_pt_regs *); |
23 | 23 | ||
24 | /* This is done because to allow SIGSEGV to be delivered inside a SEGV | 24 | /* This is done because to allow SIGSEGV to be delivered inside a SEGV |
@@ -35,7 +35,8 @@ void sig_handler_common_tt(int sig, void *sc_ptr) | |||
35 | GET_FAULTINFO_FROM_SC(r->faultinfo, sc); | 35 | GET_FAULTINFO_FROM_SC(r->faultinfo, sc); |
36 | } | 36 | } |
37 | save_regs = *r; | 37 | save_regs = *r; |
38 | is_user = user_context(SC_SP(sc)); | 38 | if (sc) |
39 | is_user = user_context(SC_SP(sc)); | ||
39 | r->sc = sc; | 40 | r->sc = sc; |
40 | if(sig != SIGUSR2) | 41 | if(sig != SIGUSR2) |
41 | r->syscall = -1; | 42 | r->syscall = -1; |