[PATCH] hide attr_smt_snooze_delay reference with CONFIG_PPC64

Milton Miller miltonm at bga.com
Mon Nov 17 08:44:42 EST 2008


attr_smt_snooze_delay is defined for CONFIG_PPC64, so protect the attribute
removal with the same condition.

/data/home/miltonm/next.git/arch/powerpc/kernel/sysfs.c: In function ‘unregister_cpu_online’:
/data/home/miltonm/next.git/arch/powerpc/kernel/sysfs.c:722: error: ‘attr_smt_snooze_delay’ undeclared (first use in this function)
/data/home/miltonm/next.git/arch/powerpc/kernel/sysfs.c:722: error: (Each undeclared identifier is reported only once
/data/home/miltonm/next.git/arch/powerpc/kernel/sysfs.c:722: error: for each function it appears in.)

---
found with turning on SMP on ppc6xx_defconfig in next-20071107,
which ended up CONFIG_HOTPLUG_CPU=y


Index: next.git/arch/powerpc/kernel/sysfs.c
===================================================================
--- next.git.orig/arch/powerpc/kernel/sysfs.c	2008-11-16 01:48:32.000000000 -0600
+++ next.git/arch/powerpc/kernel/sysfs.c	2008-11-16 01:49:15.000000000 -0600
@@ -717,9 +717,11 @@ static void unregister_cpu_online(unsign
 
 	BUG_ON(!c->hotpluggable);
 
+#ifdef CONFIG_PPC64
 	if (!firmware_has_feature(FW_FEATURE_ISERIES) &&
 			cpu_has_feature(CPU_FTR_SMT))
 		sysdev_remove_file(s, &attr_smt_snooze_delay);
+#endif
 
 	/* PMC stuff */
 	switch (cur_cpu_spec->pmc_type) {



More information about the Linuxppc-dev mailing list