sched: Compile cpu_isolated_mask in SCHED_WALT only

cpu_isolated_mask can only be used when SCHED_WALT is enabled. The
addition of the cpu_isolated_mask causes ABI to break. Thus, compile
references to cpu_isolated_mask only when SCHED_WALT is enabled.

Change-Id: I0982f6431abca807168dbabc4aca74771819565c
Signed-off-by: Elliot Berman <[email protected]>
This commit is contained in:
Elliot Berman 2020-05-27 15:45:11 -07:00
commit 9f125adcf2
15 changed files with 17282 additions and 17192 deletions

View file

@ -989,8 +989,10 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen,
if (!cpu_present(cpu))
return -EINVAL;
#ifdef CONFIG_SCHED_WALT
if (!tasks_frozen && !cpu_isolated(cpu) && num_online_uniso_cpus() == 1)
return -EBUSY;
#endif
cpus_write_lock();
if (trace_cpuhp_latency_enabled())
@ -2386,8 +2388,10 @@ EXPORT_SYMBOL(__cpu_present_mask);
struct cpumask __cpu_active_mask __read_mostly;
EXPORT_SYMBOL(__cpu_active_mask);
#ifdef CONFIG_SCHED_WALT
struct cpumask __cpu_isolated_mask __read_mostly;
EXPORT_SYMBOL(__cpu_isolated_mask);
#endif
atomic_t __num_online_cpus __read_mostly;
EXPORT_SYMBOL(__num_online_cpus);
@ -2407,10 +2411,12 @@ void init_cpu_online(const struct cpumask *src)
cpumask_copy(&__cpu_online_mask, src);
}
#ifdef CONFIG_SCHED_WALT
void init_cpu_isolated(const struct cpumask *src)
{
cpumask_copy(&__cpu_isolated_mask, src);
}
#endif
void set_cpu_online(unsigned int cpu, bool online)
{