linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: tip-bot for Thomas Gleixner <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
	k.kozlowski@samsung.com, kgene.kim@samsung.com,
	kyungmin.park@samsung.com, b.zolnierkie@samsung.com,
	m.szyprowski@samsung.com, tglx@linutronix.de
Subject: [tip:irq/urgent] irqchip: Gic: Support forced affinity setting
Date: Thu, 17 Apr 2014 14:39:56 -0700	[thread overview]
Message-ID: <tip-ffde1de64012c406dfdda8690918248b472f24e4@git.kernel.org> (raw)
In-Reply-To: <20140416143315.916984416@linutronix.de>

Commit-ID:  ffde1de64012c406dfdda8690918248b472f24e4
Gitweb:     http://git.kernel.org/tip/ffde1de64012c406dfdda8690918248b472f24e4
Author:     Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Wed, 16 Apr 2014 14:36:44 +0000
Committer:  Thomas Gleixner <tglx@linutronix.de>
CommitDate: Thu, 17 Apr 2014 23:36:28 +0200

irqchip: Gic: Support forced affinity setting

To support the affinity setting of per cpu timers in the early startup
of a not yet online cpu, implement the force logic, which disables the
cpu online check.

Tagged for stable to allow a simple fix of the affected SoC clock
event drivers.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: Tomasz Figa <t.figa@samsung.com>,
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>,
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: linux-arm-kernel@lists.infradead.org,
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/20140416143315.916984416@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 drivers/irqchip/irq-gic.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
index 4300b66..57d165e 100644
--- a/drivers/irqchip/irq-gic.c
+++ b/drivers/irqchip/irq-gic.c
@@ -246,10 +246,14 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val,
 			    bool force)
 {
 	void __iomem *reg = gic_dist_base(d) + GIC_DIST_TARGET + (gic_irq(d) & ~3);
-	unsigned int shift = (gic_irq(d) % 4) * 8;
-	unsigned int cpu = cpumask_any_and(mask_val, cpu_online_mask);
+	unsigned int cpu, shift = (gic_irq(d) % 4) * 8;
 	u32 val, mask, bit;
 
+	if (!force)
+		cpu = cpumask_any_and(mask_val, cpu_online_mask);
+	else
+		cpu = cpumask_first(mask_val);
+
 	if (cpu >= NR_GIC_CPU_IF || cpu >= nr_cpu_ids)
 		return -EINVAL;
 

  reply	other threads:[~2014-04-17 21:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-16 14:36 [patch 0/4] genirq/exynos timers: Fix the CPU hotplug wreckage sanely Thomas Gleixner
2014-04-16 14:36 ` [patch 2/4] irqchip: gic: Support forced affinity setting Thomas Gleixner
2014-04-17 21:39   ` tip-bot for Thomas Gleixner [this message]
2014-04-16 14:36 ` [patch 1/4] genirq: Allow forcing cpu affinity of interrupts Thomas Gleixner
2014-04-17 21:39   ` [tip:irq/urgent] " tip-bot for Thomas Gleixner
2014-04-16 14:36 ` [patch 4/4] clocksource: exynos_mct: Register clock event after request_irq() Thomas Gleixner
2014-04-17 21:40   ` [tip:irq/urgent] clocksource: Exynos_mct: " tip-bot for Krzysztof Kozlowski
2014-04-16 14:36 ` [patch 3/4] clocksource: exynos_mct: Use irq_force_affinity() in cpu bringup Thomas Gleixner
2014-04-17 21:40   ` [tip:irq/urgent] clocksource: Exynos_mct: Use irq_force_affinity( ) " tip-bot for Thomas Gleixner
2014-04-16 15:59 ` [patch 0/4] genirq/exynos timers: Fix the CPU hotplug wreckage sanely Krzysztof Kozlowski
2014-04-16 21:16   ` Thomas Gleixner

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=tip-ffde1de64012c406dfdda8690918248b472f24e4@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=hpa@zytor.com \
    --cc=k.kozlowski@samsung.com \
    --cc=kgene.kim@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).