There's no reason for these to live in setup_arch(). Move them inside
initmem_init().
- v2: x86-32 initmem_init() weren't updated breaking 32bit builds.
Fixed. Found by Ankita.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Ankita Garg <ankita@in.ibm.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Shaohui Zheng <shaohui.zheng@intel.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: H. Peter Anvin <hpa@linux.intel.com>
void init_memory_mapping_high(void);
void init_memory_mapping_high(void);
-extern void initmem_init(int acpi, int k8);
+extern void initmem_init(void);
extern void free_initmem(void);
#endif /* !__ASSEMBLY__ */
extern void free_initmem(void);
#endif /* !__ASSEMBLY__ */
void __init setup_arch(char **cmdline_p)
{
void __init setup_arch(char **cmdline_p)
{
- int acpi = 0;
- int amd = 0;
unsigned long flags;
#ifdef CONFIG_X86_32
unsigned long flags;
#ifdef CONFIG_X86_32
-#ifdef CONFIG_ACPI_NUMA
- /*
- * Parse SRAT to discover nodes.
- */
- acpi = !x86_acpi_numa_init();
-#endif
-
-#ifdef CONFIG_AMD_NUMA
- if (!acpi)
- amd = !amd_numa_init();
-#endif
-
- initmem_init(acpi, amd);
memblock_find_dma_reserve();
dma32_reserve_bootmem();
memblock_find_dma_reserve();
dma32_reserve_bootmem();
}
#ifndef CONFIG_NEED_MULTIPLE_NODES
}
#ifndef CONFIG_NEED_MULTIPLE_NODES
-void __init initmem_init(int acpi, int k8)
+void __init initmem_init(void)
{
#ifdef CONFIG_HIGHMEM
highstart_pfn = highend_pfn = max_pfn;
{
#ifdef CONFIG_HIGHMEM
highstart_pfn = highend_pfn = max_pfn;
-void __init initmem_init(int acpi, int k8)
+void __init initmem_init(void)
{
memblock_x86_register_active_regions(0, 0, max_pfn);
init_memory_mapping_high();
{
memblock_x86_register_active_regions(0, 0, max_pfn);
init_memory_mapping_high();
(ulong) node_remap_end_vaddr[nid]);
}
(ulong) node_remap_end_vaddr[nid]);
}
-void __init initmem_init(int acpi, int k8)
+void __init initmem_init(void)
{
int nid;
long kva_target_pfn;
{
int nid;
long kva_target_pfn;
#include <linux/module.h>
#include <linux/nodemask.h>
#include <linux/sched.h>
#include <linux/module.h>
#include <linux/nodemask.h>
#include <linux/sched.h>
#include <asm/e820.h>
#include <asm/proto.h>
#include <asm/e820.h>
#include <asm/proto.h>
}
#endif /* CONFIG_NUMA_EMU */
}
#endif /* CONFIG_NUMA_EMU */
-void __init initmem_init(int acpi, int amd)
+void __init initmem_init(void)
+#ifdef CONFIG_ACPI_NUMA
+ /*
+ * Parse SRAT to discover nodes.
+ */
+ acpi = !x86_acpi_numa_init();
+#endif
+
+#ifdef CONFIG_AMD_NUMA
+ if (!acpi)
+ amd = !amd_numa_init();
+#endif
+
nodes_clear(node_possible_map);
nodes_clear(node_online_map);
nodes_clear(node_possible_map);
nodes_clear(node_online_map);