summaryrefslogtreecommitdiffstats
path: root/arch/microblaze/kernel/entry-nommu.S
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-04-29 03:35:29 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-02-03 18:16:01 -0500
commitc886a9fc1f69c0e53788a9c4a780b6b8825bd4ab (patch)
treedc732cc68efe2bea82d9470a577252685832c44a /arch/microblaze/kernel/entry-nommu.S
parent4a9d32d377e1facca204cc1c6856406be8b53fa3 (diff)
downloadop-kernel-dev-c886a9fc1f69c0e53788a9c4a780b6b8825bd4ab.zip
op-kernel-dev-c886a9fc1f69c0e53788a9c4a780b6b8825bd4ab.tar.gz
microblaze: evict the check for kernel_mode(regs) from do_notify_resume()
Only one caller hasn't done it in assembler - work_pending on !MMU. Everything else can't reach do_notify_resume() if we are returning to kernel mode, so move that check to that sole caller and make do_notify_resume() reachable only when returning to userland. 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.S3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/microblaze/kernel/entry-nommu.S b/arch/microblaze/kernel/entry-nommu.S
index 70da83a4..29a05d6 100644
--- a/arch/microblaze/kernel/entry-nommu.S
+++ b/arch/microblaze/kernel/entry-nommu.S
@@ -482,6 +482,8 @@ ENTRY(ret_from_kernel_thread)
addk r3, r0, r0
work_pending:
+ lwi r11, r1, PT_MODE
+ bneid r11, 2f
enable_irq
andi r11, r19, _TIF_NEED_RESCHED
@@ -507,6 +509,7 @@ ENTRY(ret_to_user)
no_work_pending:
disable_irq
+2:
/* save r31 */
swi r31, r0, PER_CPU(CURRENT_SAVE)
/* save mode indicator */
OpenPOWER on IntegriCloud