Messages in this thread | | | Date | Wed, 28 Sep 2022 13:14:11 +0200 | From | Juergen Gross <> | Subject | Re: [PATCH v3 08/10] x86/mtrr: let cache_aps_delayed_init replace mtrr_aps_delayed_init |
| |
On 28.09.22 12:48, Borislav Petkov wrote: > On Wed, Sep 28, 2022 at 08:16:53AM +0200, Juergen Gross wrote: >>> Are sure the hotplug notifier doesn't get called in the boot and in the > > It doesn't because it gets registered after smp_init()... > >>> resume cases? > > ... but it gets called during resume because by that time the notifier > has been registered already. See my notes at the end of this mail of > what the code does currently. > >> In case my suspicion is correct: this can still be solved by adding the >> hotplug notifier only in mtrr_aps_init(), and removing it again in >> arch_thaw_secondary_cpus_begin(). > > Pretty much. Yeah, we still need a bool. ;-(
No, we don't.
Using basically your patch, but with
+ mtrr_online = cpuhp_setup_state_nocalls(CPUHP_AP_ONLINE_DYN, + "x86/mtrr:online", + mtrr_ap_init, NULL);
moved to the end of mtrr_aps_init(), and:
+void mtrr_aps_thaw(void) +{ + cpuhp_remove_state_nocalls(mtrr_online); +}
Juergen [unhandled content-type:application/pgp-keys][unhandled content-type:application/pgp-signature] | |