linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Remove machine_is(chrp) from 64-bit kernel
@ 2009-06-06 16:38 David Woodhouse
  2009-06-06 21:15 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 2+ messages in thread
From: David Woodhouse @ 2009-06-06 16:38 UTC (permalink / raw)
  To: benh; +Cc: linuxppc-dev

The CHRP platform type only exists in a 32-bit build. Don't bother
checking machine_is(chrp) if we're in 64-bit mode.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>

diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c
index 45936c9..c22f7e8 100644
--- a/arch/powerpc/platforms/powermac/setup.c
+++ b/arch/powerpc/platforms/powermac/setup.c
@@ -518,9 +518,10 @@ static int __init pmac_declare_of_platform_devices(void)
 {
 	struct device_node *np;
 
+#ifdef CONFIG_PPC32
 	if (machine_is(chrp))
 		return -1;
-
+#endif
 	np = of_find_node_by_name(NULL, "valkyrie");
 	if (np)
 		of_platform_device_create(np, "valkyrie", NULL);

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse@intel.com                              Intel Corporation

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

* Re: [PATCH] Remove machine_is(chrp) from 64-bit kernel
  2009-06-06 16:38 [PATCH] Remove machine_is(chrp) from 64-bit kernel David Woodhouse
@ 2009-06-06 21:15 ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Herrenschmidt @ 2009-06-06 21:15 UTC (permalink / raw)
  To: David Woodhouse; +Cc: linuxppc-dev

On Sat, 2009-06-06 at 17:38 +0100, David Woodhouse wrote:
> The CHRP platform type only exists in a 32-bit build. Don't bother
> checking machine_is(chrp) if we're in 64-bit mode.
> 
> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>

Isn't the test bogus anyway ? It should be if (!machine_is(powermac))
but is useless since the function is called via:

machine_device_initcall(powermac, pmac_declare_of_platform_devices);

Cheers,
Ben.

> diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c
> index 45936c9..c22f7e8 100644
> --- a/arch/powerpc/platforms/powermac/setup.c
> +++ b/arch/powerpc/platforms/powermac/setup.c
> @@ -518,9 +518,10 @@ static int __init pmac_declare_of_platform_devices(void)
>  {
>  	struct device_node *np;
>  
> +#ifdef CONFIG_PPC32
>  	if (machine_is(chrp))
>  		return -1;
> -
> +#endif
>  	np = of_find_node_by_name(NULL, "valkyrie");
>  	if (np)
>  		of_platform_device_create(np, "valkyrie", NULL);
> 

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

end of thread, other threads:[~2009-06-06 21:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-06 16:38 [PATCH] Remove machine_is(chrp) from 64-bit kernel David Woodhouse
2009-06-06 21:15 ` Benjamin Herrenschmidt

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