All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] irqchip/irq-bcm2712-mip: Drop MSI_CHIP_FLAG_SET_ACK
@ 2026-11-21 16:38 Joshua Covington
  2026-11-25 11:43 ` Andrea della Porta
  2026-12-01 20:15 ` [tip: irq/drivers] irqchip/bcm2712-mip: " tip-bot2 for Joshua Covington
  0 siblings, 2 replies; 3+ messages in thread
From: Joshua Covington @ 2026-11-21 16:38 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Florian Fainelli, Radu Rendec,
	Broadcom internal kernel review list, Stanimir Varbanov,
	Andrea della Porta, Pengpeng Hou, linux-arm-kernel,
	linux-rpi-kernel, linux-kernel, Joshua Covington

Commit f35508b93a2f ("irqchip/irq-bcm2712-mip: Set EOI/ACK flags in
msi_parent_ops") made the PCI MSI device chips ack through
irq_chip_ack_parent(). Neither the MIP middle chip nor the GIC below it
implements irq_ack, so any ack is a NULL pointer call.

The MIP vectors are handled by handle_fasteoi_irq(), which never acks,
so this only shows when mask_ack_irq() runs, e.g. when a chained
handler is removed. The RP1 driver does that on every teardown since
commit 82aa033fef52 ("misc: rp1: clear chained IRQ handlers on
teardown"), and the kernel panics:

  pc : 0x0
  lr : irq_chip_ack_parent+0x1c/0x28
  Call trace:
   __irq_do_set_handler+0x248/0x24c
   irq_set_chained_handler_and_data+0x6c/0x94
   rp1_unregister_interrupts+0x3c/0xa8

The MIP hierarchy has no use for an ack, like the drivers fixed by
commit fb0ea6e4878a ("irqchip: Drop MSI_CHIP_FLAG_SET_ACK from
unsuspecting MSI drivers").

Fixes: f35508b93a2f ("irqchip/irq-bcm2712-mip: Set EOI/ACK flags in msi_parent_ops")
Signed-off-by: Joshua Covington <joshuacov@gmail.com>
---
The panic was reported on BCM2712 with 6.18.61 and later when the
rp1_pci probe fails (https://github.com/openwrt/openwrt/pull/26530#issuecomment-6975561491).
Tested on a Raspberry Pi CM5 with 6.18.64 and the Raspberry Pi
downstream patches: with this patch, unbinding and binding rp1_pci
again completes without a panic. Applies unchanged to v7.4-rc3 and
builds there without warnings (W=1, GCC 13 and clang 18).

 drivers/irqchip/irq-bcm2712-mip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-bcm2712-mip.c b/drivers/irqchip/irq-bcm2712-mip.c
index 06a6ab627..12d9e3846 100644
--- a/drivers/irqchip/irq-bcm2712-mip.c
+++ b/drivers/irqchip/irq-bcm2712-mip.c
@@ -163,7 +163,7 @@ static const struct irq_domain_ops mip_middle_domain_ops = {
 static const struct msi_parent_ops mip_msi_parent_ops = {
 	.supported_flags	= MIP_MSI_FLAGS_SUPPORTED,
 	.required_flags		= MIP_MSI_FLAGS_REQUIRED,
-	.chip_flags		= MSI_CHIP_FLAG_SET_EOI | MSI_CHIP_FLAG_SET_ACK,
+	.chip_flags		= MSI_CHIP_FLAG_SET_EOI,
 	.bus_select_token       = DOMAIN_BUS_GENERIC_MSI,
 	.bus_select_mask	= MATCH_PCI_MSI,
 	.prefix			= "MIP-MSI-",
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] irqchip/irq-bcm2712-mip: Drop MSI_CHIP_FLAG_SET_ACK
  2026-11-21 16:38 [PATCH] irqchip/irq-bcm2712-mip: Drop MSI_CHIP_FLAG_SET_ACK Joshua Covington
@ 2026-11-25 11:43 ` Andrea della Porta
  2026-12-01 20:15 ` [tip: irq/drivers] irqchip/bcm2712-mip: " tip-bot2 for Joshua Covington
  1 sibling, 0 replies; 3+ messages in thread
From: Andrea della Porta @ 2026-11-25 11:43 UTC (permalink / raw)
  To: Joshua Covington
  Cc: Thomas Gleixner, Florian Fainelli, Radu Rendec,
	Broadcom internal kernel review list, Stanimir Varbanov,
	Andrea della Porta, Pengpeng Hou, linux-arm-kernel,
	linux-rpi-kernel, linux-kernel

Hi Joshua,

On 16:38 Sat 21 Nov     , Joshua Covington wrote:
> Commit f35508b93a2f ("irqchip/irq-bcm2712-mip: Set EOI/ACK flags in
> msi_parent_ops") made the PCI MSI device chips ack through
> irq_chip_ack_parent(). Neither the MIP middle chip nor the GIC below it
> implements irq_ack, so any ack is a NULL pointer call.
> 
> The MIP vectors are handled by handle_fasteoi_irq(), which never acks,
> so this only shows when mask_ack_irq() runs, e.g. when a chained
> handler is removed. The RP1 driver does that on every teardown since
> commit 82aa033fef52 ("misc: rp1: clear chained IRQ handlers on
> teardown"), and the kernel panics:
> 
>   pc : 0x0
>   lr : irq_chip_ack_parent+0x1c/0x28
>   Call trace:
>    __irq_do_set_handler+0x248/0x24c
>    irq_set_chained_handler_and_data+0x6c/0x94
>    rp1_unregister_interrupts+0x3c/0xa8
> 
> The MIP hierarchy has no use for an ack, like the drivers fixed by
> commit fb0ea6e4878a ("irqchip: Drop MSI_CHIP_FLAG_SET_ACK from
> unsuspecting MSI drivers").
> 
> Fixes: f35508b93a2f ("irqchip/irq-bcm2712-mip: Set EOI/ACK flags in msi_parent_ops")
> Signed-off-by: Joshua Covington <joshuacov@gmail.com>
> ---
> The panic was reported on BCM2712 with 6.18.61 and later when the
> rp1_pci probe fails (https://github.com/openwrt/openwrt/pull/26530#issuecomment-6975561491).
> Tested on a Raspberry Pi CM5 with 6.18.64 and the Raspberry Pi
> downstream patches: with this patch, unbinding and binding rp1_pci
> again completes without a panic. Applies unchanged to v7.4-rc3 and
> builds there without warnings (W=1, GCC 13 and clang 18).
> 
>  drivers/irqchip/irq-bcm2712-mip.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/irqchip/irq-bcm2712-mip.c b/drivers/irqchip/irq-bcm2712-mip.c
> index 06a6ab627..12d9e3846 100644
> --- a/drivers/irqchip/irq-bcm2712-mip.c
> +++ b/drivers/irqchip/irq-bcm2712-mip.c
> @@ -163,7 +163,7 @@ static const struct irq_domain_ops mip_middle_domain_ops = {
>  static const struct msi_parent_ops mip_msi_parent_ops = {
>  	.supported_flags	= MIP_MSI_FLAGS_SUPPORTED,
>  	.required_flags		= MIP_MSI_FLAGS_REQUIRED,
> -	.chip_flags		= MSI_CHIP_FLAG_SET_EOI | MSI_CHIP_FLAG_SET_ACK,
> +	.chip_flags		= MSI_CHIP_FLAG_SET_EOI,
>  	.bus_select_token       = DOMAIN_BUS_GENERIC_MSI,
>  	.bus_select_mask	= MATCH_PCI_MSI,
>  	.prefix			= "MIP-MSI-",

Reviewed-by: Andrea della Porta <andrea.porta@suse.com>

> -- 
> 2.43.0
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip: irq/drivers] irqchip/bcm2712-mip: Drop MSI_CHIP_FLAG_SET_ACK
  2026-11-21 16:38 [PATCH] irqchip/irq-bcm2712-mip: Drop MSI_CHIP_FLAG_SET_ACK Joshua Covington
  2026-11-25 11:43 ` Andrea della Porta
@ 2026-12-01 20:15 ` tip-bot2 for Joshua Covington
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot2 for Joshua Covington @ 2026-12-01 20:15 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Joshua Covington, Thomas Gleixner, Andrea della Porta, stable,
	x86, linux-kernel

The following commit has been merged into the irq/drivers branch of tip:

Commit-ID:     d62655b0b33259243a187eebdda14a5f01cad4c6
Gitweb:        https://git.kernel.org/tip/d62655b0b33259243a187eebdda14a5f01cad4c6
Author:        Joshua Covington <joshuacov@gmail.com>
AuthorDate:    Sat, 21 Nov 2026 16:38:09 
Committer:     Thomas Gleixner <tglx@kernel.org>
CommitterDate: Tue, 01 Dec 2026 21:12:22 +01:00

irqchip/bcm2712-mip: Drop MSI_CHIP_FLAG_SET_ACK

Commit f35508b93a2f ("irqchip/irq-bcm2712-mip: Set EOI/ACK flags in
msi_parent_ops") made the PCI MSI device chips ack through
irq_chip_ack_parent(). Neither the MIP middle chip nor the GIC below it
implements irq_ack, so any ack is a NULL pointer call.

The MIP vectors are handled by handle_fasteoi_irq(), which never acks,
so this only shows when mask_ack_irq() runs, e.g. when a chained
handler is removed. The RP1 driver does that on every teardown since
commit 82aa033fef52 ("misc: rp1: clear chained IRQ handlers on
teardown"), and the kernel panics:

  pc : 0x0
  lr : irq_chip_ack_parent+0x1c/0x28
  Call trace:
   __irq_do_set_handler+0x248/0x24c
   irq_set_chained_handler_and_data+0x6c/0x94
   rp1_unregister_interrupts+0x3c/0xa8

The MIP hierarchy has no use for an ack, like the drivers fixed by
commit fb0ea6e4878a ("irqchip: Drop MSI_CHIP_FLAG_SET_ACK from
unsuspecting MSI drivers").

Fixes: f35508b93a2f ("irqchip/irq-bcm2712-mip: Set EOI/ACK flags in msi_parent_ops")
Signed-off-by: Joshua Covington <joshuacov@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Reviewed-by: Andrea della Porta <andrea.porta@suse.com>
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20261121163809.86620-1-joshuacov@gmail.com
---
 drivers/irqchip/irq-bcm2712-mip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-bcm2712-mip.c b/drivers/irqchip/irq-bcm2712-mip.c
index a0f45df..5a13bb4 100644
--- a/drivers/irqchip/irq-bcm2712-mip.c
+++ b/drivers/irqchip/irq-bcm2712-mip.c
@@ -172,7 +172,7 @@ static const struct irq_domain_ops mip_middle_domain_ops = {
 static const struct msi_parent_ops mip_msi_parent_ops = {
 	.supported_flags	= MIP_MSI_FLAGS_SUPPORTED,
 	.required_flags		= MIP_MSI_FLAGS_REQUIRED,
-	.chip_flags		= MSI_CHIP_FLAG_SET_EOI | MSI_CHIP_FLAG_SET_ACK,
+	.chip_flags		= MSI_CHIP_FLAG_SET_EOI,
 	.bus_select_token       = DOMAIN_BUS_GENERIC_MSI,
 	.bus_select_mask	= MATCH_PCI_MSI,
 	.prefix			= "MIP-MSI-",

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-12-01 20:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-21 16:38 [PATCH] irqchip/irq-bcm2712-mip: Drop MSI_CHIP_FLAG_SET_ACK Joshua Covington
2026-11-25 11:43 ` Andrea della Porta
2026-12-01 20:15 ` [tip: irq/drivers] irqchip/bcm2712-mip: " tip-bot2 for Joshua Covington

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.