Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 321111
b: refs/heads/master
c: 0a267fa
h: refs/heads/master
i:
  321109: 92b34f2
  321107: 85fdec6
  321103: c98db2b
v: v3
  • Loading branch information
Al Viro authored and Russell King committed Jul 28, 2012
1 parent 13d0a7f commit 143f831
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 24 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8d4150ccbb63419649a69fe04b46120a46d60da2
refs/heads/master: 0a267fa6a15d41c4061358bf2e67c633fdbffc90
17 changes: 2 additions & 15 deletions trunk/arch/arm/kernel/entry-common.S
Original file line number Diff line number Diff line change
Expand Up @@ -51,23 +51,10 @@ ret_fast_syscall:
fast_work_pending:
str r0, [sp, #S_R0+S_OFF]! @ returned r0
work_pending:
tst r1, #_TIF_NEED_RESCHED
bne work_resched
/*
* TIF_SIGPENDING or TIF_NOTIFY_RESUME must've been set if we got here
*/
ldr r2, [sp, #S_PSR]
mov r0, sp @ 'regs'
tst r2, #15 @ are we returning to user mode?
bne no_work_pending @ no? just leave, then...
mov r2, why @ 'syscall'
tst r1, #_TIF_SIGPENDING @ delivering a signal?
movne why, #0 @ prevent further restarts
bl do_notify_resume
b ret_slow_syscall @ Check work again

work_resched:
bl schedule
bl do_work_pending
b no_work_pending
/*
* "slow" syscall return path. "why" tells us if this was a real syscall.
*/
Expand Down
27 changes: 19 additions & 8 deletions trunk/arch/arm/kernel/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -640,13 +640,24 @@ static void do_signal(struct pt_regs *regs, int syscall)
}

asmlinkage void
do_notify_resume(struct pt_regs *regs, unsigned int thread_flags, int syscall)
do_work_pending(struct pt_regs *regs, unsigned int thread_flags, int syscall)
{
if (thread_flags & _TIF_SIGPENDING)
do_signal(regs, syscall);

if (thread_flags & _TIF_NOTIFY_RESUME) {
clear_thread_flag(TIF_NOTIFY_RESUME);
tracehook_notify_resume(regs);
}
do {
if (likely(thread_flags & _TIF_NEED_RESCHED)) {
schedule();
} else {
if (unlikely(!user_mode(regs)))
return;
local_irq_enable();
if (thread_flags & _TIF_SIGPENDING) {
do_signal(regs, syscall);
syscall = 0;
} else {
clear_thread_flag(TIF_NOTIFY_RESUME);
tracehook_notify_resume(regs);
}
}
local_irq_disable();
thread_flags = current_thread_info()->flags;
} while (thread_flags & _TIF_WORK_MASK);
}

0 comments on commit 143f831

Please sign in to comment.