From: Heiko Carstens Date: Wed, 12 Mar 2008 17:31:59 +0000 (+0100) Subject: sched: add arch_update_cpu_topology hook. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=22e52b072dd87faa9b2559fe89d4e8f2370f81ca;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git sched: add arch_update_cpu_topology hook. Will be called each time the scheduling domains are rebuild. Needed for architectures that don't have a static cpu topology. Signed-off-by: Heiko Carstens Signed-off-by: Martin Schwidefsky Signed-off-by: Ingo Molnar --- diff --git a/include/linux/topology.h b/include/linux/topology.h index 2d8dac8799cf..bd14f8b30f09 100644 --- a/include/linux/topology.h +++ b/include/linux/topology.h @@ -50,6 +50,8 @@ for_each_online_node(node) \ if (nr_cpus_node(node)) +void arch_update_cpu_topology(void); + /* Conform to ACPI 2.0 SLIT distance definitions */ #define LOCAL_DISTANCE 10 #define REMOTE_DISTANCE 20 diff --git a/kernel/sched.c b/kernel/sched.c index 78482e51b583..28c73f07efb2 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -6807,6 +6807,10 @@ static int ndoms_cur; /* number of sched domains in 'doms_cur' */ */ static cpumask_t fallback_doms; +void __attribute__((weak)) arch_update_cpu_topology(void) +{ +} + /* * Set up scheduler domains and groups. Callers must hold the hotplug lock. * For now this just excludes isolated cpus, but could be used to @@ -6816,6 +6820,7 @@ static int arch_init_sched_domains(const cpumask_t *cpu_map) { int err; + arch_update_cpu_topology(); ndoms_cur = 1; doms_cur = kmalloc(sizeof(cpumask_t), GFP_KERNEL); if (!doms_cur)