While reading through head_64.S, I noticed two bugs in early
secondary processor startup.

The first patch fixes a register mismatch on Book3E where the
secondary thread entry point was loaded into r5 instead of r4
when thread switching is required, which jumps to data and
traps immediately.

The second patch fixes non SMP kernels where secondary processors
jump to kexec_wait without copying their physical CPU ID into r3,
leaving the next kernel with garbage during kexec.

Tested on ppc64.

Bradley Morgan (2):
  powerpc/64e: Pass entry point in r4 to book3e_start_thread()
  powerpc/64: Set r3 to physical CPU ID before kexec_wait on !SMP

 arch/powerpc/kernel/head_64.S | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

-- 
2.53.0


Reply via email to