summaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/misc_64.S
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2014-02-04 05:07:47 (GMT)
committerAnton Blanchard <anton@samba.org>2014-04-23 00:05:20 (GMT)
commitcc7efbf91933a4b59c20e60115c336b26dfc1195 (patch)
tree0b569b956d916dbcc2ce7f7f052ff8c3c0377ec4 /arch/powerpc/kernel/misc_64.S
parent7167af7cebedc7c2051184fef0e165aeb67d0b9d (diff)
downloadlinux-cc7efbf91933a4b59c20e60115c336b26dfc1195.tar.xz
powerpc: ABIv2 function calls must place target address in r12
To establish addressability quickly, ABIv2 requires the target address of the function being called to be in r12. Fix a number of places in assembly code that we do indirect function calls. We need to avoid function descriptors on ABIv2 too. Signed-off-by: Anton Blanchard <anton@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/misc_64.S')
-rw-r--r--arch/powerpc/kernel/misc_64.S8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S
index b39cf4a..bda85a1 100644
--- a/arch/powerpc/kernel/misc_64.S
+++ b/arch/powerpc/kernel/misc_64.S
@@ -595,8 +595,12 @@ _GLOBAL(kexec_sequence)
stw r6,kexec_flag-1b(5)
/* clear out hardware hash page table and tlb */
- ld r5,0(r27) /* deref function descriptor */
- mtctr r5
+#if !defined(_CALL_ELF) || _CALL_ELF != 2
+ ld r12,0(r27) /* deref function descriptor */
+#else
+ mr r12,r27
+#endif
+ mtctr r12
bctrl /* ppc_md.hpte_clear_all(void); */
/*