All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] arm: irq: Notify affinity change when migrating IRQs during hotplug
@ 2014-08-20 16:59 Lina Iyer
  2014-08-20 16:59 ` [PATCH 2/2] arm64: " Lina Iyer
  2014-08-27 17:09 ` [PATCH 1/2] arm: " Kevin Hilman
  0 siblings, 2 replies; 4+ messages in thread
From: Lina Iyer @ 2014-08-20 16:59 UTC (permalink / raw)
  To: khilman, tglx, linux-pm, daniel.lezcano, ulf.hansson
  Cc: Praveen Chidambaram, Lina Iyer

From: Praveen Chidambaram <pchidamb@codeaurora.org>

Hotplug causes IRQs affine to a core that is being taken down to migrate
to an online core. This is done by directly calling the irq_set_affinity
associated with the irq_chip structure. Instead using the
irq_set_affinity_locked() api lets the notifications bubble through.

Signed-off-by: Praveen Chidambaram <pchidamb@codeaurora.org>
Signed-off-by: Lina Iyer <lina.iyer@linaro.org>
---
 arch/arm/kernel/irq.c | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c
index 2c42576..8835ef2 100644
--- a/arch/arm/kernel/irq.c
+++ b/arch/arm/kernel/irq.c
@@ -157,7 +157,6 @@ static bool migrate_one_irq(struct irq_desc *desc)
 {
 	struct irq_data *d = irq_desc_get_irq_data(desc);
 	const struct cpumask *affinity = d->affinity;
-	struct irq_chip *c;
 	bool ret = false;
 
 	/*
@@ -167,17 +166,12 @@ static bool migrate_one_irq(struct irq_desc *desc)
 	if (irqd_is_per_cpu(d) || !cpumask_test_cpu(smp_processor_id(), affinity))
 		return false;
 
-	if (cpumask_any_and(affinity, cpu_online_mask) >= nr_cpu_ids) {
-		affinity = cpu_online_mask;
+	if (cpumask_any_and(affinity, cpu_online_mask) >= nr_cpu_ids)
 		ret = true;
-	}
-
-	c = irq_data_get_irq_chip(d);
-	if (!c->irq_set_affinity)
-		pr_debug("IRQ%u: unable to set affinity\n", d->irq);
-	else if (c->irq_set_affinity(d, affinity, true) == IRQ_SET_MASK_OK && ret)
-		cpumask_copy(d->affinity, affinity);
 
+	affinity = cpu_online_mask;
+	ret = (irq_set_affinity_locked(d, affinity, true) == IRQ_SET_MASK_OK)
+			&& ret;
 	return ret;
 }
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-08-27 22:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-20 16:59 [PATCH 1/2] arm: irq: Notify affinity change when migrating IRQs during hotplug Lina Iyer
2014-08-20 16:59 ` [PATCH 2/2] arm64: " Lina Iyer
2014-08-27 17:09 ` [PATCH 1/2] arm: " Kevin Hilman
2014-08-27 22:51   ` Lina Iyer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.