From: Michael Neuling <mikey@neuling•org>
To: linuxppc-dev@ozlabs•org, Jon Loeliger <jdl@jdl•com>
Subject: [PATCH] dtc: fix endian issue when reading blobs
Date: Fri, 07 Jul 2006 15:53:10 +1000 [thread overview]
Message-ID: <20060707055313.E6FC067A2E@ozlabs.org> (raw)
The reserve mem regions are screwy if you read a blob on x86. I'm
guessing there may be a few more of these lurking in the code.
Signed-off-by: Michael Neuling <mikey@neuling•org>
---
This now gives clean diffs between running on big and little endian machines.
flattree.c | 2 ++
1 file changed, 2 insertions(+)
Index: dtc/flattree.c
===================================================================
--- dtc.orig/flattree.c
+++ dtc/flattree.c
@@ -619,6 +619,8 @@ static struct reserve_info *flat_read_me
p = inb->ptr;
while (1) {
flat_read_chunk(inb, &re, sizeof(re));
+ re.address = cpu_to_be64(re.address);
+ re.size = cpu_to_be64(re.size);
if (re.size == 0)
break;
next reply other threads:[~2006-07-07 5:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-07 5:53 Michael Neuling [this message]
2006-07-07 13:28 ` [PATCH] dtc: fix endian issue when reading blobs Michael Neuling
2006-07-07 14:36 ` Jon Loeliger
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=20060707055313.E6FC067A2E@ozlabs.org \
--to=mikey@neuling$(echo .)org \
--cc=jdl@jdl$(echo .)com \
--cc=linuxppc-dev@ozlabs$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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