diff options
Diffstat (limited to 'arch/x86/kernel/setup.c')
-rw-r--r-- | arch/x86/kernel/setup.c | 42 |
1 files changed, 19 insertions, 23 deletions
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index ec952aa5394a..68b48e3fbcbd 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -597,13 +597,21 @@ void __init setup_arch(char **cmdline_p) | |||
597 | memcpy(&boot_cpu_data, &new_cpu_data, sizeof(new_cpu_data)); | 597 | memcpy(&boot_cpu_data, &new_cpu_data, sizeof(new_cpu_data)); |
598 | visws_early_detect(); | 598 | visws_early_detect(); |
599 | pre_setup_arch_hook(); | 599 | pre_setup_arch_hook(); |
600 | early_cpu_init(); | ||
601 | #else | 600 | #else |
602 | printk(KERN_INFO "Command line: %s\n", boot_command_line); | 601 | printk(KERN_INFO "Command line: %s\n", boot_command_line); |
603 | #endif | 602 | #endif |
604 | 603 | ||
604 | early_cpu_init(); | ||
605 | early_ioremap_init(); | 605 | early_ioremap_init(); |
606 | 606 | ||
607 | #if defined(CONFIG_VMI) && defined(CONFIG_X86_32) | ||
608 | /* | ||
609 | * Must be before kernel pagetables are setup | ||
610 | * or fixmap area is touched. | ||
611 | */ | ||
612 | vmi_init(); | ||
613 | #endif | ||
614 | |||
607 | ROOT_DEV = old_decode_dev(boot_params.hdr.root_dev); | 615 | ROOT_DEV = old_decode_dev(boot_params.hdr.root_dev); |
608 | screen_info = boot_params.screen_info; | 616 | screen_info = boot_params.screen_info; |
609 | edid_info = boot_params.edid_info; | 617 | edid_info = boot_params.edid_info; |
@@ -665,9 +673,6 @@ void __init setup_arch(char **cmdline_p) | |||
665 | bss_resource.start = virt_to_phys(&__bss_start); | 673 | bss_resource.start = virt_to_phys(&__bss_start); |
666 | bss_resource.end = virt_to_phys(&__bss_stop)-1; | 674 | bss_resource.end = virt_to_phys(&__bss_stop)-1; |
667 | 675 | ||
668 | #ifdef CONFIG_X86_64 | ||
669 | early_cpu_init(); | ||
670 | #endif | ||
671 | strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE); | 676 | strlcpy(command_line, boot_command_line, COMMAND_LINE_SIZE); |
672 | *cmdline_p = command_line; | 677 | *cmdline_p = command_line; |
673 | 678 | ||
@@ -680,7 +685,7 @@ void __init setup_arch(char **cmdline_p) | |||
680 | #ifdef CONFIG_X86_LOCAL_APIC | 685 | #ifdef CONFIG_X86_LOCAL_APIC |
681 | disable_apic = 1; | 686 | disable_apic = 1; |
682 | #endif | 687 | #endif |
683 | clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC); | 688 | setup_clear_cpu_cap(X86_FEATURE_APIC); |
684 | } | 689 | } |
685 | 690 | ||
686 | #ifdef CONFIG_PCI | 691 | #ifdef CONFIG_PCI |
@@ -791,10 +796,6 @@ void __init setup_arch(char **cmdline_p) | |||
791 | 796 | ||
792 | initmem_init(0, max_pfn); | 797 | initmem_init(0, max_pfn); |
793 | 798 | ||
794 | #ifdef CONFIG_X86_64 | ||
795 | dma32_reserve_bootmem(); | ||
796 | #endif | ||
797 | |||
798 | #ifdef CONFIG_ACPI_SLEEP | 799 | #ifdef CONFIG_ACPI_SLEEP |
799 | /* | 800 | /* |
800 | * Reserve low memory region for sleep support. | 801 | * Reserve low memory region for sleep support. |
@@ -809,20 +810,21 @@ void __init setup_arch(char **cmdline_p) | |||
809 | #endif | 810 | #endif |
810 | reserve_crashkernel(); | 811 | reserve_crashkernel(); |
811 | 812 | ||
813 | #ifdef CONFIG_X86_64 | ||
814 | /* | ||
815 | * dma32_reserve_bootmem() allocates bootmem which may conflict | ||
816 | * with the crashkernel command line, so do that after | ||
817 | * reserve_crashkernel() | ||
818 | */ | ||
819 | dma32_reserve_bootmem(); | ||
820 | #endif | ||
821 | |||
812 | reserve_ibft_region(); | 822 | reserve_ibft_region(); |
813 | 823 | ||
814 | #ifdef CONFIG_KVM_CLOCK | 824 | #ifdef CONFIG_KVM_CLOCK |
815 | kvmclock_init(); | 825 | kvmclock_init(); |
816 | #endif | 826 | #endif |
817 | 827 | ||
818 | #if defined(CONFIG_VMI) && defined(CONFIG_X86_32) | ||
819 | /* | ||
820 | * Must be after max_low_pfn is determined, and before kernel | ||
821 | * pagetables are setup. | ||
822 | */ | ||
823 | vmi_init(); | ||
824 | #endif | ||
825 | |||
826 | paravirt_pagetable_setup_start(swapper_pg_dir); | 828 | paravirt_pagetable_setup_start(swapper_pg_dir); |
827 | paging_init(); | 829 | paging_init(); |
828 | paravirt_pagetable_setup_done(swapper_pg_dir); | 830 | paravirt_pagetable_setup_done(swapper_pg_dir); |
@@ -859,12 +861,6 @@ void __init setup_arch(char **cmdline_p) | |||
859 | init_apic_mappings(); | 861 | init_apic_mappings(); |
860 | ioapic_init_mappings(); | 862 | ioapic_init_mappings(); |
861 | 863 | ||
862 | #if defined(CONFIG_SMP) && defined(CONFIG_X86_PC) && defined(CONFIG_X86_32) | ||
863 | if (def_to_bigsmp) | ||
864 | printk(KERN_WARNING "More than 8 CPUs detected and " | ||
865 | "CONFIG_X86_PC cannot handle it.\nUse " | ||
866 | "CONFIG_X86_GENERICARCH or CONFIG_X86_BIGSMP.\n"); | ||
867 | #endif | ||
868 | kvm_guest_init(); | 864 | kvm_guest_init(); |
869 | 865 | ||
870 | e820_reserve_resources(); | 866 | e820_reserve_resources(); |