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

Commit 9b75e6e0 authored by Pavankumar Kondeti's avatar Pavankumar Kondeti
Browse files

sched: Fix compilation errors with !SCHED_HMP



When SCHED_HMP is disabled, there are few compilation errors.
Fix it.

CRs-Fixed: 998670
Change-Id: I139545a562c1ee5a5fa8b6761f2ec27d1b2bb26f
Signed-off-by: default avatarPavankumar Kondeti <pkondeti@codeaurora.org>
parent fc23af4e
Loading
Loading
Loading
Loading
+13 −13
Original line number Diff line number Diff line
@@ -2183,10 +2183,6 @@ extern void do_set_cpus_allowed(struct task_struct *p,

extern int set_cpus_allowed_ptr(struct task_struct *p,
				const struct cpumask *new_mask);
extern void sched_set_cpu_cstate(int cpu, int cstate,
			 int wakeup_energy, int wakeup_latency);
extern void sched_set_cluster_dstate(const cpumask_t *cluster_cpus, int dstate,
				int wakeup_energy, int wakeup_latency);
#else
static inline void do_set_cpus_allowed(struct task_struct *p,
				      const struct cpumask *new_mask)
@@ -2199,15 +2195,6 @@ static inline int set_cpus_allowed_ptr(struct task_struct *p,
		return -EINVAL;
	return 0;
}
static inline void
sched_set_cpu_cstate(int cpu, int cstate, int wakeup_energy, int wakeup_latency)
{
}

static inline void sched_set_cluster_dstate(const cpumask_t *cluster_cpus,
			int dstate, int wakeup_energy, int wakeup_latency)
{
}
#endif

extern int sched_set_wake_up_idle(struct task_struct *p, int wake_up_idle);
@@ -2224,6 +2211,10 @@ extern int sched_set_static_cpu_pwr_cost(int cpu, unsigned int cost);
extern unsigned int sched_get_static_cpu_pwr_cost(int cpu);
extern int sched_set_static_cluster_pwr_cost(int cpu, unsigned int cost);
extern unsigned int sched_get_static_cluster_pwr_cost(int cpu);
extern void sched_set_cpu_cstate(int cpu, int cstate,
			 int wakeup_energy, int wakeup_latency);
extern void sched_set_cluster_dstate(const cpumask_t *cluster_cpus, int dstate,
				int wakeup_energy, int wakeup_latency);
#ifdef CONFIG_SCHED_QHMP
extern int sched_set_cpu_prefer_idle(int cpu, int prefer_idle);
extern int sched_get_cpu_prefer_idle(int cpu);
@@ -2241,6 +2232,15 @@ static inline int sched_set_boost(int enable)
{
	return -EINVAL;
}
static inline void
sched_set_cpu_cstate(int cpu, int cstate, int wakeup_energy, int wakeup_latency)
{
}

static inline void sched_set_cluster_dstate(const cpumask_t *cluster_cpus,
			int dstate, int wakeup_energy, int wakeup_latency)
{
}
#endif

#ifdef CONFIG_NO_HZ_COMMON
+6 −0
Original line number Diff line number Diff line
@@ -788,6 +788,8 @@ void sched_avg_update(struct rq *rq)
	}
}

#ifdef CONFIG_SCHED_HMP

/*
 * Note C-state for (idle) cpus.
 *
@@ -824,6 +826,8 @@ void sched_set_cluster_dstate(const cpumask_t *cluster_cpus, int dstate,
	cluster->dstate_wakeup_latency = wakeup_latency;
}

#endif /* CONFIG_SCHED_HMP */

#endif /* CONFIG_SMP */

#ifdef CONFIG_SCHED_HMP
@@ -1631,6 +1635,8 @@ static inline void clear_boost_kick(int cpu) { }

static inline void clear_hmp_request(int cpu) { }

static inline void update_cluster_topology(void) {}

#endif	/* CONFIG_SCHED_HMP */

#if defined(CONFIG_SCHED_HMP)
+2 −17
Original line number Diff line number Diff line
@@ -3990,17 +3990,6 @@ static inline int select_best_cpu(struct task_struct *p, int target,
	return 0;
}

unsigned int power_cost(int cpu, u64 demand)
{
	return SCHED_CAPACITY_SCALE;
}

static inline int
spill_threshold_crossed(struct cpu_select_env *env, struct rq *rq)
{
	return 0;
}

static inline int sched_boost(void)
{
	return 0;
@@ -4042,11 +4031,7 @@ inc_hmp_sched_stats_fair(struct rq *rq, struct task_struct *p) { }
static inline void
dec_hmp_sched_stats_fair(struct rq *rq, struct task_struct *p) { }

static inline int
preferred_cluster(struct sched_cluster *cluster, struct task_struct *p)
{
	return 1;
}
#define preferred_cluster(...) 1

#endif	/* CONFIG_SCHED_HMP */

@@ -9521,7 +9506,7 @@ static inline int find_new_hmp_ilb(int type)
	return nr_cpu_ids;
}
#else	/* CONFIG_SCHED_HMP */
static inline int find_new_hmp_ilb(void)
static inline int find_new_hmp_ilb(int type)
{
	return 0;
}
+1 −0
Original line number Diff line number Diff line
@@ -1318,6 +1318,7 @@ extern int sched_boost(void);

#define sched_enable_hmp 0
#define sched_freq_legacy_mode 1
#define sched_use_pelt 1

static inline void check_for_migration(struct rq *rq, struct task_struct *p) { }
static inline void pre_big_task_count_change(void) { }