浏览代码

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>
Tejun Heo 14 年之前
父节点
当前提交
daf4f480ae
共有 2 个文件被更改,包括 10 次插入19 次删除
  1. 0 18
      arch/x86/include/asm/mmzone_32.h
  2. 10 1
      arch/x86/mm/numa_32.c

+ 0 - 18
arch/x86/include/asm/mmzone_32.h

@@ -16,28 +16,10 @@ extern struct pglist_data *node_data[];
 /* summit or generic arch */
 /* summit or generic arch */
 #include <asm/srat.h>
 #include <asm/srat.h>
 
 
-extern int get_memcfg_numa_flat(void);
-/*
- * This allows any one NUMA architecture to be compiled
- * for, and still fall back to the flat function if it
- * fails.
- */
-static inline void get_memcfg_numa(void)
-{
-
-	if (get_memcfg_numaq())
-		return;
-	if (get_memcfg_from_srat())
-		return;
-	get_memcfg_numa_flat();
-}
-
 extern void resume_map_numa_kva(pgd_t *pgd);
 extern void resume_map_numa_kva(pgd_t *pgd);
 
 
 #else /* !CONFIG_NUMA */
 #else /* !CONFIG_NUMA */
 
 
-#define get_memcfg_numa get_memcfg_numa_flat
-
 static inline void resume_map_numa_kva(pgd_t *pgd) {}
 static inline void resume_map_numa_kva(pgd_t *pgd) {}
 
 
 #endif /* CONFIG_NUMA */
 #endif /* CONFIG_NUMA */

+ 10 - 1
arch/x86/mm/numa_32.c

@@ -112,7 +112,7 @@ void set_pmd_pfn(unsigned long vaddr, unsigned long pfn, pgprot_t flags);
  *        a single node with all available processors in it with a flat
  *        a single node with all available processors in it with a flat
  *        memory map.
  *        memory map.
  */
  */
-int __init get_memcfg_numa_flat(void)
+static int __init get_memcfg_numa_flat(void)
 {
 {
 	printk(KERN_DEBUG "NUMA - single node, flat memory mode\n");
 	printk(KERN_DEBUG "NUMA - single node, flat memory mode\n");
 
 
@@ -332,6 +332,15 @@ static __init void init_alloc_remap(int nid)
 	       nid, node_pa, node_pa + size, remap_va, remap_va + size);
 	       nid, node_pa, node_pa + size, remap_va, remap_va + size);
 }
 }
 
 
+static void get_memcfg_numa(void)
+{
+	if (get_memcfg_numaq())
+		return;
+	if (get_memcfg_from_srat())
+		return;
+	get_memcfg_numa_flat();
+}
+
 void __init initmem_init(void)
 void __init initmem_init(void)
 {
 {
 	int nid;
 	int nid;