diff options
Diffstat (limited to 'arch/x86/include/asm/mmzone_32.h')
-rw-r--r-- | arch/x86/include/asm/mmzone_32.h | 33 |
1 files changed, 2 insertions, 31 deletions
diff --git a/arch/x86/include/asm/mmzone_32.h b/arch/x86/include/asm/mmzone_32.h index 91df7c51806c..ffa037f28d39 100644 --- a/arch/x86/include/asm/mmzone_32.h +++ b/arch/x86/include/asm/mmzone_32.h | |||
@@ -13,31 +13,11 @@ extern struct pglist_data *node_data[]; | |||
13 | #define NODE_DATA(nid) (node_data[nid]) | 13 | #define NODE_DATA(nid) (node_data[nid]) |
14 | 14 | ||
15 | #include <asm/numaq.h> | 15 | #include <asm/numaq.h> |
16 | /* summit or generic arch */ | ||
17 | #include <asm/srat.h> | ||
18 | |||
19 | extern int get_memcfg_numa_flat(void); | ||
20 | /* | ||
21 | * This allows any one NUMA architecture to be compiled | ||
22 | * for, and still fall back to the flat function if it | ||
23 | * fails. | ||
24 | */ | ||
25 | static inline void get_memcfg_numa(void) | ||
26 | { | ||
27 | |||
28 | if (get_memcfg_numaq()) | ||
29 | return; | ||
30 | if (get_memcfg_from_srat()) | ||
31 | return; | ||
32 | get_memcfg_numa_flat(); | ||
33 | } | ||
34 | 16 | ||
35 | extern void resume_map_numa_kva(pgd_t *pgd); | 17 | extern void resume_map_numa_kva(pgd_t *pgd); |
36 | 18 | ||
37 | #else /* !CONFIG_NUMA */ | 19 | #else /* !CONFIG_NUMA */ |
38 | 20 | ||
39 | #define get_memcfg_numa get_memcfg_numa_flat | ||
40 | |||
41 | static inline void resume_map_numa_kva(pgd_t *pgd) {} | 21 | static inline void resume_map_numa_kva(pgd_t *pgd) {} |
42 | 22 | ||
43 | #endif /* CONFIG_NUMA */ | 23 | #endif /* CONFIG_NUMA */ |
@@ -68,17 +48,6 @@ static inline int pfn_to_nid(unsigned long pfn) | |||
68 | #endif | 48 | #endif |
69 | } | 49 | } |
70 | 50 | ||
71 | /* | ||
72 | * Following are macros that each numa implmentation must define. | ||
73 | */ | ||
74 | |||
75 | #define node_start_pfn(nid) (NODE_DATA(nid)->node_start_pfn) | ||
76 | #define node_end_pfn(nid) \ | ||
77 | ({ \ | ||
78 | pg_data_t *__pgdat = NODE_DATA(nid); \ | ||
79 | __pgdat->node_start_pfn + __pgdat->node_spanned_pages; \ | ||
80 | }) | ||
81 | |||
82 | static inline int pfn_valid(int pfn) | 51 | static inline int pfn_valid(int pfn) |
83 | { | 52 | { |
84 | int nid = pfn_to_nid(pfn); | 53 | int nid = pfn_to_nid(pfn); |
@@ -88,6 +57,8 @@ static inline int pfn_valid(int pfn) | |||
88 | return 0; | 57 | return 0; |
89 | } | 58 | } |
90 | 59 | ||
60 | #define early_pfn_valid(pfn) pfn_valid((pfn)) | ||
61 | |||
91 | #endif /* CONFIG_DISCONTIGMEM */ | 62 | #endif /* CONFIG_DISCONTIGMEM */ |
92 | 63 | ||
93 | #ifdef CONFIG_NEED_MULTIPLE_NODES | 64 | #ifdef CONFIG_NEED_MULTIPLE_NODES |