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 /include/linux | |
| 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 'include/linux')
| -rw-r--r-- | include/linux/cpumask.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h index 7e956e33618f..94013037585e 100644 --- a/include/linux/cpumask.h +++ b/include/linux/cpumask.h @@ -98,6 +98,13 @@ extern const struct cpumask *const cpu_isolated_mask; #define num_present_cpus() cpumask_weight(cpu_present_mask) #define num_active_cpus() cpumask_weight(cpu_active_mask) #define num_isolated_cpus() cpumask_weight(cpu_isolated_mask) +#define num_online_uniso_cpus() \ +({ \ + cpumask_t mask; \ + \ + cpumask_andnot(&mask, cpu_online_mask, cpu_isolated_mask); \ + cpumask_weight(&mask); \ +}) #define cpu_online(cpu) cpumask_test_cpu((cpu), cpu_online_mask) #define cpu_possible(cpu) cpumask_test_cpu((cpu), cpu_possible_mask) #define cpu_present(cpu) cpumask_test_cpu((cpu), cpu_present_mask) @@ -109,6 +116,7 @@ extern const struct cpumask *const cpu_isolated_mask; #define num_present_cpus() 1U #define num_active_cpus() 1U #define num_isolated_cpus() 0U +#define num_online_uniso_cpus() 1U #define cpu_online(cpu) ((cpu) == 0) #define cpu_possible(cpu) ((cpu) == 0) #define cpu_present(cpu) ((cpu) == 0) |
