diff options
author | Pavankumar Kondeti <pkondeti@codeaurora.org> | 2017-06-29 16:17:55 +0530 |
---|---|---|
committer | Pavankumar Kondeti <pkondeti@codeaurora.org> | 2017-06-29 16:27:33 +0530 |
commit | 76aa496f898a16266be01a1543797804d4baa149 (patch) | |
tree | c3dfb8fd5094db86a0a3699b656ed8d65b29a65f /kernel | |
parent | 84c69cb5aab50088644ee0bd53a7768eff65e14c (diff) |
cpu-hotplug: Keep atleast 1 online and un-isolated CPU
The PM_QOS_CPU_DMA_LATENCY vote attached to an IRQ is discarded,
if it is affined to an isolated CPU. So we need atleast 1 CPU
in online and un-isolate state. The scheduler rejects isolating
a CPU if it is the only online and un-isolated CPU in the system.
Add the same check for CPU hotplug.
Change-Id: I5bdfe6e3bb0352ed3ae5a2de90097b73d248f3fc
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/cpu.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c index e822cb0e18d5..1a26ef5b7d58 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -361,6 +361,9 @@ static int _cpu_down(unsigned int cpu, int tasks_frozen) if (!cpu_online(cpu)) return -EINVAL; + if (!tasks_frozen && !cpu_isolated(cpu) && num_online_uniso_cpus() == 1) + return -EBUSY; + cpu_hotplug_begin(); err = __cpu_notify(CPU_DOWN_PREPARE | mod, hcpu, -1, &nr_calls); |