aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/head_64.S
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2016-06-06 22:26:10 +0530
committerMichael Ellerman <mpe@ellerman.id.au>2016-06-14 13:58:27 +1000
commitf55d966536034d33476fdd43c45d47225344469f (patch)
tree65437da4dfbe49e062ffb785c09e3748514a429f /arch/powerpc/kernel/head_64.S
parentpowerpc/pseries: Remove MPIC from pseries event sources (diff)
downloadlinux-dev-f55d966536034d33476fdd43c45d47225344469f.tar.xz
linux-dev-f55d966536034d33476fdd43c45d47225344469f.zip
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>
Diffstat (limited to '')
-rw-r--r--arch/powerpc/kernel/head_64.S2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S
index 2d14774af6b4..064cd9397836 100644
--- a/arch/powerpc/kernel/head_64.S
+++ b/arch/powerpc/kernel/head_64.S
@@ -401,7 +401,7 @@ generic_secondary_common_init:
ld r12,CPU_SPEC_RESTORE(r23)
cmpdi 0,r12,0
beq 3f
-#if !defined(_CALL_ELF) || _CALL_ELF != 2
+#ifdef PPC64_ELF_ABI_v1
ld r12,0(r12)
#endif
mtctr r12