Skip to contentSkip to conversation

x86_64: UP build fix, arch/x86_64/kernel/mce_amd.c

PATCH In review Ingo Molnar 2 participants 3 messages Nov 16, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86_64: UP build fix, arch/x86_64/kernel/mce_amd.c

Subject: [patch] x86_64: UP build fix, arch/x86_64/kernel/mce_amd.c
From: Ingo Molnar <[email protected]>

fix x86_64/kernel/mce_amd.c build bug:

arch/x86_64/kernel/mce_amd.c: In function ‘threshold_remove_bank’:
arch/x86_64/kernel/mce_amd.c:597: error: ‘shared_bank’ undeclared (first use in this function) arch/x86_64/kernel/mce_amd.c:597: error: (Each undeclared identifier is reported only once arch/x86_64/kernel/mce_amd.c:597: error: for each function it appears in.) make[1]: *** [arch/x86_64/kernel/mce_amd.o] Error 1
make: *** [arch/x86_64/kernel/mce_amd.o] Error 2

---
 arch/x86_64/kernel/mce_amd.c |    2 ++
 1 file changed, 2 insertions(+)
arch/x86_64/kernel/mce_amd.c +2 -0
Index: linux/arch/x86_64/kernel/mce_amd.c
===================================================================
@@ -593,12 +593,14 @@ static void threshold_remove_bank(unsign
 
 	sprintf(name, "threshold_bank%i", bank);
 
+#ifdef CONFIG_SMP
 	/* sibling symlink */
 	if (shared_bank[bank] && b->blocks->cpu != cpu) {
 		sysfs_remove_link(&per_cpu(device_mce, cpu).kobj, name);
 		per_cpu(threshold_banks, cpu)[bank] = NULL;
 		return;
 	}
+#endif
 
 	/* remove all sibling symlinks before unregistering */
 	for_each_cpu_mask(i, b->cpus) {
#1 lore raw
Quoted 5 lines · Ingo Molnar

Subject: [patch] x86_64: UP build fix, arch/x86_64/kernel/mce_amd.c
From: Ingo Molnar <[email protected]>

fix x86_64/kernel/mce_amd.c build bug:

Quoted 8 lines

arch/x86_64/kernel/mce_amd.c: In function ‘threshold_remove_bank’:
arch/x86_64/kernel/mce_amd.c:597: error: ‘shared_bank’ undeclared (first use in this function) arch/x86_64/kernel/mce_amd.c:597: error: (Each undeclared identifier is reported only once arch/x86_64/kernel/mce_amd.c:597: error: for each function it appears in.) make[1]: *** [arch/x86_64/kernel/mce_amd.o] Error 1
make: *** [arch/x86_64/kernel/mce_amd.o] Error 2

Hmm, it builds for me.

% grep SMP .config
CONFIG_BROKEN_ON_SMP=y
# CONFIG_X86_VSMP is not set
# CONFIG_SMP is not set
% grep MCE_AMD .config
CONFIG_X86_MCE_AMD=y
% ls -l vmlinux
-rwxr-xr-x 1 andi users 9174494 2006-11-16 10:20 vmlinux

(basically just defconfig with CONFIG_SMP disabled)

Perhaps a include ordering problem? Can you send your .config?

-Andi

#2 lore raw
Quoted 10 lines · Andi Kleen
Quoted 8 lines

arch/x86_64/kernel/mce_amd.c: In function ‘threshold_remove_bank’:
arch/x86_64/kernel/mce_amd.c:597: error: ‘shared_bank’ undeclared (first use in this function) arch/x86_64/kernel/mce_amd.c:597: error: (Each undeclared identifier is reported only once arch/x86_64/kernel/mce_amd.c:597: error: for each function it appears in.) make[1]: *** [arch/x86_64/kernel/mce_amd.o] Error 1
make: *** [arch/x86_64/kernel/mce_amd.o] Error 2

Hmm, it builds for me.

sorry - this is ontop of:

Subject: [patch] hotplug CPU: clean up hotcpu_notifier() use

Ingo