Patchwork Remove machine_is(chrp) from 64-bit kernel

login
register
mail settings
Submitter David Woodhouse
Date June 6, 2009, 4:38 p.m.
Message ID <1244306290.3751.2032.camel@macbook.infradead.org>
Download mbox | patch
Permalink /patch/28190/
State Rejected
Headers show

Comments

David Woodhouse - June 6, 2009, 4:38 p.m.
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>
Benjamin Herrenschmidt - June 6, 2009, 9:15 p.m.
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);
>

Patch

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