diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-04-29 08:43:50 (GMT) |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-03 23:16:02 (GMT) |
commit | e9f9252667e383c0ccfd3570b358ccb72cd51359 (patch) | |
tree | b4df1eecc63538399cc9781bf2430bb3ec6e94b6 /arch/microblaze/kernel/entry-nommu.S | |
parent | 14203e19cbc562a79f49117c45c80639a1e65bdd (diff) | |
download | linux-e9f9252667e383c0ccfd3570b358ccb72cd51359.tar.xz |
microblaze: fix handling of multiple pending signals
We need to keep building sigframes until no pending signals remain.
Wrap do_notify_resume() calls into loops; do _not_ allow syscall
restart logics to trigger after the first iteration.
Incidentally, comments about pending signals that should (somehow)
be in r18 are pure BS. Doesn't work that way and cannot work that
way, sorry...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'arch/microblaze/kernel/entry-nommu.S')
-rw-r--r-- | arch/microblaze/kernel/entry-nommu.S | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/arch/microblaze/kernel/entry-nommu.S b/arch/microblaze/kernel/entry-nommu.S index 96f97f8..7e394fc 100644 --- a/arch/microblaze/kernel/entry-nommu.S +++ b/arch/microblaze/kernel/entry-nommu.S @@ -124,6 +124,7 @@ ret_from_intr: lwi r11, r1, PT_MODE bneid r11, no_intr_resched +3: lwi r6, r31, TS_THREAD_INFO /* get thread info */ lwi r19, r6, TI_FLAGS /* get flags in thread info */ /* do an extra work if any bits are set */ @@ -132,11 +133,13 @@ ret_from_intr: beqi r11, 1f bralid r15, schedule nop + bri 3b 1: andi r11, r19, _TIF_SIGPENDING | _TIF_NOTIFY_RESUME beqid r11, no_intr_resched addk r5, r1, r0 bralid r15, do_notify_resume addk r6, r0, r0 + bri 3b no_intr_resched: /* Disable interrupts, we are now committed to the state restore */ @@ -486,18 +489,24 @@ ENTRY(ret_from_kernel_thread) work_pending: lwi r11, r1, PT_MODE bneid r11, 2f +3: enable_irq - andi r11, r19, _TIF_NEED_RESCHED beqi r11, 1f bralid r15, schedule nop + bri 4f 1: andi r11, r19, _TIF_SIGPENDING | _TIF_NOTIFY_RESUME beqi r11, no_work_pending addk r5, r30, r0 bralid r15, do_notify_resume addik r6, r0, 1 - bri no_work_pending + addk r30, r0, r0 /* no restarts from now on */ +4: + disable_irq + lwi r6, r31, TS_THREAD_INFO /* get thread info */ + lwi r19, r6, TI_FLAGS /* get flags in thread info */ + bri 3b ENTRY(ret_to_user) disable_irq |