]> git.hungrycats.org Git - linux/commitdiff
[PATCH] fix Summit srat.h includes
authorAndrew Morton <akpm@osdl.org>
Tue, 9 Sep 2003 17:21:22 +0000 (10:21 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Tue, 9 Sep 2003 17:21:22 +0000 (10:21 -0700)
From: Dave Hansen <haveblue@us.ibm.com>

I was compiling for my plain 'ol PC, and was getting unresolved symbols
for get_memcfg_from_srat() and get_zholes_size().  The CONFIG_NUMA
definition right now allows it to be turned on for plain old X86_PC.
Does anyone know why this is?

depends on SMP && HIGHMEM64G &&
          (X86_PC || X86_NUMAQ || X86_GENERICARCH ||
                  (X86_SUMMIT && ACPI && !ACPI_HT_ONLY))

In any case, the summit code incorrectly assumes in at least 2 places
that NUMA && !NUMAQ means summit.  Someone was evidently trying to cover
the generic subarch case, but that's already taken care of by the lovely
config system and CONFIG_ACPI_SRAT.  This patch fixes those assumptions
and adds a nice little warning for people that try to #include srat.h
without having srat support turned on.

include/asm-i386/mmzone.h
include/asm-i386/numnodes.h
include/asm-i386/srat.h

index d5da17912a8c1c1376777e78d1660b34d31deaab..cdae0e44df924d46c0b85466e9af8af8f5e57f8b 100644 (file)
@@ -119,7 +119,7 @@ static inline struct pglist_data *pfn_to_pgdat(unsigned long pfn)
 
 #ifdef CONFIG_X86_NUMAQ
 #include <asm/numaq.h>
-#elif CONFIG_NUMA      /* summit or generic arch */
+#elif CONFIG_ACPI_SRAT
 #include <asm/srat.h>
 #elif CONFIG_X86_PC
 #define get_memcfg_numa get_memcfg_numa_flat
index 1b7443f748a5c07374a65e2f15a6435793df760e..d77cbdcda572237334507a16fdfbae5d091d9514 100644 (file)
@@ -5,7 +5,7 @@
 
 #ifdef CONFIG_X86_NUMAQ
 #include <asm/numaq.h>
-#elif CONFIG_NUMA
+#elif CONFIG_ACPI_SRAT
 #include <asm/srat.h>
 #else
 #define MAX_NUMNODES   1
index d9ee373d894f8e171c4ffc1756cac6e17b084697..b71cca0553c3ceb79d075ae63c5fd9a521a2c1c9 100644 (file)
 #ifndef _ASM_SRAT_H_
 #define _ASM_SRAT_H_
 
+#ifndef CONFIG_ACPI_SRAT
+#error CONFIG_ACPI_SRAT not defined, and srat.h header has been included
+#endif
+
 #define MAX_NUMNODES           8
 extern void get_memcfg_from_srat(void);
 extern unsigned long *get_zholes_size(int);