[PATCH V3 0/2] powerpc/kexec: Reset endianess before kexec
Samuel Mendoza-Jonas
sam.mj at au1.ibm.com
Fri Jul 10 15:19:57 AEST 2015
Older ppc64 kernels, namely those missing FIXUP_ENDIAN or opal_reinit_cpus,
will fail to boot if started via kexec from a little-endian kernel.
The following two patches make sure that the current endianess is reset to
big-endian just before entering the target kernel, and are accompanied by
a separate patch to kexec-lite that resets the endianess of the boot cpu.
Changes in v3:
Move the call to opal_reinit_cpus into kexec_sequence so we can call it in
real mode with interrupts disabled. Update the kexec_sequence prototype so
that we can check if OPAL is present.
Fix the !CONFIG_PPC_BOOK3S_64 case in kexec_wait to correctly branch to 0x60
Changes in v2:
Add an #ifdef for subarch-specific code
Neaten the endian check (and extra call to mfmsr!) by modifying the msr and
branching to the target kernel in the same call to rfid.
Samuel Mendoza-Jonas (2):
powerpc/kexec: Reset secondary cpu endianess before kexec
powerpc/kexec: Reset HILE before entering target kernel
arch/powerpc/kernel/machine_kexec_64.c | 6 ++++--
arch/powerpc/kernel/misc_64.S | 32 ++++++++++++++++++++++++++++----
2 files changed, 32 insertions(+), 6 deletions(-)
--
2.4.5
More information about the Linuxppc-dev
mailing list