All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lina Iyer <lina.iyer@linaro.org>
To: khilman@linaro.org, tglx@linutronix.de, linux-pm@vger.kernel.org,
	daniel.lezcano@linaro.org, ulf.hansson@linaro.org
Cc: Praveen Chidambaram <pchidamb@codeaurora.org>,
	Lina Iyer <lina.iyer@linaro.org>
Subject: [PATCH 1/2] arm: irq: Notify affinity change when migrating IRQs during hotplug
Date: Wed, 20 Aug 2014 10:59:47 -0600	[thread overview]
Message-ID: <1408553988-63924-1-git-send-email-lina.iyer@linaro.org> (raw)

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


             reply	other threads:[~2014-08-20 17:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-20 16:59 Lina Iyer [this message]
2014-08-20 16:59 ` [PATCH 2/2] arm64: irq: Notify affinity change when migrating IRQs during hotplug Lina Iyer
2014-08-27 17:09 ` [PATCH 1/2] arm: " Kevin Hilman
2014-08-27 22:51   ` Lina Iyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1408553988-63924-1-git-send-email-lina.iyer@linaro.org \
    --to=lina.iyer@linaro.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=khilman@linaro.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pchidamb@codeaurora.org \
    --cc=tglx@linutronix.de \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.