diff options
author | Tejun Heo <tj@kernel.org> | 2011-05-02 08:18:53 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2011-05-02 08:18:53 -0400 |
commit | daf4f480ae24270bac06db4293908d36b4834e21 (patch) | |
tree | 017080a1325ae02b70006100de396640a94db2b8 /arch/x86 | |
parent | eca9ad313293c41021bfcf23e985a14f6991a121 (diff) |
x86-32, NUMA: Move get_memcfg_numa() into numa_32.c
There's no reason get_memcfg_numa() to be implemented inline in
mmzone_32.h. Move it to numa_32.c and also make
get_memcfg_numa_flag() static.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/include/asm/mmzone_32.h | 18 | ||||
-rw-r--r-- | arch/x86/mm/numa_32.c | 11 |
2 files changed, 10 insertions, 19 deletions
diff --git a/arch/x86/include/asm/mmzone_32.h b/arch/x86/include/asm/mmzone_32.h index 91df7c51806c..73e5745aef34 100644 --- a/arch/x86/include/asm/mmzone_32.h +++ b/arch/x86/include/asm/mmzone_32.h | |||
@@ -16,28 +16,10 @@ extern struct pglist_data *node_data[]; | |||
16 | /* summit or generic arch */ | 16 | /* summit or generic arch */ |
17 | #include <asm/srat.h> | 17 | #include <asm/srat.h> |
18 | 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 | |||
35 | extern void resume_map_numa_kva(pgd_t *pgd); | 19 | extern void resume_map_numa_kva(pgd_t *pgd); |
36 | 20 | ||
37 | #else /* !CONFIG_NUMA */ | 21 | #else /* !CONFIG_NUMA */ |
38 | 22 | ||
39 | #define get_memcfg_numa get_memcfg_numa_flat | ||
40 | |||
41 | static inline void resume_map_numa_kva(pgd_t *pgd) {} | 23 | static inline void resume_map_numa_kva(pgd_t *pgd) {} |
42 | 24 | ||
43 | #endif /* CONFIG_NUMA */ | 25 | #endif /* CONFIG_NUMA */ |
diff --git a/arch/x86/mm/numa_32.c b/arch/x86/mm/numa_32.c index f847fa1e02dc..abf1247a4c32 100644 --- a/arch/x86/mm/numa_32.c +++ b/arch/x86/mm/numa_32.c | |||
@@ -112,7 +112,7 @@ void set_pmd_pfn(unsigned long vaddr, unsigned long pfn, pgprot_t flags); | |||
112 | * a single node with all available processors in it with a flat | 112 | * a single node with all available processors in it with a flat |
113 | * memory map. | 113 | * memory map. |
114 | */ | 114 | */ |
115 | int __init get_memcfg_numa_flat(void) | 115 | static int __init get_memcfg_numa_flat(void) |
116 | { | 116 | { |
117 | printk(KERN_DEBUG "NUMA - single node, flat memory mode\n"); | 117 | printk(KERN_DEBUG "NUMA - single node, flat memory mode\n"); |
118 | 118 | ||
@@ -332,6 +332,15 @@ static __init void init_alloc_remap(int nid) | |||
332 | nid, node_pa, node_pa + size, remap_va, remap_va + size); | 332 | nid, node_pa, node_pa + size, remap_va, remap_va + size); |
333 | } | 333 | } |
334 | 334 | ||
335 | static void get_memcfg_numa(void) | ||
336 | { | ||
337 | if (get_memcfg_numaq()) | ||
338 | return; | ||
339 | if (get_memcfg_from_srat()) | ||
340 | return; | ||
341 | get_memcfg_numa_flat(); | ||
342 | } | ||
343 | |||
335 | void __init initmem_init(void) | 344 | void __init initmem_init(void) |
336 | { | 345 | { |
337 | int nid; | 346 | int nid; |