hyperv-fixes for 5.11-rc5
-----BEGIN PGP SIGNATURE----- iQFHBAABCAAxFiEEIbPD0id6easf0xsudhRwX5BBoF4FAmAGxt0THHdlaS5saXVA a2VybmVsLm9yZwAKCRB2FHBfkEGgXjMhCACtIFiJERxNFqKLVn1s+2IyA3+Lv0UI Suyl+tUTgiN3WzPNAbYfd6cYKk/JvAF0KvCtvuFfRS+oRJrT8+ONBBRxSzpDixGO aZfvzObOstWUQ0XsP2Q+S4YZlsLHtG76sUSsWCB8wdsnG0hujbrQ43M1Vj15EQYj EKFmsJfxeMSjekaI7QRkU7LR9gZgacCWthCbn4KFgtXCREA1sI5OUnW9NAei1MSG M/adfAP4xqoBpNjXq+6M2Ha4H5SmtZRlOQ4bk6ZgebhG0T9LT7UBPqaHHed8CcOj PzreKfYYYGExhJwLKuCji7r6kSGZcZ6kiIMdFm+vliSK/QJeFCFclhdX =c3XM -----END PGP SIGNATURE----- Merge tag 'hyperv-fixes-signed-20210119' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux Pull hyperv fix from Wei Liu: "One patch from Dexuan to fix clockevent initialization" * tag 'hyperv-fixes-signed-20210119' of git://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux: x86/hyperv: Initialize clockevents after LAPIC is initialized
This commit is contained in:
Коммит
28df858033
|
@ -315,6 +315,25 @@ static struct syscore_ops hv_syscore_ops = {
|
|||
.resume = hv_resume,
|
||||
};
|
||||
|
||||
static void (* __initdata old_setup_percpu_clockev)(void);
|
||||
|
||||
static void __init hv_stimer_setup_percpu_clockev(void)
|
||||
{
|
||||
/*
|
||||
* Ignore any errors in setting up stimer clockevents
|
||||
* as we can run with the LAPIC timer as a fallback.
|
||||
*/
|
||||
(void)hv_stimer_alloc();
|
||||
|
||||
/*
|
||||
* Still register the LAPIC timer, because the direct-mode STIMER is
|
||||
* not supported by old versions of Hyper-V. This also allows users
|
||||
* to switch to LAPIC timer via /sys, if they want to.
|
||||
*/
|
||||
if (old_setup_percpu_clockev)
|
||||
old_setup_percpu_clockev();
|
||||
}
|
||||
|
||||
/*
|
||||
* This function is to be invoked early in the boot sequence after the
|
||||
* hypervisor has been detected.
|
||||
|
@ -393,10 +412,14 @@ void __init hyperv_init(void)
|
|||
wrmsrl(HV_X64_MSR_HYPERCALL, hypercall_msr.as_uint64);
|
||||
|
||||
/*
|
||||
* Ignore any errors in setting up stimer clockevents
|
||||
* as we can run with the LAPIC timer as a fallback.
|
||||
* hyperv_init() is called before LAPIC is initialized: see
|
||||
* apic_intr_mode_init() -> x86_platform.apic_post_init() and
|
||||
* apic_bsp_setup() -> setup_local_APIC(). The direct-mode STIMER
|
||||
* depends on LAPIC, so hv_stimer_alloc() should be called from
|
||||
* x86_init.timers.setup_percpu_clockev.
|
||||
*/
|
||||
(void)hv_stimer_alloc();
|
||||
old_setup_percpu_clockev = x86_init.timers.setup_percpu_clockev;
|
||||
x86_init.timers.setup_percpu_clockev = hv_stimer_setup_percpu_clockev;
|
||||
|
||||
hv_apic_init();
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче