diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-04-29 04:43:50 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-03 18:16:02 -0500 |
commit | e9f9252667e383c0ccfd3570b358ccb72cd51359 (patch) | |
tree | b4df1eecc63538399cc9781bf2430bb3ec6e94b6 /arch/microblaze/kernel/entry-nommu.S | |
parent | 14203e19cbc562a79f49117c45c80639a1e65bdd (diff) |
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 96f97f845495..7e394fc2c439 100644 --- a/arch/microblaze/kernel/entry-nommu.S +++ b/arch/microblaze/kernel/entry-nommu.S | |||
@@ -124,6 +124,7 @@ ret_from_intr: | |||
124 | lwi r11, r1, PT_MODE | 124 | lwi r11, r1, PT_MODE |
125 | bneid r11, no_intr_resched | 125 | bneid r11, no_intr_resched |
126 | 126 | ||
127 | 3: | ||
127 | lwi r6, r31, TS_THREAD_INFO /* get thread info */ | 128 | lwi r6, r31, TS_THREAD_INFO /* get thread info */ |
128 | lwi r19, r6, TI_FLAGS /* get flags in thread info */ | 129 | lwi r19, r6, TI_FLAGS /* get flags in thread info */ |
129 | /* do an extra work if any bits are set */ | 130 | /* do an extra work if any bits are set */ |
@@ -132,11 +133,13 @@ ret_from_intr: | |||
132 | beqi r11, 1f | 133 | beqi r11, 1f |
133 | bralid r15, schedule | 134 | bralid r15, schedule |
134 | nop | 135 | nop |
136 | bri 3b | ||
135 | 1: andi r11, r19, _TIF_SIGPENDING | _TIF_NOTIFY_RESUME | 137 | 1: andi r11, r19, _TIF_SIGPENDING | _TIF_NOTIFY_RESUME |
136 | beqid r11, no_intr_resched | 138 | beqid r11, no_intr_resched |
137 | addk r5, r1, r0 | 139 | addk r5, r1, r0 |
138 | bralid r15, do_notify_resume | 140 | bralid r15, do_notify_resume |
139 | addk r6, r0, r0 | 141 | addk r6, r0, r0 |
142 | bri 3b | ||
140 | 143 | ||
141 | no_intr_resched: | 144 | no_intr_resched: |
142 | /* Disable interrupts, we are now committed to the state restore */ | 145 | /* Disable interrupts, we are now committed to the state restore */ |
@@ -486,18 +489,24 @@ ENTRY(ret_from_kernel_thread) | |||
486 | work_pending: | 489 | work_pending: |
487 | lwi r11, r1, PT_MODE | 490 | lwi r11, r1, PT_MODE |
488 | bneid r11, 2f | 491 | bneid r11, 2f |
492 | 3: | ||
489 | enable_irq | 493 | enable_irq |
490 | |||
491 | andi r11, r19, _TIF_NEED_RESCHED | 494 | andi r11, r19, _TIF_NEED_RESCHED |
492 | beqi r11, 1f | 495 | beqi r11, 1f |
493 | bralid r15, schedule | 496 | bralid r15, schedule |
494 | nop | 497 | nop |
498 | bri 4f | ||
495 | 1: andi r11, r19, _TIF_SIGPENDING | _TIF_NOTIFY_RESUME | 499 | 1: andi r11, r19, _TIF_SIGPENDING | _TIF_NOTIFY_RESUME |
496 | beqi r11, no_work_pending | 500 | beqi r11, no_work_pending |
497 | addk r5, r30, r0 | 501 | addk r5, r30, r0 |
498 | bralid r15, do_notify_resume | 502 | bralid r15, do_notify_resume |
499 | addik r6, r0, 1 | 503 | addik r6, r0, 1 |
500 | bri no_work_pending | 504 | addk r30, r0, r0 /* no restarts from now on */ |
505 | 4: | ||
506 | disable_irq | ||
507 | lwi r6, r31, TS_THREAD_INFO /* get thread info */ | ||
508 | lwi r19, r6, TI_FLAGS /* get flags in thread info */ | ||
509 | bri 3b | ||
501 | 510 | ||
502 | ENTRY(ret_to_user) | 511 | ENTRY(ret_to_user) |
503 | disable_irq | 512 | disable_irq |