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