aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/mmzone_32.h
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-06-08 21:31:54 -0400
committerIngo Molnar <mingo@elte.hu>2008-06-10 05:34:42 -0400
commitd49c4288407b2ffa8cab270cb5bc6882abe969f6 (patch)
tree8ad69dcc6f70ab18a4dfdf8d39dc4dff96ae1fd9 /include/asm-x86/mmzone_32.h
parente0da33646826b66ef933d47ea2fb7a693fd849bf (diff)
x86: make generic arch support NUMAQ
... so it could fall back to normal numa and we'd reduce the impact of the NUMAQ subarch. NUMAQ depends on GENERICARCH also decouple genericarch numa from acpi. also make it fall back to bigsmp if apicid > 8. Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/asm-x86/mmzone_32.h')
-rw-r--r--include/asm-x86/mmzone_32.h18
1 files changed, 4 insertions, 14 deletions
diff --git a/include/asm-x86/mmzone_32.h b/include/asm-x86/mmzone_32.h
index ab0012888c44..b2298a227567 100644
--- a/include/asm-x86/mmzone_32.h
+++ b/include/asm-x86/mmzone_32.h
@@ -12,11 +12,9 @@
12extern struct pglist_data *node_data[]; 12extern struct pglist_data *node_data[];
13#define NODE_DATA(nid) (node_data[nid]) 13#define NODE_DATA(nid) (node_data[nid])
14 14
15#ifdef CONFIG_X86_NUMAQ 15#include <asm/numaq.h>
16 #include <asm/numaq.h> 16/* summit or generic arch */
17#elif defined(CONFIG_ACPI_SRAT)/* summit or generic arch */ 17#include <asm/srat.h>
18 #include <asm/srat.h>
19#endif
20 18
21extern int get_memcfg_numa_flat(void); 19extern int get_memcfg_numa_flat(void);
22/* 20/*
@@ -26,14 +24,11 @@ extern int get_memcfg_numa_flat(void);
26 */ 24 */
27static inline void get_memcfg_numa(void) 25static inline void get_memcfg_numa(void)
28{ 26{
29#ifdef CONFIG_X86_NUMAQ 27
30 if (get_memcfg_numaq()) 28 if (get_memcfg_numaq())
31 return; 29 return;
32#elif defined(CONFIG_ACPI_SRAT)
33 if (get_memcfg_from_srat()) 30 if (get_memcfg_from_srat())
34 return; 31 return;
35#endif
36
37 get_memcfg_numa_flat(); 32 get_memcfg_numa_flat();
38} 33}
39 34
@@ -42,7 +37,6 @@ extern int early_pfn_to_nid(unsigned long pfn);
42#else /* !CONFIG_NUMA */ 37#else /* !CONFIG_NUMA */
43 38
44#define get_memcfg_numa get_memcfg_numa_flat 39#define get_memcfg_numa get_memcfg_numa_flat
45#define get_zholes_size(n) (0)
46 40
47#endif /* CONFIG_NUMA */ 41#endif /* CONFIG_NUMA */
48 42
@@ -83,9 +77,6 @@ static inline int pfn_to_nid(unsigned long pfn)
83 __pgdat->node_start_pfn + __pgdat->node_spanned_pages; \ 77 __pgdat->node_start_pfn + __pgdat->node_spanned_pages; \
84}) 78})
85 79
86#ifdef CONFIG_X86_NUMAQ /* we have contiguous memory on NUMA-Q */
87#define pfn_valid(pfn) ((pfn) < num_physpages)
88#else
89static inline int pfn_valid(int pfn) 80static inline int pfn_valid(int pfn)
90{ 81{
91 int nid = pfn_to_nid(pfn); 82 int nid = pfn_to_nid(pfn);
@@ -94,7 +85,6 @@ static inline int pfn_valid(int pfn)
94 return (pfn < node_end_pfn(nid)); 85 return (pfn < node_end_pfn(nid));
95 return 0; 86 return 0;
96} 87}
97#endif /* CONFIG_X86_NUMAQ */
98 88
99#endif /* CONFIG_DISCONTIGMEM */ 89#endif /* CONFIG_DISCONTIGMEM */
100 90