devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix the Kernel Crash if Initrd is not passed in Device tree
@ 2010-09-20 10:28 Shaju Abraham
       [not found] ` <1284978534-30944-1-git-send-email-shaju.abraham-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Shaju Abraham @ 2010-09-20 10:28 UTC (permalink / raw)
  To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ

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

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

* Re: [PATCH] Fix the Kernel Crash if Initrd is not passed in Device tree
       [not found] ` <1284978534-30944-1-git-send-email-shaju.abraham-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
@ 2010-09-23 19:16   ` Grant Likely
  0 siblings, 0 replies; 2+ messages in thread
From: Grant Likely @ 2010-09-23 19:16 UTC (permalink / raw)
  To: Shaju Abraham; +Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ

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.

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

end of thread, other threads:[~2010-09-23 19:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).