@@ -5206,18 +5206,6 @@ static int sched_domain_debug_one(struct sched_domain *sd, int cpu, int level,
break;
}
- /*
- * Even though we initialize ->power to something semi-sane,
- * we leave power_orig unset. This allows us to detect if
- * domain iteration is still funny without causing /0 traps.
- */
- if (!group->sgp->power_orig) {
- printk(KERN_CONT "\n");
- printk(KERN_ERR "ERROR: domain->cpu_power not "
- "set\n");
- break;
- }
-
if (!cpumask_weight(sched_group_cpus(group))) {
printk(KERN_CONT "\n");
printk(KERN_ERR "ERROR: empty group\n");
@@ -5807,8 +5795,6 @@ build_sched_groups(struct sched_domain *sd, int cpu)
continue;
group = get_group(i, sdd, &sg);
- cpumask_clear(sched_group_cpus(sg));
- sg->sgp->power = 0;
cpumask_setall(sched_group_mask(sg));
for_each_cpu(j, span) {
@@ -5819,6 +5805,9 @@ build_sched_groups(struct sched_domain *sd, int cpu)
cpumask_set_cpu(j, sched_group_cpus(sg));
}
+ sg->sgp->power = SCHED_POWER_SCALE * cpumask_weight(sched_group_cpus(sg));
+ sg->sgp->power_orig = sg->sgp->power;
+
if (!first)
first = sg;
if (last)