Skip to contentSkip to conversation

Remove machine_is(chrp) from 64-bit kernel

PATCH In review David Woodhouse 2 participants 2 messages Jun 6, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Remove machine_is(chrp) from 64-bit kernel

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.

arch/powerpc/platforms/powermac/setup.c +2 -1
index 45936c9..c22f7e8 100644
@@ -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);
Signature · 2 lines
David Woodhouse                            Open Source Technology Centre
[email protected]                              Intel Corporation
#1 lore raw
Quoted 4 lines · David Woodhouse

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.

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.

Quoted 17 lines
arch/powerpc/platforms/powermac/setup.c +2 -1
index 45936c9..c22f7e8 100644
@@ -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);