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