[irqchip:,irq/irqchip-next] irqchip/bcm2836: Fix IPI acknowledgement after conversion to handle_percpu_devid_irq
diff mbox series

Message ID 160831684292.22759.15563002516530918910.tip-bot2@tip-bot2
State Accepted
Commit d7f39c40ebb6986e7371510d1c20a4efee4a7f0d
Headers show
Series
  • [irqchip:,irq/irqchip-next] irqchip/bcm2836: Fix IPI acknowledgement after conversion to handle_percpu_devid_irq
Related show

Commit Message

tip-bot2 for Pawan Gupta Dec. 18, 2020, 6:40 p.m. UTC
The following commit has been merged into the irq/irqchip-next branch of irqchip:

Commit-ID:     d7f39c40ebb6986e7371510d1c20a4efee4a7f0d
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/d7f39c40ebb6986e7371510d1c20a4efee4a7f0d
Author:        Marc Zyngier <maz@kernel.org>
AuthorDate:    Fri, 18 Dec 2020 18:03:46 
Committer:     Marc Zyngier <maz@kernel.org>
CommitterDate: Fri, 18 Dec 2020 18:34:17 

irqchip/bcm2836: Fix IPI acknowledgement after conversion to handle_percpu_devid_irq

It appears that despite its name, the bcm2836_arm_irqchip_ipi_eoi()
callback is an acknowledgement, and not an EOI. This means that
we lose IPIs that are made pending between the handling of the
IPI and the write to LOCAL_MAILBOX0_CLR0. With the right timing,
things fail nicely.

This used to work with handle_percpu_devid_fasteoi_ipi(), which
started by eoi-ing the interrupt. With the standard fasteoi flow,
this doesn't work anymore.

So let's use this callback for what it is, an ack. Your favourite
RPi-2/3 is back up and running.

Fixes: ffdad793d579 ("irqchip/bcm2836: Make IPIs use handle_percpu_devid_irq()")
Cc: Valentin Schneider <valentin.schneider@arm.com>
Reported-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/c9fb4ab3-a5cb-648c-6de3-c6a871e60870@roeck-us.net
---
 drivers/irqchip/irq-bcm2836.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Valentin Schneider Dec. 18, 2020, 8:36 p.m. UTC | #1
On 18/12/20 18:40, irqchip-bot for Marc Zyngier wrote:
> The following commit has been merged into the irq/irqchip-next branch of irqchip:
>
> Commit-ID:     d7f39c40ebb6986e7371510d1c20a4efee4a7f0d
> Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/d7f39c40ebb6986e7371510d1c20a4efee4a7f0d
> Author:        Marc Zyngier <maz@kernel.org>
> AuthorDate:    Fri, 18 Dec 2020 18:03:46
> Committer:     Marc Zyngier <maz@kernel.org>
> CommitterDate: Fri, 18 Dec 2020 18:34:17
>
> irqchip/bcm2836: Fix IPI acknowledgement after conversion to handle_percpu_devid_irq
>
> It appears that despite its name, the bcm2836_arm_irqchip_ipi_eoi()
> callback is an acknowledgement, and not an EOI. This means that
> we lose IPIs that are made pending between the handling of the
> IPI and the write to LOCAL_MAILBOX0_CLR0. With the right timing,
> things fail nicely.
>
> This used to work with handle_percpu_devid_fasteoi_ipi(), which
> started by eoi-ing the interrupt. With the standard fasteoi flow,
> this doesn't work anymore.
>
> So let's use this callback for what it is, an ack. Your favourite
> RPi-2/3 is back up and running.
>

Thanks for cleaning up my mess!

> Fixes: ffdad793d579 ("irqchip/bcm2836: Make IPIs use handle_percpu_devid_irq()")
> Cc: Valentin Schneider <valentin.schneider@arm.com>
> Reported-by: Guenter Roeck <linux@roeck-us.net>
> Tested-by: Guenter Roeck <linux@roeck-us.net>
> Signed-off-by: Marc Zyngier <maz@kernel.org>
> Link: https://lore.kernel.org/r/c9fb4ab3-a5cb-648c-6de3-c6a871e60870@roeck-us.net
Marc Zyngier Dec. 18, 2020, 8:53 p.m. UTC | #2
On 2020-12-18 20:36, Valentin Schneider wrote:
> On 18/12/20 18:40, irqchip-bot for Marc Zyngier wrote:
>> The following commit has been merged into the irq/irqchip-next branch 
>> of irqchip:
>> 
>> Commit-ID:     d7f39c40ebb6986e7371510d1c20a4efee4a7f0d
>> Gitweb:        
>> https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/d7f39c40ebb6986e7371510d1c20a4efee4a7f0d
>> Author:        Marc Zyngier <maz@kernel.org>
>> AuthorDate:    Fri, 18 Dec 2020 18:03:46
>> Committer:     Marc Zyngier <maz@kernel.org>
>> CommitterDate: Fri, 18 Dec 2020 18:34:17
>> 
>> irqchip/bcm2836: Fix IPI acknowledgement after conversion to 
>> handle_percpu_devid_irq
>> 
>> It appears that despite its name, the bcm2836_arm_irqchip_ipi_eoi()
>> callback is an acknowledgement, and not an EOI. This means that
>> we lose IPIs that are made pending between the handling of the
>> IPI and the write to LOCAL_MAILBOX0_CLR0. With the right timing,
>> things fail nicely.
>> 
>> This used to work with handle_percpu_devid_fasteoi_ipi(), which
>> started by eoi-ing the interrupt. With the standard fasteoi flow,
>> this doesn't work anymore.
>> 
>> So let's use this callback for what it is, an ack. Your favourite
>> RPi-2/3 is back up and running.
>> 
> 
> Thanks for cleaning up my mess!

Shared responsibilities... ;-)

         M.

Patch
diff mbox series

diff --git a/drivers/irqchip/irq-bcm2836.c b/drivers/irqchip/irq-bcm2836.c
index 5f5eb88..25c9a9c 100644
--- a/drivers/irqchip/irq-bcm2836.c
+++ b/drivers/irqchip/irq-bcm2836.c
@@ -167,7 +167,7 @@  static void bcm2836_arm_irqchip_handle_ipi(struct irq_desc *desc)
 	chained_irq_exit(chip, desc);
 }
 
-static void bcm2836_arm_irqchip_ipi_eoi(struct irq_data *d)
+static void bcm2836_arm_irqchip_ipi_ack(struct irq_data *d)
 {
 	int cpu = smp_processor_id();
 
@@ -195,7 +195,7 @@  static struct irq_chip bcm2836_arm_irqchip_ipi = {
 	.name		= "IPI",
 	.irq_mask	= bcm2836_arm_irqchip_dummy_op,
 	.irq_unmask	= bcm2836_arm_irqchip_dummy_op,
-	.irq_eoi	= bcm2836_arm_irqchip_ipi_eoi,
+	.irq_ack	= bcm2836_arm_irqchip_ipi_ack,
 	.ipi_send_mask	= bcm2836_arm_irqchip_ipi_send_mask,
 };