aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/mm/discontig.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
commitba9c231f7499ff6918c069c72ff5fd836c76b963 (patch)
treedac0a7d22adf1d00ecf37e9b21f2115cbd12eb24 /arch/i386/mm/discontig.c
parent3b94355c47e2b025a7ececa0a14180e8fce6b0f1 (diff)
[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/mm/discontig.c')
-rw-r--r--arch/i386/mm/discontig.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/i386/mm/discontig.c b/arch/i386/mm/discontig.c
index 7c392dc553b8..f0c10b3cd158 100644
--- a/arch/i386/mm/discontig.c
+++ b/arch/i386/mm/discontig.c
@@ -313,6 +313,11 @@ unsigned long __init setup_memory(void)
313 highstart_pfn = system_max_low_pfn; 313 highstart_pfn = system_max_low_pfn;
314 printk(KERN_NOTICE "%ldMB HIGHMEM available.\n", 314 printk(KERN_NOTICE "%ldMB HIGHMEM available.\n",
315 pages_to_mb(highend_pfn - highstart_pfn)); 315 pages_to_mb(highend_pfn - highstart_pfn));
316 num_physpages = highend_pfn;
317 high_memory = (void *) __va(highstart_pfn * PAGE_SIZE - 1) + 1;
318#else
319 num_physpages = system_max_low_pfn;
320 high_memory = (void *) __va(system_max_low_pfn * PAGE_SIZE - 1) + 1;
316#endif 321#endif
317 printk(KERN_NOTICE "%ldMB LOWMEM available.\n", 322 printk(KERN_NOTICE "%ldMB LOWMEM available.\n",
318 pages_to_mb(system_max_low_pfn)); 323 pages_to_mb(system_max_low_pfn));