aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-06-01 01:52:47 -0400
committerIngo Molnar <mingo@elte.hu>2008-06-03 07:26:25 -0400
commit0596152388e234efebce464355186ad9e16c8cb6 (patch)
tree9e04e9630bdffdbfba07d43d1e7e08edf24045ca
parentb66cd7207387b9b428aaf1988e21dd263c6a4928 (diff)
x86, 32-bit: change propagate_e820_map() back to find_max_pfn()
we don't need to call memory_present that early. numa and sparse will call memory_present later and might even fail, it will call memory_present for the full range. also for sparse it will call alloc_bootmem ... before we set up bootmem. Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--arch/x86/kernel/e820_32.c5
-rw-r--r--arch/x86/kernel/setup_32.c4
-rw-r--r--arch/x86/mm/discontig_32.c2
-rw-r--r--include/asm-x86/e820_32.h2
4 files changed, 6 insertions, 7 deletions
diff --git a/arch/x86/kernel/e820_32.c b/arch/x86/kernel/e820_32.c
index db760d4706af..0c025d04fc2e 100644
--- a/arch/x86/kernel/e820_32.c
+++ b/arch/x86/kernel/e820_32.c
@@ -210,7 +210,7 @@ void __init init_iomem_resources(struct resource *code_resource,
210/* 210/*
211 * Find the highest page frame number we have available 211 * Find the highest page frame number we have available
212 */ 212 */
213void __init propagate_e820_map(void) 213void __init find_max_pfn(void)
214{ 214{
215 int i; 215 int i;
216 216
@@ -227,7 +227,6 @@ void __init propagate_e820_map(void)
227 continue; 227 continue;
228 if (end > max_pfn) 228 if (end > max_pfn)
229 max_pfn = end; 229 max_pfn = end;
230 memory_present(0, start, end);
231 } 230 }
232} 231}
233 232
@@ -361,7 +360,7 @@ static int __init parse_memmap(char *arg)
361 * size before original memory map is 360 * size before original memory map is
362 * reset. 361 * reset.
363 */ 362 */
364 propagate_e820_map(); 363 find_max_pfn();
365 saved_max_pfn = max_pfn; 364 saved_max_pfn = max_pfn;
366#endif 365#endif
367 e820.nr_map = 0; 366 e820.nr_map = 0;
diff --git a/arch/x86/kernel/setup_32.c b/arch/x86/kernel/setup_32.c
index 6f40cb560ea9..29010420458d 100644
--- a/arch/x86/kernel/setup_32.c
+++ b/arch/x86/kernel/setup_32.c
@@ -730,10 +730,10 @@ void __init setup_arch(char **cmdline_p)
730 efi_init(); 730 efi_init();
731 731
732 /* update e820 for memory not covered by WB MTRRs */ 732 /* update e820 for memory not covered by WB MTRRs */
733 propagate_e820_map(); 733 find_max_pfn();
734 mtrr_bp_init(); 734 mtrr_bp_init();
735 if (mtrr_trim_uncached_memory(max_pfn)) 735 if (mtrr_trim_uncached_memory(max_pfn))
736 propagate_e820_map(); 736 find_max_pfn();
737 737
738 max_low_pfn = setup_memory(); 738 max_low_pfn = setup_memory();
739 739
diff --git a/arch/x86/mm/discontig_32.c b/arch/x86/mm/discontig_32.c
index 98b099eeab3a..ebbbba338150 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 propagate_e820_map(); 123 find_max_pfn();
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);
diff --git a/include/asm-x86/e820_32.h b/include/asm-x86/e820_32.h
index 7ace82570a36..00fbc60b9d30 100644
--- a/include/asm-x86/e820_32.h
+++ b/include/asm-x86/e820_32.h
@@ -21,7 +21,7 @@
21extern void setup_memory_map(void); 21extern void setup_memory_map(void);
22extern void finish_e820_parsing(void); 22extern void finish_e820_parsing(void);
23 23
24extern void propagate_e820_map(void); 24extern void find_max_pfn(void);
25extern void register_bootmem_low_pages(unsigned long max_low_pfn); 25extern void register_bootmem_low_pages(unsigned long max_low_pfn);
26extern void limit_regions(unsigned long long size); 26extern void limit_regions(unsigned long long size);
27extern void init_iomem_resources(struct resource *code_resource, 27extern void init_iomem_resources(struct resource *code_resource,