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>
This commit is contained in:
Anton Blanchard
2014-02-04 16:07:47 +11:00
parent 7167af7ceb
commit cc7efbf919
3 changed files with 19 additions and 13 deletions

View File

@@ -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); */
/*