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