Commit 097fdf06 authored by Bodo Stroesser's avatar Bodo Stroesser Committed by Linus Torvalds

[PATCH] uml: TT mode softint fixes

Some fixes to make softints work in tt mode.
Signed-off-by: default avatarJeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent c83d4635
...@@ -187,7 +187,8 @@ void timer_handler(int sig, union uml_pt_regs *regs) ...@@ -187,7 +187,8 @@ void timer_handler(int sig, union uml_pt_regs *regs)
{ {
local_irq_disable(); local_irq_disable();
irq_enter(); irq_enter();
update_process_times(CHOOSE_MODE(user_context(UPT_SP(regs)), update_process_times(CHOOSE_MODE(
(UPT_SC(regs) && user_context(UPT_SP(regs))),
(regs)->skas.is_user)); (regs)->skas.is_user));
irq_exit(); irq_exit();
local_irq_enable(); local_irq_enable();
......
...@@ -18,7 +18,7 @@ void sig_handler_common_tt(int sig, void *sc_ptr) ...@@ -18,7 +18,7 @@ void sig_handler_common_tt(int sig, void *sc_ptr)
{ {
struct sigcontext *sc = sc_ptr; struct sigcontext *sc = sc_ptr;
struct tt_regs save_regs, *r; struct tt_regs save_regs, *r;
int save_errno = errno, is_user; int save_errno = errno, is_user = 0;
void (*handler)(int, union uml_pt_regs *); void (*handler)(int, union uml_pt_regs *);
/* This is done because to allow SIGSEGV to be delivered inside a SEGV /* This is done because to allow SIGSEGV to be delivered inside a SEGV
...@@ -35,6 +35,7 @@ void sig_handler_common_tt(int sig, void *sc_ptr) ...@@ -35,6 +35,7 @@ void sig_handler_common_tt(int sig, void *sc_ptr)
GET_FAULTINFO_FROM_SC(r->faultinfo, sc); GET_FAULTINFO_FROM_SC(r->faultinfo, sc);
} }
save_regs = *r; save_regs = *r;
if (sc)
is_user = user_context(SC_SP(sc)); is_user = user_context(SC_SP(sc));
r->sc = sc; r->sc = sc;
if(sig != SIGUSR2) if(sig != SIGUSR2)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment