public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jon Hunter <jonathanh@nvidia.com>
To: Thomas Gleixner <tglx@linutronix.de>,
	Jason Cooper <jason@lakedaemon.net>,
	Marc Zyngier <marc.zyngier@arm.com>
Cc: linux-kernel@vger.kernel.org, Jon Hunter <jonathanh@nvidia.com>
Subject: [PATCH 2/2] irqchip/gic: Only populate set_affinity for the root controller
Date: Mon, 21 Dec 2015 14:13:10 +0000	[thread overview]
Message-ID: <1450707190-29069-2-git-send-email-jonathanh@nvidia.com> (raw)
In-Reply-To: <1450707190-29069-1-git-send-email-jonathanh@nvidia.com>

Setting the affinity of an IRQ, it only applicable for the root
interrupt controller and so only populate this operator for the root
controller.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
---
 drivers/irqchip/irq-gic.c | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
index 94ad60c424a7..53b03f6038c1 100644
--- a/drivers/irqchip/irq-gic.c
+++ b/drivers/irqchip/irq-gic.c
@@ -384,9 +384,6 @@ static struct irq_chip gic_chip = {
 	.irq_unmask		= gic_unmask_irq,
 	.irq_eoi		= gic_eoi_irq,
 	.irq_set_type		= gic_set_type,
-#ifdef CONFIG_SMP
-	.irq_set_affinity	= gic_set_affinity,
-#endif
 	.irq_get_irqchip_state	= gic_irq_get_irqchip_state,
 	.irq_set_irqchip_state	= gic_irq_set_irqchip_state,
 	.flags			= IRQCHIP_SET_TYPE_MASKED |
@@ -1017,10 +1014,16 @@ static void __init __gic_init_bases(unsigned int gic_nr, int irq_start,
 	gic->chip.name = kasprintf(GFP_KERNEL, "GIC-%d", gic_nr);
 
 	/* Initialize irq_chip */
-	if (static_key_true(&supports_deactivate) && gic_nr == 0) {
-		gic->chip.irq_mask = gic_eoimode1_mask_irq;
-		gic->chip.irq_eoi = gic_eoimode1_eoi_irq;
-		gic->chip.irq_set_vcpu_affinity = gic_irq_set_vcpu_affinity;
+	if (gic_nr == 0) {
+		if (IS_ENABLED(CONFIG_SMP))
+			gic->chip.irq_set_affinity = gic_set_affinity;
+
+		if (static_key_true(&supports_deactivate)) {
+			gic->chip.irq_mask = gic_eoimode1_mask_irq;
+			gic->chip.irq_eoi = gic_eoimode1_eoi_irq;
+			gic->chip.irq_set_vcpu_affinity =
+				gic_irq_set_vcpu_affinity;
+		}
 	}
 
 #ifdef CONFIG_GIC_NON_BANKED
-- 
2.1.4


  reply	other threads:[~2015-12-21 14:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-21 14:13 [PATCH 1/2] irqchip/gic: Remove static irq_chip definition for eoimode1 Jon Hunter
2015-12-21 14:13 ` Jon Hunter [this message]
2015-12-22  1:00   ` [PATCH 2/2] irqchip/gic: Only populate set_affinity for the root controller kbuild test robot
2015-12-22  9:21     ` Jon Hunter

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=1450707190-29069-2-git-send-email-jonathanh@nvidia.com \
    --to=jonathanh@nvidia.com \
    --cc=jason@lakedaemon.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --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