summaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/setup.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2006-09-26 10:52:31 +0200
committerAndi Kleen <andi@basil.nowhere.org>2006-09-26 10:52:31 +0200
commitba9c231f7499ff6918c069c72ff5fd836c76b963 (patch)
treedac0a7d22adf1d00ecf37e9b21f2115cbd12eb24 /arch/i386/kernel/setup.c
parent[PATCH] remove int_delivery_dest (diff)
downloadlinux-ba9c231f7499ff6918c069c72ff5fd836c76b963.tar.xz
linux-ba9c231f7499ff6918c069c72ff5fd836c76b963.zip
[PATCH] i386: initialize end-of-memory variables as early as possible
Move 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. Change the range check in kunmap_atomic to actually make use of this so that the no-mapping-estabished path (under CONFIG_DEBUG_HIGHMEM) gets used only when the address is inside the lowmem area (and BUG() otherwise). Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'arch/i386/kernel/setup.c')
-rw-r--r--arch/i386/kernel/setup.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c
index f1682206d304..71a540362b78 100644
--- a/arch/i386/kernel/setup.c
+++ b/arch/i386/kernel/setup.c
@@ -1170,6 +1170,14 @@ static unsigned long __init setup_memory(void)
}
printk(KERN_NOTICE "%ldMB HIGHMEM available.\n",
pages_to_mb(highend_pfn - highstart_pfn));
+ num_physpages = highend_pfn;
+ high_memory = (void *) __va(highstart_pfn * PAGE_SIZE - 1) + 1;
+#else
+ num_physpages = max_low_pfn;
+ high_memory = (void *) __va(max_low_pfn * PAGE_SIZE - 1) + 1;
+#endif
+#ifdef CONFIG_FLATMEM
+ max_mapnr = num_physpages;
#endif
printk(KERN_NOTICE "%ldMB LOWMEM available.\n",
pages_to_mb(max_low_pfn));