aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/setup.c
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-07-08 21:56:38 -0400
committerIngo Molnar <mingo@elte.hu>2008-07-09 04:43:25 -0400
commit2dc807b37b7b8c7df445513ad2b415df4ebcaf6d (patch)
treea28cb322758351c9549c1e73f1ebcad3d85913e2 /arch/x86/kernel/setup.c
parent49c980df552499e5e8595b52448f612fdab0484a (diff)
x86: make max_pfn cover acpi table below 4g
When system have 4g less ram installed, and acpi table sit near end of ram, make max_pfn cover them too, so 64bit kernel don't need to mess up fixmap. Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Cc: "Suresh Siddha" <suresh.b.siddha@intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/setup.c')
-rw-r--r--arch/x86/kernel/setup.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index bea8ae77d059..a7c3471ea17c 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -709,22 +709,18 @@ void __init setup_arch(char **cmdline_p)
709 early_gart_iommu_check(); 709 early_gart_iommu_check();
710#endif 710#endif
711 711
712 e820_register_active_regions(0, 0, -1UL);
713 /* 712 /*
714 * partially used pages are not usable - thus 713 * partially used pages are not usable - thus
715 * we are rounding upwards: 714 * we are rounding upwards:
716 */ 715 */
717 max_pfn = e820_end_of_ram(); 716 max_pfn = e820_end();
718 717
719 /* preallocate 4k for mptable mpc */ 718 /* preallocate 4k for mptable mpc */
720 early_reserve_e820_mpc_new(); 719 early_reserve_e820_mpc_new();
721 /* update e820 for memory not covered by WB MTRRs */ 720 /* update e820 for memory not covered by WB MTRRs */
722 mtrr_bp_init(); 721 mtrr_bp_init();
723 if (mtrr_trim_uncached_memory(max_pfn)) { 722 if (mtrr_trim_uncached_memory(max_pfn))
724 remove_all_active_ranges(); 723 max_pfn = e820_end();
725 e820_register_active_regions(0, 0, -1UL);
726 max_pfn = e820_end_of_ram();
727 }
728 724
729#ifdef CONFIG_X86_32 725#ifdef CONFIG_X86_32
730 /* max_low_pfn get updated here */ 726 /* max_low_pfn get updated here */
@@ -767,9 +763,6 @@ void __init setup_arch(char **cmdline_p)
767 */ 763 */
768 acpi_boot_table_init(); 764 acpi_boot_table_init();
769 765
770 /* Remove active ranges so rediscovery with NUMA-awareness happens */
771 remove_all_active_ranges();
772
773#ifdef CONFIG_ACPI_NUMA 766#ifdef CONFIG_ACPI_NUMA
774 /* 767 /*
775 * Parse SRAT to discover nodes. 768 * Parse SRAT to discover nodes.