]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Fix X86_GENERICARCH & NUMA compile error
authorAndrew Morton <akpm@osdl.org>
Tue, 30 Dec 2003 07:43:28 +0000 (23:43 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Tue, 30 Dec 2003 07:43:28 +0000 (23:43 -0800)
From: Matthew Dobson <colpatch@us.ibm.com>

Trying to build a kernel with both CONFIG_X86_GENERICARCH and
CONFIG_NUMA on results in a compile error.  This patch fixes that build
problem by adding a config option for NUMA on Summit which is used to
correctly conditionally compile arch/i386/kernel/summit.c and properly
ifdef the function calls used in generic code.  Please apply.

Running make -j24 bzImage
arch/i386/mach-generic/built-in.o: In function `mps_oem_check':
arch/i386/mach-generic/built-in.o(.text+0x3ce): undefined reference to
`setup_summit'
arch/i386/mach-generic/built-in.o: In function `acpi_madt_oem_check':
arch/i386/mach-generic/built-in.o(.text+0x468): undefined reference to
`setup_summit'
make: *** [.tmp_vmlinux1] Error 1

arch/i386/Kconfig
arch/i386/kernel/Makefile
arch/i386/kernel/summit.c
include/asm-i386/mach-summit/mach_mpparse.h
include/asm-i386/mpspec.h

index ca778debd09654fc1cc422c8496e0897db4db344..de830f5b8102fbb7beb3b7ef28de8bae3c74fee5 100644 (file)
@@ -115,10 +115,15 @@ config ACPI_SRAT
        default y
        depends on NUMA && (X86_SUMMIT || X86_GENERICARCH)
 
+config X86_SUMMIT_NUMA
+       bool
+       default y
+       depends on NUMA && (X86_SUMMIT || X86_GENERICARCH)
+
 config X86_CYCLONE_TIMER
-       bool 
-       default y
-       depends on X86_SUMMIT || X86_GENERICARCH
+       bool
+       default y
+       depends on X86_SUMMIT || X86_GENERICARCH
 
 config ES7000_CLUSTERED_APIC
        bool
index 1b74c7e5c2d68c107816c1ef7351208ce4671b96..6214b3b62e4d8dec4e1e09f6ff26b7ffce3429b2 100644 (file)
@@ -24,7 +24,7 @@ obj-$(CONFIG_X86_MPPARSE)     += mpparse.o
 obj-$(CONFIG_X86_LOCAL_APIC)   += apic.o nmi.o
 obj-$(CONFIG_X86_IO_APIC)      += io_apic.o
 obj-$(CONFIG_X86_NUMAQ)                += numaq.o
-obj-$(CONFIG_X86_SUMMIT)       += summit.o
+obj-$(CONFIG_X86_SUMMIT_NUMA)  += summit.o
 obj-$(CONFIG_EDD)              += edd.o
 obj-$(CONFIG_MODULES)          += module.o
 obj-y                          += sysenter.o vsyscall.o
index 85631359c808e07c38b3b5a3cb099e0367583636..1f049a5503335f8f2b9d88d3c9a9e2468f3ead92 100644 (file)
@@ -29,9 +29,8 @@
 #include <linux/mm.h>
 #include <linux/init.h>
 #include <asm/io.h>
-#include <mach_mpparse.h>
+#include <asm/mach-summit/mach_mpparse.h>
 
-#ifdef CONFIG_NUMA
 static void __init setup_pci_node_map_for_wpeg(int wpeg_num, struct rio_table_hdr *rth, 
                struct scal_detail **scal_nodes, struct rio_detail **rio_nodes){
        int twst_num = 0, node = 0, first_bus = 0;
@@ -169,4 +168,3 @@ void __init setup_summit(void)
                        /* It's a Winnipeg, it's got PCI Busses */
                        setup_pci_node_map_for_wpeg(i, rio_table_hdr, scal_devs, rio_devs);
 }
-#endif /* CONFIG_NUMA */
index 88d215ad7bdec82d7d157b318cdb74823912e884..e0b60053b9eac300ab89e27c8f2412cf76ff2ea9 100644 (file)
@@ -5,11 +5,11 @@
 
 extern int use_cyclone;
 
-#ifdef CONFIG_NUMA
+#ifdef CONFIG_X86_SUMMIT_NUMA
 extern void setup_summit(void);
-#else /* !CONFIG_NUMA */
+#else
 #define setup_summit() {}
-#endif /* CONFIG_NUMA */
+#endif
 
 static inline void mpc_oem_bus_info(struct mpc_config_bus *m, char *name, 
                                struct mpc_config_translation *translation)
index a4ee37cade68cd7d60a65fa631589e2acd6c1486..55bd3075d68f6dda140878978ed342e5a677775a 100644 (file)
@@ -27,10 +27,6 @@ extern unsigned long mp_lapic_addr;
 extern int pic_mode;
 extern int using_apic_timer;
 
-#ifdef CONFIG_X86_SUMMIT
-extern void setup_summit (void);
-#endif
-
 #ifdef CONFIG_ACPI_BOOT
 extern void mp_register_lapic (u8 id, u8 enabled);
 extern void mp_register_lapic_address (u64 address);