diff options
Diffstat (limited to 'kernel/sched/core.c')
-rw-r--r-- | kernel/sched/core.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 1150d8665ac8..7b874fb5ebcd 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -1168,6 +1168,32 @@ static inline void clear_hmp_request(int cpu) } } +int sched_set_static_cpu_pwr_cost(int cpu, unsigned int cost) +{ + struct rq *rq = cpu_rq(cpu); + + rq->static_cpu_pwr_cost = cost; + return 0; +} + +unsigned int sched_get_static_cpu_pwr_cost(int cpu) +{ + return cpu_rq(cpu)->static_cpu_pwr_cost; +} + +int sched_set_static_cluster_pwr_cost(int cpu, unsigned int cost) +{ + struct rq *rq = cpu_rq(cpu); + + rq->static_cluster_pwr_cost = cost; + return 0; +} + +unsigned int sched_get_static_cluster_pwr_cost(int cpu) +{ + return cpu_rq(cpu)->static_cluster_pwr_cost; +} + #else static inline int got_boost_kick(void) @@ -9398,6 +9424,9 @@ void __init sched_init(void) rq->cur_irqload = 0; rq->avg_irqload = 0; rq->irqload_ts = 0; + rq->static_cpu_pwr_cost = 0; + rq->static_cluster_pwr_cost = 0; + #ifdef CONFIG_SCHED_FREQ_INPUT rq->curr_runnable_sum = rq->prev_runnable_sum = 0; rq->old_busy_time = 0; |