diff options
author | Anton Blanchard <anton@samba.org> | 2014-02-04 16:07:47 +1100 |
---|---|---|
committer | Anton Blanchard <anton@samba.org> | 2014-04-23 10:05:20 +1000 |
commit | cc7efbf91933a4b59c20e60115c336b26dfc1195 (patch) | |
tree | 0b569b956d916dbcc2ce7f7f052ff8c3c0377ec4 /arch/powerpc/kernel/misc_64.S | |
parent | 7167af7cebedc7c2051184fef0e165aeb67d0b9d (diff) | |
download | linux-next-cc7efbf91933a4b59c20e60115c336b26dfc1195.tar.gz |
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.S | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S index b39cf4afad4b..bda85a193abf 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); */ /* |