devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm: Fix conversion to early_init_dt_scan() for non-DT platforms
@ 2013-10-03 12:50 Mark Brown
  2013-10-03 16:37 ` Rob Herring
       [not found] ` <1380804633-14130-1-git-send-email-broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
  0 siblings, 2 replies; 4+ messages in thread
From: Mark Brown @ 2013-10-03 12:50 UTC (permalink / raw)
  To: Rob Herring, Russell King
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Mark Brown

From: Mark Brown <broonie-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

Commit 67a964490bfd14 (arm: use early_init_dt_scan) in the OF tree in
-next converts ARM to use early_init_dt_scan(), factoring out some common
code. However it ignores the return value of the function meaning that on
non-DT platforms the kernel fails to boot as it attempts to configure
itself using DT.

Fix this by adding the appropriate return value check.

Signed-off-by: Mark Brown <broonie-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
 arch/arm/kernel/devtree.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/kernel/devtree.c b/arch/arm/kernel/devtree.c
index 04050f7..67f4ebe 100644
--- a/arch/arm/kernel/devtree.c
+++ b/arch/arm/kernel/devtree.c
@@ -198,7 +198,8 @@ const struct machine_desc * __init setup_machine_fdt(unsigned int dt_phys)
 	if (!dt_phys)
 		return NULL;
 
-	early_init_dt_scan(phys_to_virt(dt_phys));
+	if (!early_init_dt_scan(phys_to_virt(dt_phys)))
+		return NULL;
 
 	/* Search the mdescs for the 'best' compatible value match */
 	dt_root = of_get_flat_dt_root();
-- 
1.8.4.rc3

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] arm: Fix conversion to early_init_dt_scan() for non-DT platforms
  2013-10-03 12:50 [PATCH] arm: Fix conversion to early_init_dt_scan() for non-DT platforms Mark Brown
@ 2013-10-03 16:37 ` Rob Herring
       [not found]   ` <524D9D60.7000804-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
       [not found] ` <1380804633-14130-1-git-send-email-broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
  1 sibling, 1 reply; 4+ messages in thread
From: Rob Herring @ 2013-10-03 16:37 UTC (permalink / raw)
  To: Mark Brown; +Cc: devicetree, Russell King, linux-arm-kernel, Mark Brown

On 10/03/2013 07:50 AM, Mark Brown wrote:
> From: Mark Brown <broonie@linaro.org>
> 
> Commit 67a964490bfd14 (arm: use early_init_dt_scan) in the OF tree in
> -next converts ARM to use early_init_dt_scan(), factoring out some common
> code. However it ignores the return value of the function meaning that on
> non-DT platforms the kernel fails to boot as it attempts to configure
> itself using DT.
> 
> Fix this by adding the appropriate return value check.

I have this fixed already in my tree. I had not pushed out my -next
branch with the fix, but have done so now.

Rob

> 
> Signed-off-by: Mark Brown <broonie@linaro.org>
> ---
>  arch/arm/kernel/devtree.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/arm/kernel/devtree.c b/arch/arm/kernel/devtree.c
> index 04050f7..67f4ebe 100644
> --- a/arch/arm/kernel/devtree.c
> +++ b/arch/arm/kernel/devtree.c
> @@ -198,7 +198,8 @@ const struct machine_desc * __init setup_machine_fdt(unsigned int dt_phys)
>  	if (!dt_phys)
>  		return NULL;
>  
> -	early_init_dt_scan(phys_to_virt(dt_phys));
> +	if (!early_init_dt_scan(phys_to_virt(dt_phys)))
> +		return NULL;
>  
>  	/* Search the mdescs for the 'best' compatible value match */
>  	dt_root = of_get_flat_dt_root();
> 

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

* Re: [PATCH] arm: Fix conversion to early_init_dt_scan() for non-DT platforms
       [not found] ` <1380804633-14130-1-git-send-email-broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
@ 2013-10-03 16:39   ` Olof Johansson
  0 siblings, 0 replies; 4+ messages in thread
From: Olof Johansson @ 2013-10-03 16:39 UTC (permalink / raw)
  To: Mark Brown
  Cc: Rob Herring, Russell King,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Mark Brown

On Thu, Oct 3, 2013 at 5:50 AM, Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote:
> From: Mark Brown <broonie-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
>
> Commit 67a964490bfd14 (arm: use early_init_dt_scan) in the OF tree in
> -next converts ARM to use early_init_dt_scan(), factoring out some common
> code. However it ignores the return value of the function meaning that on
> non-DT platforms the kernel fails to boot as it attempts to configure
> itself using DT.
>
> Fix this by adding the appropriate return value check.
>
> Signed-off-by: Mark Brown <broonie-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

Hm, I thought I had reported this to Rob and he had fixed it already.
Is a stale version of the patches in the DT tree?


-Olof
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH] arm: Fix conversion to early_init_dt_scan() for non-DT platforms
       [not found]   ` <524D9D60.7000804-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2013-10-03 18:20     ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2013-10-03 18:20 UTC (permalink / raw)
  To: Rob Herring
  Cc: Russell King, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 244 bytes --]

On Thu, Oct 03, 2013 at 11:37:52AM -0500, Rob Herring wrote:

> I have this fixed already in my tree. I had not pushed out my -next
> branch with the fix, but have done so now.

OK, thanks - so long as it gets fixed that's the important thing.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2013-10-03 18:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-03 12:50 [PATCH] arm: Fix conversion to early_init_dt_scan() for non-DT platforms Mark Brown
2013-10-03 16:37 ` Rob Herring
     [not found]   ` <524D9D60.7000804-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-10-03 18:20     ` Mark Brown
     [not found] ` <1380804633-14130-1-git-send-email-broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2013-10-03 16:39   ` Olof Johansson

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).