Skip to content

Commit

Permalink
[PATCH] uml: TT mode softint fixes
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bodo Stroesser authored and Linus Torvalds committed Jan 19, 2006
1 parent c83d463 commit 097fdf0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions arch/um/kernel/time_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,9 @@ void timer_handler(int sig, union uml_pt_regs *regs)
{
local_irq_disable();
irq_enter();
update_process_times(CHOOSE_MODE(user_context(UPT_SP(regs)),
(regs)->skas.is_user));
update_process_times(CHOOSE_MODE(
(UPT_SC(regs) && user_context(UPT_SP(regs))),
(regs)->skas.is_user));
irq_exit();
local_irq_enable();
if(current_thread->cpu == 0)
Expand Down
5 changes: 3 additions & 2 deletions arch/um/kernel/tt/trap_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ void sig_handler_common_tt(int sig, void *sc_ptr)
{
struct sigcontext *sc = sc_ptr;
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 *);

/* This is done because to allow SIGSEGV to be delivered inside a SEGV
Expand All @@ -35,7 +35,8 @@ void sig_handler_common_tt(int sig, void *sc_ptr)
GET_FAULTINFO_FROM_SC(r->faultinfo, sc);
}
save_regs = *r;
is_user = user_context(SC_SP(sc));
if (sc)
is_user = user_context(SC_SP(sc));
r->sc = sc;
if(sig != SIGUSR2)
r->syscall = -1;
Expand Down

0 comments on commit 097fdf0

Please sign in to comment.