blob: dd27f401f0a03a3c62268c2097f363178767d795 [file] [log] [blame]
Thomas Gleixnere3cfe522008-01-30 13:30:37 +01001/*
Linus Torvalds1da177e2005-04-16 15:20:36 -07002 * Generic VM initialization for x86-64 NUMA setups.
3 * Copyright 2002,2003 Andi Kleen, SuSE Labs.
Thomas Gleixnere3cfe522008-01-30 13:30:37 +01004 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07005#include <linux/bootmem.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -07006
Tejun Heob8ef9172011-02-22 11:10:08 +01007#include "numa_internal.h"
Tejun Heo97e7b782011-02-16 17:11:08 +01008
Tejun Heoffe77a42011-02-16 12:13:06 +01009void __init initmem_init(void)
10{
Tejun Heoa4106ea2011-05-02 14:18:53 +020011 x86_numa_init();
Andi Kleen69d81fc2005-11-05 17:25:53 +010012}
13
Thomas Gleixnere3cfe522008-01-30 13:30:37 +010014unsigned long __init numa_free_all_bootmem(void)
15{
Linus Torvalds1da177e2005-04-16 15:20:36 -070016 unsigned long pages = 0;
Thomas Gleixnere3cfe522008-01-30 13:30:37 +010017 int i;
18
19 for_each_online_node(i)
Linus Torvalds1da177e2005-04-16 15:20:36 -070020 pages += free_all_bootmem_node(NODE_DATA(i));
Thomas Gleixnere3cfe522008-01-30 13:30:37 +010021
Yinghai Lu08677212010-02-10 01:20:20 -080022 pages += free_all_memory_core_early(MAX_NUMNODES);
Yinghai Lu08677212010-02-10 01:20:20 -080023
Linus Torvalds1da177e2005-04-16 15:20:36 -070024 return pages;
Thomas Gleixnere3cfe522008-01-30 13:30:37 +010025}