|
@@ -1057,19 +1057,24 @@ static DEVICE_ATTR(rescan, 0200, NULL, rescan_store);
|
|
|
|
|
|
static int __init s390_smp_init(void)
|
|
|
{
|
|
|
- int cpu, rc;
|
|
|
+ int cpu, rc = 0;
|
|
|
|
|
|
- hotcpu_notifier(smp_cpu_notify, 0);
|
|
|
#ifdef CONFIG_HOTPLUG_CPU
|
|
|
rc = device_create_file(cpu_subsys.dev_root, &dev_attr_rescan);
|
|
|
if (rc)
|
|
|
return rc;
|
|
|
#endif
|
|
|
+ cpu_notifier_register_begin();
|
|
|
for_each_present_cpu(cpu) {
|
|
|
rc = smp_add_present_cpu(cpu);
|
|
|
if (rc)
|
|
|
- return rc;
|
|
|
+ goto out;
|
|
|
}
|
|
|
- return 0;
|
|
|
+
|
|
|
+ __hotcpu_notifier(smp_cpu_notify, 0);
|
|
|
+
|
|
|
+out:
|
|
|
+ cpu_notifier_register_done();
|
|
|
+ return rc;
|
|
|
}
|
|
|
subsys_initcall(s390_smp_init);
|