diff options
Diffstat (limited to 'arch/x86/kernel/cpu/mshyperv.c')
-rw-r--r-- | arch/x86/kernel/cpu/mshyperv.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/x86/kernel/cpu/mshyperv.c b/arch/x86/kernel/cpu/mshyperv.c index ad12733f6058..1c72f3819eb1 100644 --- a/arch/x86/kernel/cpu/mshyperv.c +++ b/arch/x86/kernel/cpu/mshyperv.c | |||
@@ -199,6 +199,16 @@ static unsigned long hv_get_tsc_khz(void) | |||
199 | return freq / 1000; | 199 | return freq / 1000; |
200 | } | 200 | } |
201 | 201 | ||
202 | #if defined(CONFIG_SMP) && IS_ENABLED(CONFIG_HYPERV) | ||
203 | static void __init hv_smp_prepare_boot_cpu(void) | ||
204 | { | ||
205 | native_smp_prepare_boot_cpu(); | ||
206 | #if defined(CONFIG_X86_64) && defined(CONFIG_PARAVIRT_SPINLOCKS) | ||
207 | hv_init_spinlocks(); | ||
208 | #endif | ||
209 | } | ||
210 | #endif | ||
211 | |||
202 | static void __init ms_hyperv_init_platform(void) | 212 | static void __init ms_hyperv_init_platform(void) |
203 | { | 213 | { |
204 | int hv_host_info_eax; | 214 | int hv_host_info_eax; |
@@ -303,6 +313,10 @@ static void __init ms_hyperv_init_platform(void) | |||
303 | if (ms_hyperv.misc_features & HV_STIMER_DIRECT_MODE_AVAILABLE) | 313 | if (ms_hyperv.misc_features & HV_STIMER_DIRECT_MODE_AVAILABLE) |
304 | alloc_intr_gate(HYPERV_STIMER0_VECTOR, | 314 | alloc_intr_gate(HYPERV_STIMER0_VECTOR, |
305 | hv_stimer0_callback_vector); | 315 | hv_stimer0_callback_vector); |
316 | |||
317 | # ifdef CONFIG_SMP | ||
318 | smp_ops.smp_prepare_boot_cpu = hv_smp_prepare_boot_cpu; | ||
319 | # endif | ||
306 | #endif | 320 | #endif |
307 | } | 321 | } |
308 | 322 | ||