[PATCH] make mach-generic/summit.c compile on UP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>

--- 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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux