aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/s390/kernel/topology.c5
-rw-r--r--include/linux/topology.h2
-rw-r--r--kernel/sched.c8
3 files changed, 11 insertions, 4 deletions
diff --git a/arch/s390/kernel/topology.c b/arch/s390/kernel/topology.c
index a947899dcba1..bf96f1b5c6ec 100644
--- a/arch/s390/kernel/topology.c
+++ b/arch/s390/kernel/topology.c
@@ -212,7 +212,7 @@ static void update_cpu_core_map(void)
212 cpu_core_map[cpu] = cpu_coregroup_map(cpu); 212 cpu_core_map[cpu] = cpu_coregroup_map(cpu);
213} 213}
214 214
215void arch_update_cpu_topology(void) 215int arch_update_cpu_topology(void)
216{ 216{
217 struct tl_info *info = tl_info; 217 struct tl_info *info = tl_info;
218 struct sys_device *sysdev; 218 struct sys_device *sysdev;
@@ -221,7 +221,7 @@ void arch_update_cpu_topology(void)
221 if (!machine_has_topology) { 221 if (!machine_has_topology) {
222 update_cpu_core_map(); 222 update_cpu_core_map();
223 topology_update_polarization_simple(); 223 topology_update_polarization_simple();
224 return; 224 return 0;
225 } 225 }
226 stsi(info, 15, 1, 2); 226 stsi(info, 15, 1, 2);
227 tl_to_cores(info); 227 tl_to_cores(info);
@@ -230,6 +230,7 @@ void arch_update_cpu_topology(void)
230 sysdev = get_cpu_sysdev(cpu); 230 sysdev = get_cpu_sysdev(cpu);
231 kobject_uevent(&sysdev->kobj, KOBJ_CHANGE); 231 kobject_uevent(&sysdev->kobj, KOBJ_CHANGE);
232 } 232 }
233 return 1;
233} 234}
234 235
235static void topology_work_fn(struct work_struct *work) 236static void topology_work_fn(struct work_struct *work)
diff --git a/include/linux/topology.h b/include/linux/topology.h
index 117f1b7405cf..0c5b5ac36d8e 100644
--- a/include/linux/topology.h
+++ b/include/linux/topology.h
@@ -49,7 +49,7 @@
49 for_each_online_node(node) \ 49 for_each_online_node(node) \
50 if (nr_cpus_node(node)) 50 if (nr_cpus_node(node))
51 51
52void arch_update_cpu_topology(void); 52int arch_update_cpu_topology(void);
53 53
54/* Conform to ACPI 2.0 SLIT distance definitions */ 54/* Conform to ACPI 2.0 SLIT distance definitions */
55#define LOCAL_DISTANCE 10 55#define LOCAL_DISTANCE 10
diff --git a/kernel/sched.c b/kernel/sched.c
index ef212da928e8..fcfbbd9dbd60 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -7675,8 +7675,14 @@ static struct sched_domain_attr *dattr_cur;
7675 */ 7675 */
7676static cpumask_t fallback_doms; 7676static cpumask_t fallback_doms;
7677 7677
7678void __attribute__((weak)) arch_update_cpu_topology(void) 7678/*
7679 * arch_update_cpu_topology lets virtualized architectures update the
7680 * cpu core maps. It is supposed to return 1 if the topology changed
7681 * or 0 if it stayed the same.
7682 */
7683int __attribute__((weak)) arch_update_cpu_topology(void)
7679{ 7684{
7685 return 0;
7680} 7686}
7681 7687
7682/* 7688/*