From: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
To: linuxppc-dev@ozlabs.org
Cc: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
Subject: [PATCH V3 0/2] powerpc/kexec: Reset endianess before kexec
Date: Fri, 10 Jul 2015 15:19:57 +1000 [thread overview]
Message-ID: <1436505599-32109-1-git-send-email-sam.mj@au1.ibm.com> (raw)
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
next reply other threads:[~2015-07-10 5:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-10 5:19 Samuel Mendoza-Jonas [this message]
2015-07-10 5:19 ` [PATCH V3 1/2] powerpc/kexec: Reset secondary cpu endianess before kexec Samuel Mendoza-Jonas
2015-07-10 5:19 ` [PATCH V3 2/2] powerpc/kexec: Reset HILE before entering target kernel Samuel Mendoza-Jonas
2015-07-17 1:53 ` Benjamin Herrenschmidt
2015-07-17 3:34 ` Benjamin Herrenschmidt
2015-07-17 9:59 ` Segher Boessenkool
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1436505599-32109-1-git-send-email-sam.mj@au1.ibm.com \
--to=sam.mj@au1.ibm.com \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).