aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/kernel/setup.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2006-09-26 04:52:31 -0400
committerAndi Kleen <andi@basil.nowhere.org>2006-09-26 04:52:31 -0400
commitcaff0710ebf6f2c44cbd2b8b31fd6329148bed2e (patch)
treea459d30fa0a9260bda441e27ff6b8414af735d82 /arch/x86_64/kernel/setup.c
parent44cc45267bbe7c64f7d85b074bd670b48b5abdfb (diff)
[PATCH] initialize end of memory variables as early as possible
While an earlier patch already did a small step into that direction, this patch moves initialization of all memory end variables to as early as possible, so that dependent code doesn't need to check whether these variables have already been set. Also, remove a misleading (perhaps just outdated) comment, and make static a variable only used in a single file. Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'arch/x86_64/kernel/setup.c')
-rw-r--r--arch/x86_64/kernel/setup.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c
index aab4bd66aa0d..ddc3b2d9a165 100644
--- a/arch/x86_64/kernel/setup.c
+++ b/arch/x86_64/kernel/setup.c
@@ -554,7 +554,7 @@ void __init setup_arch(char **cmdline_p)
554 * we are rounding upwards: 554 * we are rounding upwards:
555 */ 555 */
556 end_pfn = e820_end_of_ram(); 556 end_pfn = e820_end_of_ram();
557 num_physpages = end_pfn; /* for pfn_valid */ 557 num_physpages = end_pfn;
558 558
559 check_efer(); 559 check_efer();
560 560
@@ -574,6 +574,11 @@ void __init setup_arch(char **cmdline_p)
574 acpi_boot_table_init(); 574 acpi_boot_table_init();
575#endif 575#endif
576 576
577 /* How many end-of-memory variables you have, grandma! */
578 max_low_pfn = end_pfn;
579 max_pfn = end_pfn;
580 high_memory = (void *)__va(end_pfn * PAGE_SIZE - 1) + 1;
581
577#ifdef CONFIG_ACPI_NUMA 582#ifdef CONFIG_ACPI_NUMA
578 /* 583 /*
579 * Parse SRAT to discover nodes. 584 * Parse SRAT to discover nodes.