From: Lukasz Luba Date: Tue, 30 Oct 2018 13:19:51 +0000 (+0100) Subject: sched/sched.h: add new function for changing cluster power 'weight' X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=871cc3fb42eb305fb4c59813f172b997bc56edff;p=platform%2Fkernel%2Flinux-exynos.git sched/sched.h: add new function for changing cluster power 'weight' This patch adds new interface for sched power which controls power allocation for CPUs. Signed-off-by: Lukasz Luba --- diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 7c8dea6df31a..725e0c19ae96 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -2246,6 +2246,7 @@ unsigned long scale_irq_capacity(unsigned long util, unsigned long irq, unsigned #endif #define SCHED_POWER_FORCE_UPDATE_RT 0x01 +#define SCHED_POWER_CLUSTER_REQ 0x2 #ifdef CONFIG_THERMAL struct update_sched_power { void (*func)(struct update_sched_power *, int, unsigned int, int, int); @@ -2263,7 +2264,17 @@ static inline void sched_power_change_cpu_weight(int cpu, unsigned long weight, if (update) update->func(update, cpu, weight, flags, time); } + +static inline +void sched_power_change_cluster_weight(int cpu, unsigned long weight, int flags) +{ + sched_power_change_cpu_weight(cpu, weight, flags | + SCHED_POWER_CLUSTER_REQ); +} #else static inline void sched_power_change_cpu_weight(int cpu, unsigned int weight, int flags) {} +static inline +void sched_power_change_cluster_weight(int cpu, unsigned int weight, int flags) +{} #endif /* CONFIG_THERMAL */