x86, hpet: Fix CPU hotplug callback registration
[linux.git] / arch / x86 / kernel / hpet.c
index da85a8e830a12d65e9d2f8a7f1db39b5477e9e85..d89382be899dde8d84c33357cad117ac2efc2357 100644 (file)
@@ -943,12 +943,14 @@ static __init int hpet_late_init(void)
        if (boot_cpu_has(X86_FEATURE_ARAT))
                return 0;
 
+       cpu_notifier_register_begin();
        for_each_online_cpu(cpu) {
                hpet_cpuhp_notify(NULL, CPU_ONLINE, (void *)(long)cpu);
        }
 
        /* This notifier should be called after workqueue is ready */
-       hotcpu_notifier(hpet_cpuhp_notify, -20);
+       __hotcpu_notifier(hpet_cpuhp_notify, -20);
+       cpu_notifier_register_done();
 
        return 0;
 }