|
@@ -443,6 +443,23 @@ int topology_cpu_init(struct cpu *cpu)
|
|
|
return sysfs_create_group(&cpu->dev.kobj, &topology_cpu_attr_group);
|
|
|
}
|
|
|
|
|
|
+const struct cpumask *cpu_coregroup_mask(int cpu)
|
|
|
+{
|
|
|
+ return &cpu_topology[cpu].core_mask;
|
|
|
+}
|
|
|
+
|
|
|
+static const struct cpumask *cpu_book_mask(int cpu)
|
|
|
+{
|
|
|
+ return &cpu_topology[cpu].book_mask;
|
|
|
+}
|
|
|
+
|
|
|
+static struct sched_domain_topology_level s390_topology[] = {
|
|
|
+ { cpu_coregroup_mask, cpu_core_flags, SD_INIT_NAME(MC) },
|
|
|
+ { cpu_book_mask, SD_INIT_NAME(BOOK) },
|
|
|
+ { cpu_cpu_mask, SD_INIT_NAME(DIE) },
|
|
|
+ { NULL, },
|
|
|
+};
|
|
|
+
|
|
|
static int __init topology_init(void)
|
|
|
{
|
|
|
if (!MACHINE_HAS_TOPOLOGY) {
|
|
@@ -451,6 +468,9 @@ static int __init topology_init(void)
|
|
|
}
|
|
|
set_topology_timer();
|
|
|
out:
|
|
|
+
|
|
|
+ set_sched_topology(s390_topology);
|
|
|
+
|
|
|
return device_create_file(cpu_subsys.dev_root, &dev_attr_dispatching);
|
|
|
}
|
|
|
device_initcall(topology_init);
|