From: Alexander Graf <agraf@suse.de>
To: linuxppc-dev@lists.ozlabs.org
Cc: Dinar Valeev <dvaleev@suse.com>, Anton Blanchard <anton@samba.org>
Subject: [PATCH 4/4] powerpc: Don't return to BE mode when we are already there
Date: Mon, 23 Dec 2013 02:24:45 +0100 [thread overview]
Message-ID: <1387761885-39599-5-git-send-email-agraf@suse.de> (raw)
In-Reply-To: <1387761885-39599-1-git-send-email-agraf@suse.de>
Our Little Endian kernels can now live in a world where they are
running with Big Endian interrupts enabled. That is great for kexec,
because now we don't have to switch back to Big Endian mode.
Indicate this in the code. Only try to go into Big Endian mode when
we're not already there yet.
Signed-off-by: Alexander Graf <agraf@suse.de>
---
arch/powerpc/platforms/pseries/setup.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index fb5d98c..7db1cf1 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -446,10 +446,15 @@ static void pSeries_machine_kexec(struct kimage *image)
#endif
#ifdef __LITTLE_ENDIAN__
+static bool ile_enabled;
+
long pseries_big_endian_exceptions(void)
{
long rc;
+ if (!ile_enabled)
+ return H_SUCCESS;
+
while (1) {
rc = enable_big_endian_exceptions();
if (!H_IS_LONG_BUSY(rc))
@@ -498,8 +503,12 @@ static long pseries_little_endian_exceptions(void)
while (1) {
rc = enable_little_endian_exceptions();
- if (!H_IS_LONG_BUSY(rc))
+
+ if (!H_IS_LONG_BUSY(rc)) {
+ ile_enabled = true;
return rc;
+ }
+
mdelay(get_longbusy_msecs(rc));
}
}
--
1.8.1.4
prev parent reply other threads:[~2013-12-23 1:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-23 1:24 [PATCH 0/4] powerpc: Enable ILE on pSeries without H_MODE_SET Alexander Graf
2013-12-23 1:24 ` [PATCH 1/4] powerpc: Add global exports for all interrupt vectors Alexander Graf
2013-12-23 1:24 ` [PATCH 2/4] powerpc: Add relocation code for fixups Alexander Graf
2013-12-23 1:24 ` [PATCH 3/4] powerpc: Add hack to make ppc64le work on hosts without ILE Alexander Graf
2013-12-23 1:24 ` Alexander Graf [this message]
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=1387761885-39599-5-git-send-email-agraf@suse.de \
--to=agraf@suse.de \
--cc=anton@samba.org \
--cc=dvaleev@suse.com \
--cc=linuxppc-dev@lists.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).