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

Commit 1aa9b699 authored by Steve Muckle's avatar Steve Muckle
Browse files

sched: fixes for compilation without CONFIG_SCHED_HMP



These fixes are necessary to compile without CONFIG_SCHED_HMP
enabled.

Change-Id: Iabbde3c22a81288242ed3a44fdfdb2a16db8b072
Signed-off-by: default avatarSteve Muckle <smuckle@codeaurora.org>
parent 483fa0ad
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -8094,11 +8094,13 @@ void __init sched_init(void)
	int i, j;
	unsigned long alloc_size = 0, ptr;

#ifdef CONFIG_SCHED_HMP
	if (num_possible_cpus() > 4)
		sched_enable_hmp = sched_enable_power_aware = 1;

	if (sched_enable_hmp)
		pr_info("HMP scheduling enabled.\n");
#endif

	BUG_ON(num_possible_cpus() > BITS_PER_LONG);

+15 −5
Original line number Diff line number Diff line
@@ -2044,11 +2044,6 @@ static inline int power_cost(struct task_struct *p, int cpu)
	return SCHED_POWER_SCALE;
}

static unsigned int power_cost_at_freq(int cpu, unsigned int freq)
{
	return 1;
}

static inline int
spill_threshold_crossed(struct task_struct *p, struct rq *rq, int cpu)
{
@@ -6073,6 +6068,7 @@ ret:
	return NULL;
}

#ifdef CONFIG_SCHED_HMP
static struct rq *find_busiest_queue_hmp(struct lb_env *env,
				     struct sched_group *group)
{
@@ -6094,6 +6090,13 @@ static struct rq *find_busiest_queue_hmp(struct lb_env *env,

	return busiest;
}
#else
static inline struct rq *find_busiest_queue_hmp(struct lb_env *env,
				     struct sched_group *group)
{
	return NULL;
}
#endif

/*
 * find_busiest_queue - find the busiest runqueue among the cpus in group.
@@ -6908,6 +6911,7 @@ end:
	clear_bit(NOHZ_BALANCE_KICK, nohz_flags(this_cpu));
}

#ifdef CONFIG_SCHED_HMP
static inline int _nohz_kick_needed_hmp(struct rq *rq, int cpu, int *type)
{
	struct sched_domain *sd;
@@ -6942,6 +6946,12 @@ static inline int _nohz_kick_needed_hmp(struct rq *rq, int cpu, int *type)

	return 0;
}
#else
static inline int _nohz_kick_needed_hmp(struct rq *rq, int cpu, int *type)
{
	return 0;
}
#endif

static inline int _nohz_kick_needed(struct rq *rq, int cpu, int *type)
{
+7 −0
Original line number Diff line number Diff line
@@ -1513,6 +1513,7 @@ next_idx:

static DEFINE_PER_CPU(cpumask_var_t, local_cpu_mask);

#ifdef CONFIG_SCHED_HMP
static int find_lowest_rq_hmp(struct task_struct *task)
{
	struct cpumask *lowest_mask = __get_cpu_var(local_cpu_mask);
@@ -1553,6 +1554,12 @@ static int find_lowest_rq_hmp(struct task_struct *task)
	}
	return best_cpu;
}
#else
static int find_lowest_rq_hmp(struct task_struct *task)
{
	return -1;
}
#endif

static int find_lowest_rq(struct task_struct *task)
{
+2 −0
Original line number Diff line number Diff line
@@ -782,6 +782,8 @@ static inline void dec_nr_big_small_task(struct rq *rq, struct task_struct *p)
{
}

#define power_cost_at_freq(...) 0

#define trace_sched_cpu_load(...)

#endif /* CONFIG_SCHED_HMP */