diff options
-rw-r--r-- | kernel/sched.c | 12 | ||||
-rw-r--r-- | kernel/sched_features.h | 5 |
2 files changed, 15 insertions, 2 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index c210321adcb9..e8e603bf8761 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -3602,11 +3602,19 @@ static void update_cpu_power(struct sched_domain *sd, int cpu) | |||
3602 | unsigned long power = SCHED_LOAD_SCALE; | 3602 | unsigned long power = SCHED_LOAD_SCALE; |
3603 | struct sched_group *sdg = sd->groups; | 3603 | struct sched_group *sdg = sd->groups; |
3604 | 3604 | ||
3605 | power *= arch_scale_freq_power(sd, cpu); | 3605 | if (sched_feat(ARCH_POWER)) |
3606 | power *= arch_scale_freq_power(sd, cpu); | ||
3607 | else | ||
3608 | power *= default_scale_freq_power(sd, cpu); | ||
3609 | |||
3606 | power >>= SCHED_LOAD_SHIFT; | 3610 | power >>= SCHED_LOAD_SHIFT; |
3607 | 3611 | ||
3608 | if ((sd->flags & SD_SHARE_CPUPOWER) && weight > 1) { | 3612 | if ((sd->flags & SD_SHARE_CPUPOWER) && weight > 1) { |
3609 | power *= arch_scale_smt_power(sd, cpu); | 3613 | if (sched_feat(ARCH_POWER)) |
3614 | power *= arch_scale_smt_power(sd, cpu); | ||
3615 | else | ||
3616 | power *= default_scale_smt_power(sd, cpu); | ||
3617 | |||
3610 | power >>= SCHED_LOAD_SHIFT; | 3618 | power >>= SCHED_LOAD_SHIFT; |
3611 | } | 3619 | } |
3612 | 3620 | ||
diff --git a/kernel/sched_features.h b/kernel/sched_features.h index e98c2e8de1d5..294e10edd3c8 100644 --- a/kernel/sched_features.h +++ b/kernel/sched_features.h | |||
@@ -82,6 +82,11 @@ SCHED_FEAT(LAST_BUDDY, 1) | |||
82 | */ | 82 | */ |
83 | SCHED_FEAT(CACHE_HOT_BUDDY, 1) | 83 | SCHED_FEAT(CACHE_HOT_BUDDY, 1) |
84 | 84 | ||
85 | /* | ||
86 | * Use arch dependent cpu power functions | ||
87 | */ | ||
88 | SCHED_FEAT(ARCH_POWER, 0) | ||
89 | |||
85 | SCHED_FEAT(HRTICK, 0) | 90 | SCHED_FEAT(HRTICK, 0) |
86 | SCHED_FEAT(DOUBLE_TICK, 0) | 91 | SCHED_FEAT(DOUBLE_TICK, 0) |
87 | SCHED_FEAT(LB_BIAS, 1) | 92 | SCHED_FEAT(LB_BIAS, 1) |