diff options
Diffstat (limited to 'arch/x86/kernel/setup.c')
-rw-r--r-- | arch/x86/kernel/setup.c | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index ae0d8042cf69..8fce6c714514 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -81,7 +81,7 @@ | |||
81 | #include <asm/io_apic.h> | 81 | #include <asm/io_apic.h> |
82 | #include <asm/ist.h> | 82 | #include <asm/ist.h> |
83 | #include <asm/vmi.h> | 83 | #include <asm/vmi.h> |
84 | #include <setup_arch.h> | 84 | #include <asm/setup_arch.h> |
85 | #include <asm/bios_ebda.h> | 85 | #include <asm/bios_ebda.h> |
86 | #include <asm/cacheflush.h> | 86 | #include <asm/cacheflush.h> |
87 | #include <asm/processor.h> | 87 | #include <asm/processor.h> |
@@ -89,7 +89,7 @@ | |||
89 | 89 | ||
90 | #include <asm/system.h> | 90 | #include <asm/system.h> |
91 | #include <asm/vsyscall.h> | 91 | #include <asm/vsyscall.h> |
92 | #include <asm/smp.h> | 92 | #include <asm/cpu.h> |
93 | #include <asm/desc.h> | 93 | #include <asm/desc.h> |
94 | #include <asm/dma.h> | 94 | #include <asm/dma.h> |
95 | #include <asm/iommu.h> | 95 | #include <asm/iommu.h> |
@@ -97,7 +97,7 @@ | |||
97 | #include <asm/mmu_context.h> | 97 | #include <asm/mmu_context.h> |
98 | #include <asm/proto.h> | 98 | #include <asm/proto.h> |
99 | 99 | ||
100 | #include <mach_apic.h> | 100 | #include <asm/genapic.h> |
101 | #include <asm/paravirt.h> | 101 | #include <asm/paravirt.h> |
102 | #include <asm/hypervisor.h> | 102 | #include <asm/hypervisor.h> |
103 | 103 | ||
@@ -112,6 +112,20 @@ | |||
112 | #define ARCH_SETUP | 112 | #define ARCH_SETUP |
113 | #endif | 113 | #endif |
114 | 114 | ||
115 | unsigned int boot_cpu_id __read_mostly; | ||
116 | |||
117 | #ifdef CONFIG_X86_64 | ||
118 | int default_cpu_present_to_apicid(int mps_cpu) | ||
119 | { | ||
120 | return __default_cpu_present_to_apicid(mps_cpu); | ||
121 | } | ||
122 | |||
123 | int default_check_phys_apicid_present(int boot_cpu_physical_apicid) | ||
124 | { | ||
125 | return __default_check_phys_apicid_present(boot_cpu_physical_apicid); | ||
126 | } | ||
127 | #endif | ||
128 | |||
115 | #ifndef CONFIG_DEBUG_BOOT_PARAMS | 129 | #ifndef CONFIG_DEBUG_BOOT_PARAMS |
116 | struct boot_params __initdata boot_params; | 130 | struct boot_params __initdata boot_params; |
117 | #else | 131 | #else |
@@ -588,10 +602,9 @@ early_param("elfcorehdr", setup_elfcorehdr); | |||
588 | 602 | ||
589 | static int __init default_update_genapic(void) | 603 | static int __init default_update_genapic(void) |
590 | { | 604 | { |
591 | #ifdef CONFIG_X86_SMP | 605 | #ifdef CONFIG_SMP |
592 | # if defined(CONFIG_X86_GENERICARCH) || defined(CONFIG_X86_64) | 606 | if (!apic->wakeup_cpu) |
593 | genapic->wakeup_cpu = wakeup_secondary_cpu_via_init; | 607 | apic->wakeup_cpu = wakeup_secondary_cpu_via_init; |
594 | # endif | ||
595 | #endif | 608 | #endif |
596 | 609 | ||
597 | return 0; | 610 | return 0; |
@@ -607,7 +620,7 @@ struct x86_quirks *x86_quirks __initdata = &default_x86_quirks; | |||
607 | static int __init dmi_low_memory_corruption(const struct dmi_system_id *d) | 620 | static int __init dmi_low_memory_corruption(const struct dmi_system_id *d) |
608 | { | 621 | { |
609 | printk(KERN_NOTICE | 622 | printk(KERN_NOTICE |
610 | "%s detected: BIOS may corrupt low RAM, working it around.\n", | 623 | "%s detected: BIOS may corrupt low RAM, working around it.\n", |
611 | d->ident); | 624 | d->ident); |
612 | 625 | ||
613 | e820_update_range(0, 0x10000, E820_RAM, E820_RESERVED); | 626 | e820_update_range(0, 0x10000, E820_RAM, E820_RESERVED); |
@@ -892,12 +905,11 @@ void __init setup_arch(char **cmdline_p) | |||
892 | */ | 905 | */ |
893 | acpi_reserve_bootmem(); | 906 | acpi_reserve_bootmem(); |
894 | #endif | 907 | #endif |
895 | #ifdef CONFIG_X86_FIND_SMP_CONFIG | ||
896 | /* | 908 | /* |
897 | * Find and reserve possible boot-time SMP configuration: | 909 | * Find and reserve possible boot-time SMP configuration: |
898 | */ | 910 | */ |
899 | find_smp_config(); | 911 | find_smp_config(); |
900 | #endif | 912 | |
901 | reserve_crashkernel(); | 913 | reserve_crashkernel(); |
902 | 914 | ||
903 | #ifdef CONFIG_X86_64 | 915 | #ifdef CONFIG_X86_64 |
@@ -924,9 +936,7 @@ void __init setup_arch(char **cmdline_p) | |||
924 | map_vsyscall(); | 936 | map_vsyscall(); |
925 | #endif | 937 | #endif |
926 | 938 | ||
927 | #ifdef CONFIG_X86_GENERICARCH | ||
928 | generic_apic_probe(); | 939 | generic_apic_probe(); |
929 | #endif | ||
930 | 940 | ||
931 | early_quirks(); | 941 | early_quirks(); |
932 | 942 | ||