public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] make mach-generic/summit.c compile on UP
@ 2006-10-05 17:16 Jiri Kosina
  2006-10-05 20:31 ` keith mannthey
  0 siblings, 1 reply; 7+ messages in thread
From: Jiri Kosina @ 2006-10-05 17:16 UTC (permalink / raw)
  To: keith mannthey; +Cc: linux-kernel, Linus Torvalds

Hi,

arch/i386/mach-generic/summit.c doesn't compile (neither in current 
mainline git tree, nor in 2.6.18-mm3) when CONFIG_SMP is not set:

In file included from arch/i386/mach-generic/summit.c:17:
include/asm/mach-summit/mach_apic.h: In function 'apicid_to_node':
include/asm/mach-summit/mach_apic.h:91: error: 'apicid_2_node' undeclared (first use in this function)
include/asm/mach-summit/mach_apic.h:91: error: (Each undeclared identifier is reported only once
include/asm/mach-summit/mach_apic.h:91: error: for each function it appears in.)

Is the patch below correct?

Signed-off-by: Jiri Kosina <jikos@jikos.cz>

--- a/include/asm-i386/mach-summit/mach_apic.h
+++ b/include/asm-i386/mach-summit/mach_apic.h
@@ -88,7 +88,11 @@ static inline void clustered_apic_check(
 
 static inline int apicid_to_node(int logical_apicid)
 {
+#ifdef CONFIG_SMP
 	return apicid_2_node[hard_smp_processor_id()];
+#else
+	return 0;
+#endif
 }
 
 /* Mapping from cpu number to logical apicid */
diff --git a/include/asm-i386/smp.h b/include/asm-i386/smp.h

-- 
Jiri Kosina

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-10-06 17:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-05 17:16 [PATCH] make mach-generic/summit.c compile on UP Jiri Kosina
2006-10-05 20:31 ` keith mannthey
2006-10-05 21:18   ` Jiri Kosina
2006-10-05 22:24     ` keith mannthey
2006-10-06  9:11       ` Jiri Kosina
2006-10-06 17:23         ` keith mannthey
2006-10-05 23:11   ` Andi Kleen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox