s390/topology: call set_sched_topology early
[firefly-linux-kernel-4.4.55.git] / arch / s390 / kernel / topology.c
index 355a16c557026a21f50fbb39b51a5f1320b0773a..b93bed76ea94026d45c782eebe75c08dfb1a323d 100644 (file)
@@ -464,15 +464,17 @@ static struct sched_domain_topology_level s390_topology[] = {
 
 static int __init topology_init(void)
 {
-       if (!MACHINE_HAS_TOPOLOGY) {
+       if (MACHINE_HAS_TOPOLOGY)
+               set_topology_timer();
+       else
                topology_update_polarization_simple();
-               goto out;
-       }
-       set_topology_timer();
-out:
-
-       set_sched_topology(s390_topology);
-
        return device_create_file(cpu_subsys.dev_root, &dev_attr_dispatching);
 }
 device_initcall(topology_init);
+
+static int __init early_topology_init(void)
+{
+       set_sched_topology(s390_topology);
+       return 0;
+}
+early_initcall(early_topology_init);