Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1330349 > unrolled thread

[PATCH 1/2] irqchip/gic: Only populate set_affinity for the root controller

Started byJon Hunter <jonathanh@nvidia.com>
First post2016-02-09 16:30 +0100
Last post2016-02-11 10:10 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 1/2] irqchip/gic: Only populate set_affinity for the root controller Jon Hunter <jonathanh@nvidia.com> - 2016-02-09 16:30 +0100
    Re: [PATCH 1/2] irqchip/gic: Only populate set_affinity for the root  controller Marc Zyngier <marc.zyngier@arm.com> - 2016-02-11 10:10 +0100

#1330349 — [PATCH 1/2] irqchip/gic: Only populate set_affinity for the root controller

FromJon Hunter <jonathanh@nvidia.com>
Date2016-02-09 16:30 +0100
Subject[PATCH 1/2] irqchip/gic: Only populate set_affinity for the root controller
Message-ID<r0ioP-5QL-49@gated-at.bofh.it>
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 | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
index 911758c056c1..db7b161b0295 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 |
@@ -400,9 +397,6 @@ static struct irq_chip gic_eoimode1_chip = {
 	.irq_unmask		= gic_unmask_irq,
 	.irq_eoi		= gic_eoimode1_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,
 	.irq_set_vcpu_affinity	= gic_irq_set_vcpu_affinity,
@@ -1039,6 +1033,11 @@ static void __init __gic_init_bases(unsigned int gic_nr, int irq_start,
 		gic->chip.name = kasprintf(GFP_KERNEL, "GIC-%d", gic_nr);
 	}
 
+#ifdef CONFIG_SMP
+	if (gic_nr == 0)
+		gic->chip.irq_set_affinity = gic_set_affinity;
+#endif
+
 #ifdef CONFIG_GIC_NON_BANKED
 	if (percpu_offset) { /* Frankein-GIC without banked registers... */
 		unsigned int cpu;
-- 
2.1.4

[toc] | [next] | [standalone]


#1331755 — Re: [PATCH 1/2] irqchip/gic: Only populate set_affinity for the root controller

FromMarc Zyngier <marc.zyngier@arm.com>
Date2016-02-11 10:10 +0100
SubjectRe: [PATCH 1/2] irqchip/gic: Only populate set_affinity for the root controller
Message-ID<r0Vqb-6Fe-25@gated-at.bofh.it>
In reply to#1330349
On 09/02/16 15:24, Jon Hunter wrote:
> 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>

Acked-by: Marc Zyngier <marc.zyngier@arm.com>

	M.
-- 
Jazz is not dead. It just smells funny...

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web