Patchwork hide attr_smt_snooze_delay reference with CONFIG_PPC64

login
register
mail settings
Submitter Milton Miller
Date Nov. 16, 2008, 9:44 p.m.
Message ID <3122687188274b0dc514.424238335.miltonm@bga.com>
Download mbox | patch
Permalink /patch/8963/
State Accepted, archived
Commit a1e0eb104249817e5251bd4aade50921ffcb2159
Headers show

Comments

Milton Miller - Nov. 16, 2008, 9:44 p.m.
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
Nathan Lynch - Nov. 24, 2008, 9:19 p.m.
Milton Miller wrote:
> 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.)

Is this one going in?  The build is also broken for powermac 32-bit
SMP with HOTPLUG_CPU=y (which I can't figure out how to turn off,
grr).  And this isn't confined to -next; mainline is broken too.

Patch

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