Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 701cd311 authored by Satya Durga Srinivasu Prabhala's avatar Satya Durga Srinivasu Prabhala
Browse files

sched: fix compilation issues when WALT is disabled



Below compilation issues are observed when WALT is disabled,
fix them by adding proper checks.

1.
kernel/sched/rt.c:1770:39: \
	error: use of undeclared identifier 'FULL_THROTTLE_BOOST'

2.
kernel/sched/fair.c:7032:21: \
	error: use of undeclared identifier 'FULL_THROTTLE_BOOST'

Change-Id: I57d75490ae98fec44e0b2561c9e67c86e9d3a6ad
Signed-off-by: default avatarSatya Durga Srinivasu Prabhala <satyap@codeaurora.org>
parent 70001df0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -7029,7 +7029,7 @@ static void find_best_target(struct sched_domain *sd, cpumask_t *cpus,
		if (!prefer_idle &&
			(target_cpu != -1 || best_idle_cpu != -1) &&
			(fbt_env->placement_boost == SCHED_BOOST_NONE ||
			sched_boost() != FULL_THROTTLE_BOOST ||
			!is_full_throttle_boost() ||
			(fbt_env->placement_boost == SCHED_BOOST_ON_BIG &&
				!next_group_higher_cap)))
			break;
+1 −3
Original line number Diff line number Diff line
@@ -1767,9 +1767,7 @@ static int rt_energy_aware_wake_cpu(struct task_struct *task)
	unsigned long tutil = task_util(task);
	int best_cpu_idle_idx = INT_MAX;
	int cpu_idle_idx = -1;
	bool boost_on_big = sched_boost() == FULL_THROTTLE_BOOST ?
				  (sched_boost_policy() == SCHED_BOOST_ON_BIG) :
				  false;
	bool boost_on_big = rt_boost_on_big();

	rcu_read_lock();

+21 −0
Original line number Diff line number Diff line
@@ -2996,6 +2996,17 @@ static inline int sched_boost(void)
	return sched_boost_type;
}

static inline bool rt_boost_on_big(void)
{
	return sched_boost() == FULL_THROTTLE_BOOST ?
			(sched_boost_policy() == SCHED_BOOST_ON_BIG) : false;
}

static inline bool is_full_throttle_boost(void)
{
	return sched_boost() == FULL_THROTTLE_BOOST ? true : false;
}

extern int preferred_cluster(struct sched_cluster *cluster,
						struct task_struct *p);
extern struct sched_cluster *rq_cluster(struct rq *rq);
@@ -3142,6 +3153,16 @@ static inline int sched_boost(void)
	return 0;
}

static inline bool rt_boost_on_big(void)
{
	return false;
}

static inline bool is_full_throttle_boost(void)
{
	return false;
}

static inline enum sched_boost_policy task_boost_policy(struct task_struct *p)
{
	return SCHED_BOOST_NONE;