summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2023-08-01 20:26:50 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2023-08-01 21:01:27 +1000
commit2dc0bc1138eecc88b2c376ccb0b0acb215c25a5c (patch)
treeabf2ef33cd06a0cb680cac4bebd4d14757eae009 /arch/powerpc/kernel
parent41a506ef71eb38d94fe133f565c87c3e06ccc072 (diff)
downloadlinux-stable-2dc0bc1138eecc88b2c376ccb0b0acb215c25a5c.tar.gz
linux-stable-2dc0bc1138eecc88b2c376ccb0b0acb215c25a5c.tar.bz2
linux-stable-2dc0bc1138eecc88b2c376ccb0b0acb215c25a5c.zip
powerpc/64e: Fix secondary thread bringup for ELFv2 kernels
When booting on e6500 with an ELF v2 ABI kernel, the secondary threads do not start correctly: [ 0.051118] smp: Bringing up secondary CPUs ... [ 5.072700] Processor 1 is stuck. This occurs because the startup code is written to use function descriptors when loading the entry point for the secondary threads. When building with ELF v2 ABI there are no function descriptors, and the code loads junk values for the entry point address. Fix it by using ppc_function_entry() in C, and DOTSYM() in asm, both of which work correctly for ELF v2 ABI as well as ELF v1 ABI kernels. Fixes: 8c5fa3b5c4df ("powerpc/64: Make ELFv2 the default for big-endian builds") Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20230801102650.48705-1-mpe@ellerman.id.au
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/head_64.S3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S
index f132d8704263..6440b1bb332a 100644
--- a/arch/powerpc/kernel/head_64.S
+++ b/arch/powerpc/kernel/head_64.S
@@ -375,8 +375,7 @@ _GLOBAL(generic_secondary_smp_init)
beq 20f
/* start the specified thread */
- LOAD_REG_ADDR(r5, fsl_secondary_thread_init)
- ld r4, 0(r5)
+ LOAD_REG_ADDR(r5, DOTSYM(fsl_secondary_thread_init))
bl book3e_start_thread
/* stop the current thread */