2008-01-30 19:30:37 +07:00
|
|
|
/*
|
2005-04-17 05:20:36 +07:00
|
|
|
* Generic VM initialization for x86-64 NUMA setups.
|
|
|
|
* Copyright 2002,2003 Andi Kleen, SuSE Labs.
|
2008-01-30 19:30:37 +07:00
|
|
|
*/
|
2005-04-17 05:20:36 +07:00
|
|
|
#include <linux/bootmem.h>
|
|
|
|
|
2011-02-22 17:10:08 +07:00
|
|
|
#include "numa_internal.h"
|
2011-02-16 23:11:08 +07:00
|
|
|
|
2011-03-04 21:17:21 +07:00
|
|
|
void __init initmem_init(void)
|
|
|
|
{
|
2011-05-02 19:18:53 +07:00
|
|
|
x86_numa_init();
|
2005-11-05 23:25:53 +07:00
|
|
|
}
|
|
|
|
|
2008-01-30 19:30:37 +07:00
|
|
|
unsigned long __init numa_free_all_bootmem(void)
|
|
|
|
{
|
2005-04-17 05:20:36 +07:00
|
|
|
unsigned long pages = 0;
|
2008-01-30 19:30:37 +07:00
|
|
|
int i;
|
|
|
|
|
|
|
|
for_each_online_node(i)
|
2005-04-17 05:20:36 +07:00
|
|
|
pages += free_all_bootmem_node(NODE_DATA(i));
|
2008-01-30 19:30:37 +07:00
|
|
|
|
2011-07-12 16:16:01 +07:00
|
|
|
pages += free_low_memory_core_early(MAX_NUMNODES);
|
2010-02-10 16:20:20 +07:00
|
|
|
|
2005-04-17 05:20:36 +07:00
|
|
|
return pages;
|
2008-01-30 19:30:37 +07:00
|
|
|
}
|