]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
sched: add arch_update_cpu_topology hook.
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Wed, 12 Mar 2008 17:31:59 +0000 (18:31 +0100)
committerIngo Molnar <mingo@elte.hu>
Fri, 21 Mar 2008 15:43:48 +0000 (16:43 +0100)
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 <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/linux/topology.h
kernel/sched.c

index 2d8dac8799cf3191084eea9a185ce6ac66051c1c..bd14f8b30f0998a874ecc33a220a673da5aae9c8 100644 (file)
@@ -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
index 78482e51b58353969fb346cbc8bbc848d93c4042..28c73f07efb2f7506f70be5ceb7a44c134770afa 100644 (file)
@@ -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)