diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-02-22 00:48:32 -0500 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2012-02-22 00:48:53 -0500 |
commit | 18b246fa60dd4bfc71c78d669e2ffaa5df454d6a (patch) | |
tree | ea9d8fecb9f83b4223032ffd9eb15a2d5bdbf335 /arch/powerpc/kernel/entry_64.S | |
parent | aa491ad3d4bf3c7994a419b3bb1c91b9b4fd2a8a (diff) |
powerpc: Fix various issues with return to userspace
We have a few problems when returning to userspace. This is a
quick set of fixes for 3.3, I'll look into a more comprehensive
rework for 3.4. This fixes:
- We kept interrupts soft-disabled when schedule'ing or calling
do_signal when returning to userspace as a result of a hardware
interrupt.
- Rename do_signal to do_notify_resume like all other archs (and
do_signal_pending back to do_signal, which it was before Roland
changed it).
- Add the missing call to key_replace_session_keyring() to
do_notify_resume().
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
Diffstat (limited to 'arch/powerpc/kernel/entry_64.S')
-rw-r--r-- | arch/powerpc/kernel/entry_64.S | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S index d834425186ae..866462cbe2d8 100644 --- a/arch/powerpc/kernel/entry_64.S +++ b/arch/powerpc/kernel/entry_64.S | |||
@@ -751,12 +751,16 @@ user_work: | |||
751 | 751 | ||
752 | andi. r0,r4,_TIF_NEED_RESCHED | 752 | andi. r0,r4,_TIF_NEED_RESCHED |
753 | beq 1f | 753 | beq 1f |
754 | li r5,1 | ||
755 | TRACE_AND_RESTORE_IRQ(r5); | ||
754 | bl .schedule | 756 | bl .schedule |
755 | b .ret_from_except_lite | 757 | b .ret_from_except_lite |
756 | 758 | ||
757 | 1: bl .save_nvgprs | 759 | 1: bl .save_nvgprs |
760 | li r5,1 | ||
761 | TRACE_AND_RESTORE_IRQ(r5); | ||
758 | addi r3,r1,STACK_FRAME_OVERHEAD | 762 | addi r3,r1,STACK_FRAME_OVERHEAD |
759 | bl .do_signal | 763 | bl .do_notify_resume |
760 | b .ret_from_except | 764 | b .ret_from_except |
761 | 765 | ||
762 | unrecov_restore: | 766 | unrecov_restore: |