diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2010-10-13 19:34:15 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-10-14 03:06:49 -0400 |
commit | 67e87f0a1c5cbc750f81ebf6a128e8ff6f4376cc (patch) | |
tree | 566e2fdaf0fdec91bc1fd21141b6052bf4837fba /arch/x86/kernel/head64.c | |
parent | fef5ba797991f9335bcfc295942b684f9bf613a1 (diff) |
x86-64: Only set max_pfn_mapped to 512 MiB if we enter via head_64.S
head_64.S maps up to 512 MiB, but that is not necessarity true for
other entry paths, such as Xen.
Thus, co-locate the setting of max_pfn_mapped with the code to
actually set up the page tables in head_64.S. The 32-bit code is
already so co-located. (The Xen code already sets max_pfn_mapped
correctly for its own use case.)
-v2:
Yinghai fixed the following bug in this patch:
|
| max_pfn_mapped is in .bss section, so we need to set that
| after bss get cleared. Without that we crash on bootup.
|
| That is safe because Xen does not call x86_64_start_kernel().
|
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Fixed-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
LKML-Reference: <4CB6AB24.9020504@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/head64.c')
-rw-r--r-- | arch/x86/kernel/head64.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c index 97adf9828b95..2d2673c28aff 100644 --- a/arch/x86/kernel/head64.c +++ b/arch/x86/kernel/head64.c | |||
@@ -80,6 +80,8 @@ void __init x86_64_start_kernel(char * real_mode_data) | |||
80 | /* Cleanup the over mapped high alias */ | 80 | /* Cleanup the over mapped high alias */ |
81 | cleanup_highmap(); | 81 | cleanup_highmap(); |
82 | 82 | ||
83 | max_pfn_mapped = KERNEL_IMAGE_SIZE >> PAGE_SHIFT; | ||
84 | |||
83 | for (i = 0; i < NUM_EXCEPTION_VECTORS; i++) { | 85 | for (i = 0; i < NUM_EXCEPTION_VECTORS; i++) { |
84 | #ifdef CONFIG_EARLY_PRINTK | 86 | #ifdef CONFIG_EARLY_PRINTK |
85 | set_intr_gate(i, &early_idt_handlers[i]); | 87 | set_intr_gate(i, &early_idt_handlers[i]); |