aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/mmzone_32.h
diff options
context:
space:
mode:
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