mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Chou <thomas@wytron.com.tw>
To: devicetree-discuss@lists.ozlabs.org
Cc: linux-kernel@vger.kernel.org, linux-mips@linux-mips.org,
	ralf@linux-mips.org, grant.likely@secretlab.ca,
	David Daney <ddaney@caviumnetworks.com>,
	Dezhong Diao <dediao@cisco.com>,
	Thomas Chou <thomas@wytron.com.tw>
Subject: [PATCH] of/mips: fix fdt size as be32
Date: Wed, 24 Nov 2010 15:35:48 +0800	[thread overview]
Message-ID: <1290584148-23111-1-git-send-email-thomas@wytron.com.tw> (raw)

The totalsize field was be32. And the reserve bootmem would cause
failure.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
---
 arch/mips/kernel/prom.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/mips/kernel/prom.c b/arch/mips/kernel/prom.c
index e000b27..9dbe583 100644
--- a/arch/mips/kernel/prom.c
+++ b/arch/mips/kernel/prom.c
@@ -100,7 +100,7 @@ void __init device_tree_init(void)
 		return;
 
 	base = virt_to_phys((void *)initial_boot_params);
-	size = initial_boot_params->totalsize;
+	size = be32_to_cpu(initial_boot_params->totalsize);
 
 	/* Before we do anything, lets reserve the dt blob */
 	reserve_mem_mach(base, size);
-- 
1.7.3.2


             reply	other threads:[~2010-11-24  7:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-24  7:35 Thomas Chou [this message]
2010-11-24 12:01 ` Ralf Baechle

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=1290584148-23111-1-git-send-email-thomas@wytron.com.tw \
    --to=thomas@wytron.com.tw \
    --cc=ddaney@caviumnetworks.com \
    --cc=dediao@cisco.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.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

all inboxes | Powered by JetHome®