From: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
To: Shaju Abraham <shaju.abraham-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
Subject: Re: [PATCH] Fix the Kernel Crash if Initrd is not passed in Device tree
Date: Thu, 23 Sep 2010 13:16:32 -0600 [thread overview]
Message-ID: <20100923191631.GA17400@angua.secretlab.ca> (raw)
In-Reply-To: <1284978534-30944-1-git-send-email-shaju.abraham-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
On Mon, Sep 20, 2010 at 03:58:54PM +0530, Shaju Abraham wrote:
> 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);
No, this is actually a bug in the memblock_reserve() line.
phys_devtree_start and phys_devtree_size should have been passed to
memblock_reserve(). This is now fixed in my tree.
prev parent reply other threads:[~2010-09-23 19:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-20 10:28 [PATCH] Fix the Kernel Crash if Initrd is not passed in Device tree Shaju Abraham
[not found] ` <1284978534-30944-1-git-send-email-shaju.abraham-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2010-09-23 19:16 ` Grant Likely [this message]
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=20100923191631.GA17400@angua.secretlab.ca \
--to=grant.likely-s3s/wqlpoipyb63q8fvjnq@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=shaju.abraham-QSEj5FYQhm4dnm+yROfE0A@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