mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 06:09:23 -04:00
kernel: Add snapshot of changes to support cpu isolation
This snapshot is taken from msm-4.19 as of commit 5debecbe7195
("trace: filter out spurious preemption and IRQs disable traces").
Change-Id: I222aa448ac68f7365065f62dba9db94925da38a0
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
This commit is contained in:
parent
8573d7bfaa
commit
201ea48219
20 changed files with 398 additions and 77 deletions
11
kernel/cpu.c
11
kernel/cpu.c
|
|
@ -990,6 +990,9 @@ static int __ref _cpu_down(unsigned int cpu, int tasks_frozen,
|
|||
if (!cpu_present(cpu))
|
||||
return -EINVAL;
|
||||
|
||||
if (!tasks_frozen && !cpu_isolated(cpu) && num_online_uniso_cpus() == 1)
|
||||
return -EBUSY;
|
||||
|
||||
cpus_write_lock();
|
||||
if (trace_cpuhp_latency_enabled())
|
||||
start_time = sched_clock();
|
||||
|
|
@ -2377,6 +2380,9 @@ EXPORT_SYMBOL(__cpu_present_mask);
|
|||
struct cpumask __cpu_active_mask __read_mostly;
|
||||
EXPORT_SYMBOL(__cpu_active_mask);
|
||||
|
||||
struct cpumask __cpu_isolated_mask __read_mostly;
|
||||
EXPORT_SYMBOL(__cpu_isolated_mask);
|
||||
|
||||
atomic_t __num_online_cpus __read_mostly;
|
||||
EXPORT_SYMBOL(__num_online_cpus);
|
||||
|
||||
|
|
@ -2395,6 +2401,11 @@ void init_cpu_online(const struct cpumask *src)
|
|||
cpumask_copy(&__cpu_online_mask, src);
|
||||
}
|
||||
|
||||
void init_cpu_isolated(const struct cpumask *src)
|
||||
{
|
||||
cpumask_copy(&__cpu_isolated_mask, src);
|
||||
}
|
||||
|
||||
void set_cpu_online(unsigned int cpu, bool online)
|
||||
{
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue