[S390] topology: fix cpu masks for topology=off case
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Fri, 29 Oct 2010 14:50:38 +0000 (16:50 +0200)
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>
Fri, 29 Oct 2010 14:50:50 +0000 (16:50 +0200)
Fix cpu masks for 'topology=off' case. Folding of the scheduling domains
happen in such a way that everything belongs to the MC domain instead
of the CPU doimain.
This should fix a performance regression introduced with
eafd2b6d "[S390] topology: use default MC domain initializer" and also
makes sure we have the same behavious as if CONFIG_SCHED_MC was not
selected at all.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/kernel/topology.c

index a9dee9048ee58017bbd6cf03ac9377047dc09f8a..94b06c31fc8a389c752bcefe843d237ed1871a1a 100644 (file)
@@ -53,8 +53,10 @@ static cpumask_t cpu_group_map(struct mask_info *info, unsigned int cpu)
        cpumask_t mask;
 
        cpus_clear(mask);
-       if (!topology_enabled || !MACHINE_HAS_TOPOLOGY)
-               return cpu_possible_map;
+       if (!topology_enabled || !MACHINE_HAS_TOPOLOGY) {
+               cpumask_copy(&mask, cpumask_of(cpu));
+               return mask;
+       }
        while (info) {
                if (cpu_isset(cpu, info->mask)) {
                        mask = info->mask;