aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/entry_64.S
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2014-02-04 16:08:51 +1100
committerAnton Blanchard <anton@samba.org>2014-04-23 10:05:23 +1000
commit7cedd6014bfe353d4b552ed8d54d63f6e06e26ba (patch)
treee65291b54d3de8d90c370581d776dbb4d2aafe05 /arch/powerpc/kernel/entry_64.S
parentb86206e4c32cbe6ac3de1c6dc52c2d64bcf461cb (diff)
downloadlinux-7cedd6014bfe353d4b552ed8d54d63f6e06e26ba.tar.gz
powerpc: Fix kernel thread creation on ABIv2
Change how we setup registers for ret_from_kernel_thread. In ABIv1, instead of passing a function descriptor in, dereference it and pass the target in directly. Use ppc_global_function_entry to get it right on both ABIv1 and ABIv2. Signed-off-by: Anton Blanchard <anton@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/entry_64.S')
-rw-r--r--arch/powerpc/kernel/entry_64.S4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
index d23d7526d37a16..cf4f6e69343730 100644
--- a/arch/powerpc/kernel/entry_64.S
+++ b/arch/powerpc/kernel/entry_64.S
@@ -378,9 +378,11 @@ _GLOBAL(ret_from_fork)
_GLOBAL(ret_from_kernel_thread)
bl schedule_tail
REST_NVGPRS(r1)
- ld r14, 0(r14)
mtlr r14
mr r3,r15
+#if defined(_CALL_ELF) && _CALL_ELF == 2
+ mr r12,r14
+#endif
blrl
li r3,0
b syscall_exit