From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: To: linuxppc-dev@ozlabs.org From: Michael Neuling Subject: Re: [PATCH] dtc: fix endian issue when reading blobs In-reply-to: <20060707055313.E6FC067A2E@ozlabs.org> References: <20060707055313.E6FC067A2E@ozlabs.org> Date: Fri, 07 Jul 2006 23:28:10 +1000 Sender: mikey@ozlabs.org Message-Id: <20060707132811.B1A4267B55@ozlabs.org> Cc: Jon Loeliger , miltonm@bga.com Reply-To: Michael Neuling List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 --- Oops.. wrong way around.. thanks Milton. 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 = be64_to_cpu(re.address); + re.size = be64_to_cpu(re.size); if (re.size == 0) break;