powerpc: Define and use PPC64_ELF_ABI_v2/v1
authorMichael Ellerman <mpe@ellerman.id.au>
Mon, 6 Jun 2016 16:56:10 +0000 (22:26 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 14 Jun 2016 03:58:27 +0000 (13:58 +1000)
commitf55d966536034d33476fdd43c45d47225344469f
tree65437da4dfbe49e062ffb785c09e3748514a429f
parentac9cd1709c0be4334fbad4ab610ecb7acceac884
powerpc: Define and use PPC64_ELF_ABI_v2/v1

We're approaching 20 locations where we need to check for ELF ABI v2.
That's fine, except the logic is a bit awkward, because we have to check
that _CALL_ELF is defined and then what its value is.

So check it once in asm/types.h and define PPC64_ELF_ABI_v2 when ELF ABI
v2 is detected.

We also have a few places where what we're really trying to check is
that we are using the 64-bit v1 ABI, ie. function descriptors. So also
add a #define for that, which simplifies several checks.

Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
16 files changed:
arch/powerpc/include/asm/code-patching.h
arch/powerpc/include/asm/ftrace.h
arch/powerpc/include/asm/kprobes.h
arch/powerpc/include/asm/linkage.h
arch/powerpc/include/asm/ppc_asm.h
arch/powerpc/include/asm/ptrace.h
arch/powerpc/include/asm/sections.h
arch/powerpc/include/asm/types.h
arch/powerpc/kernel/entry_64.S
arch/powerpc/kernel/ftrace.c
arch/powerpc/kernel/head_64.S
arch/powerpc/kernel/kprobes.c
arch/powerpc/kernel/misc_64.S
arch/powerpc/kernel/module_64.c
arch/powerpc/kvm/book3s_interrupts.S
arch/powerpc/kvm/book3s_rmhandlers.S