* [PATCH 1/2] irqchip/gic: Only populate set_affinity for the root controller
@ 2016-02-09 15:24 Jon Hunter
2016-02-09 15:24 ` [PATCH 2/2] irqchip/gic: Only set the EOImodeNS bit " Jon Hunter
2016-02-11 9:07 ` [PATCH 1/2] irqchip/gic: Only populate set_affinity " Marc Zyngier
0 siblings, 2 replies; 4+ messages in thread
From: Jon Hunter @ 2016-02-09 15:24 UTC (permalink / raw)
To: Thomas Gleixner, Jason Cooper, Marc Zyngier; +Cc: linux-kernel, Jon Hunter
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] irqchip/gic: Only set the EOImodeNS bit for the root controller
2016-02-09 15:24 [PATCH 1/2] irqchip/gic: Only populate set_affinity for the root controller Jon Hunter
@ 2016-02-09 15:24 ` Jon Hunter
2016-02-11 9:09 ` Marc Zyngier
2016-02-11 9:07 ` [PATCH 1/2] irqchip/gic: Only populate set_affinity " Marc Zyngier
1 sibling, 1 reply; 4+ messages in thread
From: Jon Hunter @ 2016-02-09 15:24 UTC (permalink / raw)
To: Thomas Gleixner, Jason Cooper, Marc Zyngier; +Cc: linux-kernel, Jon Hunter
EOImode1 is only used for the root controller and hence only the root
controller uses the eoimode1 functions for handling interrupts. However,
if the root controller supports EOImode1, then the EOImodeNS bit will be
set for all GICs, enabling EOImode1. This is not what we want and this
causes interrupts on non-root GICs to only be dropped in priority but
never deactivated. Therefore, only set the EOImodeNS bit for the root
controller.
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
---
drivers/irqchip/irq-gic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
index db7b161b0295..8f9ebf714e2b 100644
--- a/drivers/irqchip/irq-gic.c
+++ b/drivers/irqchip/irq-gic.c
@@ -437,7 +437,7 @@ static void gic_cpu_if_up(struct gic_chip_data *gic)
u32 bypass = 0;
u32 mode = 0;
- if (static_key_true(&supports_deactivate))
+ if (gic == &gic_data[0] && static_key_true(&supports_deactivate))
mode = GIC_CPU_CTRL_EOImodeNS;
/*
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] irqchip/gic: Only populate set_affinity for the root controller
2016-02-09 15:24 [PATCH 1/2] irqchip/gic: Only populate set_affinity for the root controller Jon Hunter
2016-02-09 15:24 ` [PATCH 2/2] irqchip/gic: Only set the EOImodeNS bit " Jon Hunter
@ 2016-02-11 9:07 ` Marc Zyngier
1 sibling, 0 replies; 4+ messages in thread
From: Marc Zyngier @ 2016-02-11 9:07 UTC (permalink / raw)
To: Jon Hunter, Thomas Gleixner, Jason Cooper; +Cc: linux-kernel
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...
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] irqchip/gic: Only set the EOImodeNS bit for the root controller
2016-02-09 15:24 ` [PATCH 2/2] irqchip/gic: Only set the EOImodeNS bit " Jon Hunter
@ 2016-02-11 9:09 ` Marc Zyngier
0 siblings, 0 replies; 4+ messages in thread
From: Marc Zyngier @ 2016-02-11 9:09 UTC (permalink / raw)
To: Jon Hunter, Thomas Gleixner, Jason Cooper; +Cc: linux-kernel
On 09/02/16 15:24, Jon Hunter wrote:
> EOImode1 is only used for the root controller and hence only the root
> controller uses the eoimode1 functions for handling interrupts. However,
> if the root controller supports EOImode1, then the EOImodeNS bit will be
> set for all GICs, enabling EOImode1. This is not what we want and this
> causes interrupts on non-root GICs to only be dropped in priority but
> never deactivated. Therefore, only set the EOImodeNS bit 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...
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-02-11 9:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-09 15:24 [PATCH 1/2] irqchip/gic: Only populate set_affinity for the root controller Jon Hunter
2016-02-09 15:24 ` [PATCH 2/2] irqchip/gic: Only set the EOImodeNS bit " Jon Hunter
2016-02-11 9:09 ` Marc Zyngier
2016-02-11 9:07 ` [PATCH 1/2] irqchip/gic: Only populate set_affinity " Marc Zyngier
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).