Thomas Gleixner | e3cfe52 | 2008-01-30 13:30:37 +0100 | [diff] [blame] | 1 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 2 | * Generic VM initialization for x86-64 NUMA setups. |
3 | * Copyright 2002,2003 Andi Kleen, SuSE Labs. | ||||
Thomas Gleixner | e3cfe52 | 2008-01-30 13:30:37 +0100 | [diff] [blame] | 4 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 5 | #include <linux/bootmem.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 6 | |
Tejun Heo | b8ef917 | 2011-02-22 11:10:08 +0100 | [diff] [blame] | 7 | #include "numa_internal.h" |
Tejun Heo | 97e7b78 | 2011-02-16 17:11:08 +0100 | [diff] [blame] | 8 | |
Tejun Heo | ffe77a4 | 2011-02-16 12:13:06 +0100 | [diff] [blame] | 9 | void __init initmem_init(void) |
10 | { | ||||
Tejun Heo | a4106ea | 2011-05-02 14:18:53 +0200 | [diff] [blame] | 11 | x86_numa_init(); |
Andi Kleen | 69d81fc | 2005-11-05 17:25:53 +0100 | [diff] [blame] | 12 | } |
13 | |||||
Thomas Gleixner | e3cfe52 | 2008-01-30 13:30:37 +0100 | [diff] [blame] | 14 | unsigned long __init numa_free_all_bootmem(void) |
15 | { | ||||
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 16 | unsigned long pages = 0; |
Thomas Gleixner | e3cfe52 | 2008-01-30 13:30:37 +0100 | [diff] [blame] | 17 | int i; |
18 | |||||
19 | for_each_online_node(i) | ||||
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 20 | pages += free_all_bootmem_node(NODE_DATA(i)); |
Thomas Gleixner | e3cfe52 | 2008-01-30 13:30:37 +0100 | [diff] [blame] | 21 | |
Tejun Heo | 64a02da | 2011-07-12 11:16:01 +0200 | [diff] [blame] | 22 | pages += free_low_memory_core_early(MAX_NUMNODES); |
Yinghai Lu | 0867721 | 2010-02-10 01:20:20 -0800 | [diff] [blame] | 23 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 24 | return pages; |
Thomas Gleixner | e3cfe52 | 2008-01-30 13:30:37 +0100 | [diff] [blame] | 25 | } |