On 28.09.22 07:30, Juergen Gross wrote: > On 28.09.22 01:16, Borislav Petkov wrote: >> On Tue, Sep 27, 2022 at 02:21:17PM +0200, Juergen Gross wrote: >>> So replacing the bool with "(system_state != SYSTEM_RUNNING)" is fine >>> with you right now? We can later switch that to the "more elegant" >>> solution when it shows up. >> >> Ok, I think I have something. And it was staring me straight in the >> face but I didn't see it: the MTRR code needs a hotplug notifier. In >> that notifier it can do the immediate, i.e., non-delayed init while the >> delayed init becomes the default, see below. >> >> And ignore the pr_info debugging gunk pls. >> >> mtrr_ap_init() becomes the notifier callback. It doesn't need to be >> called in identify_secondary_cpu() anymore as in the init case that >> function doesn't do anything - delayed=true - and in the hotplug case >> the notifier runs. > > Are sure the hotplug notifier doesn't get called in the boot and in the > resume cases? I don't see how those calls are being not done or resulting in > not doing anything. 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(). Juergen