summaryrefslogtreecommitdiff
path: root/kernel/irq
diff options
context:
space:
mode:
authorPavankumar Kondeti <pkondeti@codeaurora.org>2017-06-22 13:33:08 +0530
committerPavankumar Kondeti <pkondeti@codeaurora.org>2017-06-30 10:41:00 +0530
commitcd6d19b8e42cfef81a1ee3c4e4367295e8025024 (patch)
tree808fa78140734a20bf72bc71e91187f228d2a409 /kernel/irq
parent76aa496f898a16266be01a1543797804d4baa149 (diff)
genriq: pick only one CPU while overriding the affinity during migration
With commit bfc60d474137 ("genirq: Use irq_set_affinity_locked to change irq affinity"), affinity listeners receive the notification when the irq affinity is changed during migration. If there is no online and un-isolated CPU available from the user specified affinity, the affinity is overridden with all online and un-isolated CPUs. The same cpumask is notified to PM QOS affinity listener which applies PM_QOS_CPU_DMA_LATENCY vote to all those CPUs. As the low level irqchip driver sets affinity to only one CPU, do the same while overriding the affinity during migration. Change-Id: I0bcb75dd356658da100fbeeefd33ef8b121f4d6d Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Diffstat (limited to 'kernel/irq')
-rw-r--r--kernel/irq/cpuhotplug.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/irq/cpuhotplug.c b/kernel/irq/cpuhotplug.c
index 6c8e154c7384..3dc1dbd9c166 100644
--- a/kernel/irq/cpuhotplug.c
+++ b/kernel/irq/cpuhotplug.c
@@ -40,6 +40,17 @@ static bool migrate_one_irq(struct irq_desc *desc)
cpu_isolated_mask);
if (cpumask_empty(affinity))
affinity = cpu_online_mask;
+ /*
+ * We are overriding the affinity with all online and
+ * un-isolated cpus. irq_set_affinity_locked() call
+ * below notify this mask to PM QOS affinity listener.
+ * That results in applying the CPU_DMA_LATENCY QOS
+ * to all the CPUs specified in the mask. But the low
+ * level irqchip driver sets the affinity of an irq
+ * to only one CPU. So pick only one CPU from the
+ * prepared mask while overriding the user affinity.
+ */
+ affinity = cpumask_of(cpumask_any(affinity));
ret = true;
}