All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dtc: fix endian issue when reading blobs
@ 2006-07-07  5:53 Michael Neuling
  2006-07-07 13:28 ` Michael Neuling
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Neuling @ 2006-07-07  5:53 UTC (permalink / raw)
  To: linuxppc-dev, Jon Loeliger

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;
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-07-07 14:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-07  5:53 [PATCH] dtc: fix endian issue when reading blobs Michael Neuling
2006-07-07 13:28 ` Michael Neuling
2006-07-07 14:36   ` Jon Loeliger

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.