aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/setup.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2011-01-04 03:43:42 -0500
committerIngo Molnar <mingo@elte.hu>2011-01-04 03:43:42 -0500
commitbc030d6cb9532877c1c5a3f5e7123344fa24a285 (patch)
treed223d410b868b80d4c0deec192d354a5d06b201a /arch/x86/kernel/setup.c
parentd3bd058826aa8b79590cca6c8e6d1557bf576ada (diff)
parent387c31c7e5c9805b0aef8833d1731a5fe7bdea14 (diff)
Merge commit 'v2.6.37-rc8' into x86/apic
Conflicts: arch/x86/include/asm/io_apic.h Merge reason: move to a fresh -rc, resolve the conflict. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/setup.c')
-rw-r--r--arch/x86/kernel/setup.c36
1 files changed, 32 insertions, 4 deletions
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index b8982e0fc0c2..a25ce8864f1f 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -501,7 +501,18 @@ static inline unsigned long long get_total_mem(void)
501 return total << PAGE_SHIFT; 501 return total << PAGE_SHIFT;
502} 502}
503 503
504#define DEFAULT_BZIMAGE_ADDR_MAX 0x37FFFFFF 504/*
505 * Keep the crash kernel below this limit. On 32 bits earlier kernels
506 * would limit the kernel to the low 512 MiB due to mapping restrictions.
507 * On 64 bits, kexec-tools currently limits us to 896 MiB; increase this
508 * limit once kexec-tools are fixed.
509 */
510#ifdef CONFIG_X86_32
511# define CRASH_KERNEL_ADDR_MAX (512 << 20)
512#else
513# define CRASH_KERNEL_ADDR_MAX (896 << 20)
514#endif
515
505static void __init reserve_crashkernel(void) 516static void __init reserve_crashkernel(void)
506{ 517{
507 unsigned long long total_mem; 518 unsigned long long total_mem;
@@ -520,10 +531,10 @@ static void __init reserve_crashkernel(void)
520 const unsigned long long alignment = 16<<20; /* 16M */ 531 const unsigned long long alignment = 16<<20; /* 16M */
521 532
522 /* 533 /*
523 * kexec want bzImage is below DEFAULT_BZIMAGE_ADDR_MAX 534 * kexec want bzImage is below CRASH_KERNEL_ADDR_MAX
524 */ 535 */
525 crash_base = memblock_find_in_range(alignment, 536 crash_base = memblock_find_in_range(alignment,
526 DEFAULT_BZIMAGE_ADDR_MAX, crash_size, alignment); 537 CRASH_KERNEL_ADDR_MAX, crash_size, alignment);
527 538
528 if (crash_base == MEMBLOCK_ERROR) { 539 if (crash_base == MEMBLOCK_ERROR) {
529 pr_info("crashkernel reservation failed - No suitable area found.\n"); 540 pr_info("crashkernel reservation failed - No suitable area found.\n");
@@ -700,6 +711,17 @@ void __init setup_arch(char **cmdline_p)
700#ifdef CONFIG_X86_32 711#ifdef CONFIG_X86_32
701 memcpy(&boot_cpu_data, &new_cpu_data, sizeof(new_cpu_data)); 712 memcpy(&boot_cpu_data, &new_cpu_data, sizeof(new_cpu_data));
702 visws_early_detect(); 713 visws_early_detect();
714
715 /*
716 * copy kernel address range established so far and switch
717 * to the proper swapper page table
718 */
719 clone_pgd_range(swapper_pg_dir + KERNEL_PGD_BOUNDARY,
720 initial_page_table + KERNEL_PGD_BOUNDARY,
721 KERNEL_PGD_PTRS);
722
723 load_cr3(swapper_pg_dir);
724 __flush_tlb_all();
703#else 725#else
704 printk(KERN_INFO "Command line: %s\n", boot_command_line); 726 printk(KERN_INFO "Command line: %s\n", boot_command_line);
705#endif 727#endif
@@ -758,6 +780,7 @@ void __init setup_arch(char **cmdline_p)
758 780
759 x86_init.oem.arch_setup(); 781 x86_init.oem.arch_setup();
760 782
783 iomem_resource.end = (1ULL << boot_cpu_data.x86_phys_bits) - 1;
761 setup_memory_map(); 784 setup_memory_map();
762 parse_setup_data(); 785 parse_setup_data();
763 /* update the e820_saved too */ 786 /* update the e820_saved too */
@@ -985,7 +1008,12 @@ void __init setup_arch(char **cmdline_p)
985 paging_init(); 1008 paging_init();
986 x86_init.paging.pagetable_setup_done(swapper_pg_dir); 1009 x86_init.paging.pagetable_setup_done(swapper_pg_dir);
987 1010
988 setup_trampoline_page_table(); 1011#ifdef CONFIG_X86_32
1012 /* sync back kernel address range */
1013 clone_pgd_range(initial_page_table + KERNEL_PGD_BOUNDARY,
1014 swapper_pg_dir + KERNEL_PGD_BOUNDARY,
1015 KERNEL_PGD_PTRS);
1016#endif
989 1017
990 tboot_probe(); 1018 tboot_probe();
991 1019