mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: byungchul.park@lge.com
To: will.deacon@arm.com
Cc: sudeep.holla@arm.com, catalin.marinas@arm.com,
	linux-kernel@vger.kernel.org,
	Byungchul Park <byungchul.park@lge.com>
Subject: [PATCH 1/2] Revert "arm64: use cpu_online_mask when using forced irq_set_affinity"
Date: Wed, 27 Aug 2014 18:30:06 +0900	[thread overview]
Message-ID: <1409131806-11276-1-git-send-email-byungchul.park@lge.com> (raw)

From: Byungchul Park <byungchul.park@lge.com>

This reverts commit 601c942176d8ad8334118bddb747e3720bed24f8.

This patch is designed to ensure that the cpu being offlined is not
present in the affinity mask. But it is a bad idea to overwrite the
affinity variable with cpu_online_mask, even in case that the current
affinity already includes onlined cpus.

So revert this patch to replace it with another one doing exactly
what it intends.

Signed-off-by: Byungchul Park <byungchul.park@lge.com>
---
 arch/arm64/kernel/irq.c |   10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/arch/arm64/kernel/irq.c b/arch/arm64/kernel/irq.c
index 0f08dfd..473e5db 100644
--- a/arch/arm64/kernel/irq.c
+++ b/arch/arm64/kernel/irq.c
@@ -97,15 +97,11 @@ 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)
+	if (cpumask_any_and(affinity, cpu_online_mask) >= nr_cpu_ids) {
+		affinity = cpu_online_mask;
 		ret = true;
+	}
 
-	/*
-	 * when using forced irq_set_affinity we must ensure that the cpu
-	 * being offlined is not present in the affinity mask, it may be
-	 * selected as the target CPU otherwise
-	 */
-	affinity = cpu_online_mask;
 	c = irq_data_get_irq_chip(d);
 	if (!c->irq_set_affinity)
 		pr_debug("IRQ%u: unable to set affinity\n", d->irq);
-- 
1.7.9.5


             reply	other threads:[~2014-08-27  9:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-27  9:30 byungchul.park [this message]
2014-08-28  9:38 ` Will Deacon
2014-08-28  9:49   ` Sudeep Holla
2014-08-28  9:50     ` Will Deacon
2014-08-28  9:55       ` Sudeep Holla

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=1409131806-11276-1-git-send-email-byungchul.park@lge.com \
    --to=byungchul.park@lge.com \
    --cc=catalin.marinas@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sudeep.holla@arm.com \
    --cc=will.deacon@arm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®