From: Shaju Abraham <shaju.abraham-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Subject: [PATCH] Fix the Kernel Crash if Initrd is not passed in Device tree
Date: Mon, 20 Sep 2010 15:58:54 +0530 [thread overview]
Message-ID: <1284978534-30944-1-git-send-email-shaju.abraham@linaro.org> (raw)
The code should check for the size of the phys_initrd_size rather than
phys_devtree_size before calling memblock_reserve().If initrd is not passed
from the Device Tree the parameters phys_initrd_start, and phys_initrd_size are
zeros.The kernel complaints with a BUG if the arguments passed to memblock_reserve
are zeroes.
Signed-off-by: Shaju Abraham <shaju.abraham-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
This patch applies to Grant Likely's tree test-devtree branch
arch/arm/mm/init.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 9ddace8..018b76e 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -310,7 +310,7 @@ void __init arm_memblock_init(struct meminfo *mi, struct machine_desc *mdesc)
}
#endif
#ifdef CONFIG_OF_FLATTREE
- if (phys_devtree_size)
+ if (phys_initrd_size)
memblock_reserve(phys_initrd_start, phys_initrd_size);
#endif
--
1.7.2
next reply other threads:[~2010-09-20 10:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-20 10:28 Shaju Abraham [this message]
[not found] ` <1284978534-30944-1-git-send-email-shaju.abraham-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2010-09-23 19:16 ` [PATCH] Fix the Kernel Crash if Initrd is not passed in Device tree Grant Likely
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=1284978534-30944-1-git-send-email-shaju.abraham@linaro.org \
--to=shaju.abraham-qsej5fyqhm4dnm+yrofe0a@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.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