diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-04-15 20:29:42 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-19 13:19:55 -0400 |
commit | fa5c4639419668cbb18ca3d20c1253559a3b43ae (patch) | |
tree | d811ff66fad6baa886157b6d94ed0801c39f43f6 | |
parent | d8bb6f4c1670c8324e4135c61ef07486f7f17379 (diff) |
x86: rename find_max_pfn() to propagate_e820_map()
this function doesnt just 'find' the max_pfn - it also has
other side-effects such as registering sparse memory maps.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | arch/x86/kernel/e820_32.c | 4 | ||||
-rw-r--r-- | arch/x86/kernel/setup_32.c | 4 | ||||
-rw-r--r-- | arch/x86/mm/discontig_32.c | 6 | ||||
-rw-r--r-- | include/asm-x86/e820_32.h | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/arch/x86/kernel/e820_32.c b/arch/x86/kernel/e820_32.c index 0240cd778365..ed733e7cf4e6 100644 --- a/arch/x86/kernel/e820_32.c +++ b/arch/x86/kernel/e820_32.c | |||
@@ -475,7 +475,7 @@ int __init copy_e820_map(struct e820entry *biosmap, int nr_map) | |||
475 | /* | 475 | /* |
476 | * Find the highest page frame number we have available | 476 | * Find the highest page frame number we have available |
477 | */ | 477 | */ |
478 | void __init find_max_pfn(void) | 478 | void __init propagate_e820_map(void) |
479 | { | 479 | { |
480 | int i; | 480 | int i; |
481 | 481 | ||
@@ -704,7 +704,7 @@ static int __init parse_memmap(char *arg) | |||
704 | * size before original memory map is | 704 | * size before original memory map is |
705 | * reset. | 705 | * reset. |
706 | */ | 706 | */ |
707 | find_max_pfn(); | 707 | propagate_e820_map(); |
708 | saved_max_pfn = max_pfn; | 708 | saved_max_pfn = max_pfn; |
709 | #endif | 709 | #endif |
710 | e820.nr_map = 0; | 710 | e820.nr_map = 0; |
diff --git a/arch/x86/kernel/setup_32.c b/arch/x86/kernel/setup_32.c index 5b0bffb7fcc9..1c4799e68718 100644 --- a/arch/x86/kernel/setup_32.c +++ b/arch/x86/kernel/setup_32.c | |||
@@ -812,10 +812,10 @@ void __init setup_arch(char **cmdline_p) | |||
812 | efi_init(); | 812 | efi_init(); |
813 | 813 | ||
814 | /* update e820 for memory not covered by WB MTRRs */ | 814 | /* update e820 for memory not covered by WB MTRRs */ |
815 | find_max_pfn(); | 815 | propagate_e820_map(); |
816 | mtrr_bp_init(); | 816 | mtrr_bp_init(); |
817 | if (mtrr_trim_uncached_memory(max_pfn)) | 817 | if (mtrr_trim_uncached_memory(max_pfn)) |
818 | find_max_pfn(); | 818 | propagate_e820_map(); |
819 | 819 | ||
820 | max_low_pfn = setup_memory(); | 820 | max_low_pfn = setup_memory(); |
821 | 821 | ||
diff --git a/arch/x86/mm/discontig_32.c b/arch/x86/mm/discontig_32.c index eba0bbede7a6..18378850e25a 100644 --- a/arch/x86/mm/discontig_32.c +++ b/arch/x86/mm/discontig_32.c | |||
@@ -120,7 +120,7 @@ int __init get_memcfg_numa_flat(void) | |||
120 | printk("NUMA - single node, flat memory mode\n"); | 120 | printk("NUMA - single node, flat memory mode\n"); |
121 | 121 | ||
122 | /* Run the memory configuration and find the top of memory. */ | 122 | /* Run the memory configuration and find the top of memory. */ |
123 | find_max_pfn(); | 123 | propagate_e820_map(); |
124 | node_start_pfn[0] = 0; | 124 | node_start_pfn[0] = 0; |
125 | node_end_pfn[0] = max_pfn; | 125 | node_end_pfn[0] = max_pfn; |
126 | memory_present(0, 0, max_pfn); | 126 | memory_present(0, 0, max_pfn); |
@@ -134,7 +134,7 @@ int __init get_memcfg_numa_flat(void) | |||
134 | /* | 134 | /* |
135 | * Find the highest page frame number we have available for the node | 135 | * Find the highest page frame number we have available for the node |
136 | */ | 136 | */ |
137 | static void __init find_max_pfn_node(int nid) | 137 | static void __init propagate_e820_map_node(int nid) |
138 | { | 138 | { |
139 | if (node_end_pfn[nid] > max_pfn) | 139 | if (node_end_pfn[nid] > max_pfn) |
140 | node_end_pfn[nid] = max_pfn; | 140 | node_end_pfn[nid] = max_pfn; |
@@ -379,7 +379,7 @@ unsigned long __init setup_memory(void) | |||
379 | printk("High memory starts at vaddr %08lx\n", | 379 | printk("High memory starts at vaddr %08lx\n", |
380 | (ulong) pfn_to_kaddr(highstart_pfn)); | 380 | (ulong) pfn_to_kaddr(highstart_pfn)); |
381 | for_each_online_node(nid) | 381 | for_each_online_node(nid) |
382 | find_max_pfn_node(nid); | 382 | propagate_e820_map_node(nid); |
383 | 383 | ||
384 | memset(NODE_DATA(0), 0, sizeof(struct pglist_data)); | 384 | memset(NODE_DATA(0), 0, sizeof(struct pglist_data)); |
385 | NODE_DATA(0)->bdata = &node0_bdata; | 385 | NODE_DATA(0)->bdata = &node0_bdata; |
diff --git a/include/asm-x86/e820_32.h b/include/asm-x86/e820_32.h index 43b1a8bd4b34..a9f7c6ec32bf 100644 --- a/include/asm-x86/e820_32.h +++ b/include/asm-x86/e820_32.h | |||
@@ -24,7 +24,7 @@ extern void update_e820(void); | |||
24 | extern int e820_all_mapped(unsigned long start, unsigned long end, | 24 | extern int e820_all_mapped(unsigned long start, unsigned long end, |
25 | unsigned type); | 25 | unsigned type); |
26 | extern int e820_any_mapped(u64 start, u64 end, unsigned type); | 26 | extern int e820_any_mapped(u64 start, u64 end, unsigned type); |
27 | extern void find_max_pfn(void); | 27 | extern void propagate_e820_map(void); |
28 | extern void register_bootmem_low_pages(unsigned long max_low_pfn); | 28 | extern void register_bootmem_low_pages(unsigned long max_low_pfn); |
29 | extern void add_memory_region(unsigned long long start, | 29 | extern void add_memory_region(unsigned long long start, |
30 | unsigned long long size, int type); | 30 | unsigned long long size, int type); |