From: Laurent Dufour <ldufour@linux.vnet.ibm.com>
To: horms@verge.net.au, kexec@lists.infradead.org
Subject: [PATCH] ppc64/kexec/purgatory Fix RTAS calls in Little Endian mode.
Date: Mon, 13 Jan 2014 18:55:36 +0100 [thread overview]
Message-ID: <20140113175536.14913.16060.stgit@nimbus> (raw)
RTAS is expecting parameters in Big Endian order so we have to byte swap
them in LE mode.
In the purgatory RTAS calls are only made for debug output.
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
---
purgatory/arch/ppc64/console-ppc64.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/purgatory/arch/ppc64/console-ppc64.c b/purgatory/arch/ppc64/console-ppc64.c
index 78a233b..b80183c 100644
--- a/purgatory/arch/ppc64/console-ppc64.c
+++ b/purgatory/arch/ppc64/console-ppc64.c
@@ -21,6 +21,9 @@
#include <purgatory.h>
#include "hvCall.h"
+#include <byteswap.h>
+#include <endian.h>
+#include <asm/byteorder.h>
extern int debug;
@@ -36,6 +39,7 @@ void putchar(int c)
putchar('\r');
buff[0] = c;
- plpar_hcall_norets(H_PUT_TERM_CHAR, 0, 1, lbuf[0], lbuf[1]);
+ plpar_hcall_norets(H_PUT_TERM_CHAR, 0, 1,
+ __cpu_to_be64(lbuf[0]), __cpu_to_be64(lbuf[1]));
return;
}
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
reply other threads:[~2014-01-13 17:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20140113175536.14913.16060.stgit@nimbus \
--to=ldufour@linux.vnet.ibm.com \
--cc=horms@verge.net.au \
--cc=kexec@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.