* [PATCH 0/3] irqchip/gic-v5: Minor clean-ups/fixes
@ 2025-08-01 7:58 Lorenzo Pieralisi
2025-08-01 7:58 ` [PATCH 1/3] irqchip/gic-v5: iwb: Fix iounmap probe failure path Lorenzo Pieralisi
` (3 more replies)
0 siblings, 4 replies; 12+ messages in thread
From: Lorenzo Pieralisi @ 2025-08-01 7:58 UTC (permalink / raw)
To: Marc Zyngier, Thomas Gleixner, Sascha Bischoff, Timothy Hayes
Cc: linux-arm-kernel, linux-kernel, Lorenzo Pieralisi,
kernel test robot
A trivial fix for a kbot reported issue and two clean-ups
discovered after the initial series was queued for v6.17;
now that the driver code is merged I am sharing them.
Only patch (1) is a fix, the two others are cleaning the code up
and removing useless constructs.
The series apply cleanly on top of this three-patch series [1] fixing
some exit path issues with the gic-v5 driver that should also
be considered for merging please (I reviewed it and tested it [2]):
[1] https://lore.kernel.org/lkml/670bb1dc-7827-4916-84f3-bb46ee408b20@sabinyo.mountain/
[2] https://lore.kernel.org/lkml/aHoU8sKPuyzEFRIn@lpieralisi/
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
---
Lorenzo Pieralisi (3):
irqchip/gic-v5: iwb: Fix iounmap probe failure path
irqchip/gic-v5: iwb: Remove module boilerplate
irqchip/gic-v5: Remove IRQD_RESEND_WHEN_IN_PROGRESS for ITS IRQs
drivers/irqchip/irq-gic-v5-its.c | 1 -
drivers/irqchip/irq-gic-v5-iwb.c | 14 +++-----------
2 files changed, 3 insertions(+), 12 deletions(-)
---
base-commit: 260f6f4fda93c8485c8037865c941b42b9cba5d2
change-id: 20250731-gic-v5-fixes-6-17-949eae3c5594
Best regards,
--
Lorenzo Pieralisi <lpieralisi@kernel.org>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 1/3] irqchip/gic-v5: iwb: Fix iounmap probe failure path
2025-08-01 7:58 [PATCH 0/3] irqchip/gic-v5: Minor clean-ups/fixes Lorenzo Pieralisi
@ 2025-08-01 7:58 ` Lorenzo Pieralisi
2025-08-01 12:26 ` Marc Zyngier
2025-08-05 8:48 ` [tip: irq/urgent] " tip-bot2 for Lorenzo Pieralisi
2025-08-01 7:58 ` [PATCH 2/3] irqchip/gic-v5: iwb: Remove module boilerplate Lorenzo Pieralisi
` (2 subsequent siblings)
3 siblings, 2 replies; 12+ messages in thread
From: Lorenzo Pieralisi @ 2025-08-01 7:58 UTC (permalink / raw)
To: Marc Zyngier, Thomas Gleixner, Sascha Bischoff, Timothy Hayes
Cc: linux-arm-kernel, linux-kernel, Lorenzo Pieralisi,
kernel test robot
Kbot reported that on the failure path the driver
iounmap() IWB resources that are managed through
devm_ioremap(), which is clearly wrong because
the driver would end up unmapping the MMIO
resource twice on probing failure.
Fix this by removing the error path altogether
and by letting devres manage the iounmapping
on clean-up.
Fixes: 695949d8b16f ("irqchip/gic-v5: Add GICv5 IWB support")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202508010038.N3r4ZmII-lkp@intel.com
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Marc Zyngier <maz@kernel.org>
---
drivers/irqchip/irq-gic-v5-iwb.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/drivers/irqchip/irq-gic-v5-iwb.c b/drivers/irqchip/irq-gic-v5-iwb.c
index ed72fbdd4900..ad9fdc14d1c6 100644
--- a/drivers/irqchip/irq-gic-v5-iwb.c
+++ b/drivers/irqchip/irq-gic-v5-iwb.c
@@ -241,7 +241,6 @@ static int gicv5_iwb_device_probe(struct platform_device *pdev)
struct gicv5_iwb_chip_data *iwb_node;
void __iomem *iwb_base;
struct resource *res;
- int ret;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res)
@@ -254,16 +253,10 @@ static int gicv5_iwb_device_probe(struct platform_device *pdev)
}
iwb_node = gicv5_iwb_init_bases(iwb_base, pdev);
- if (IS_ERR(iwb_node)) {
- ret = PTR_ERR(iwb_node);
- goto out_unmap;
- }
+ if (IS_ERR(iwb_node))
+ return PTR_ERR(iwb_node);
return 0;
-
-out_unmap:
- iounmap(iwb_base);
- return ret;
}
static const struct of_device_id gicv5_iwb_of_match[] = {
--
2.48.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/3] irqchip/gic-v5: iwb: Remove module boilerplate
2025-08-01 7:58 [PATCH 0/3] irqchip/gic-v5: Minor clean-ups/fixes Lorenzo Pieralisi
2025-08-01 7:58 ` [PATCH 1/3] irqchip/gic-v5: iwb: Fix iounmap probe failure path Lorenzo Pieralisi
@ 2025-08-01 7:58 ` Lorenzo Pieralisi
2025-08-01 12:24 ` Marc Zyngier
2025-08-01 7:58 ` [PATCH 3/3] irqchip/gic-v5: Remove IRQD_RESEND_WHEN_IN_PROGRESS for ITS IRQs Lorenzo Pieralisi
2025-08-05 9:30 ` [PATCH 0/3] irqchip/gic-v5: Minor clean-ups/fixes Lorenzo Pieralisi
3 siblings, 1 reply; 12+ messages in thread
From: Lorenzo Pieralisi @ 2025-08-01 7:58 UTC (permalink / raw)
To: Marc Zyngier, Thomas Gleixner, Sascha Bischoff, Timothy Hayes
Cc: linux-arm-kernel, linux-kernel, Lorenzo Pieralisi
The IWB driver cannot be compiled as a module and is as matter of fact a
builtin driver at present.
Make it explicitly so by removing useless boilerplate and by using the
builtin_platform_driver() helper to initialize its registration
functions.
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Marc Zyngier <maz@kernel.org>
---
drivers/irqchip/irq-gic-v5-iwb.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/irqchip/irq-gic-v5-iwb.c b/drivers/irqchip/irq-gic-v5-iwb.c
index ad9fdc14d1c6..c3a3b30e9f4e 100644
--- a/drivers/irqchip/irq-gic-v5-iwb.c
+++ b/drivers/irqchip/irq-gic-v5-iwb.c
@@ -263,7 +263,6 @@ static const struct of_device_id gicv5_iwb_of_match[] = {
{ .compatible = "arm,gic-v5-iwb" },
{ /* END */ }
};
-MODULE_DEVICE_TABLE(of, gicv5_iwb_of_match);
static struct platform_driver gicv5_iwb_platform_driver = {
.driver = {
@@ -274,4 +273,4 @@ static struct platform_driver gicv5_iwb_platform_driver = {
.probe = gicv5_iwb_device_probe,
};
-module_platform_driver(gicv5_iwb_platform_driver);
+builtin_platform_driver(gicv5_iwb_platform_driver);
--
2.48.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 3/3] irqchip/gic-v5: Remove IRQD_RESEND_WHEN_IN_PROGRESS for ITS IRQs
2025-08-01 7:58 [PATCH 0/3] irqchip/gic-v5: Minor clean-ups/fixes Lorenzo Pieralisi
2025-08-01 7:58 ` [PATCH 1/3] irqchip/gic-v5: iwb: Fix iounmap probe failure path Lorenzo Pieralisi
2025-08-01 7:58 ` [PATCH 2/3] irqchip/gic-v5: iwb: Remove module boilerplate Lorenzo Pieralisi
@ 2025-08-01 7:58 ` Lorenzo Pieralisi
2025-08-01 12:30 ` Marc Zyngier
2025-08-05 8:48 ` [tip: irq/urgent] " tip-bot2 for Lorenzo Pieralisi
2025-08-05 9:30 ` [PATCH 0/3] irqchip/gic-v5: Minor clean-ups/fixes Lorenzo Pieralisi
3 siblings, 2 replies; 12+ messages in thread
From: Lorenzo Pieralisi @ 2025-08-01 7:58 UTC (permalink / raw)
To: Marc Zyngier, Thomas Gleixner, Sascha Bischoff, Timothy Hayes
Cc: linux-arm-kernel, linux-kernel, Lorenzo Pieralisi
GICv5 LPI interrupts have an active state hence they cannot retrigger
while the IRQ is being handled.
Therefore setting IRQD_RESEND_WHEN_IN_PROGRESS for GICv5 ITS
interrupts provides no benefit and it is useless (and confusing),
it solves an issue that cannot happen.
Remove it.
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Marc Zyngier <maz@kernel.org>
---
drivers/irqchip/irq-gic-v5-its.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/irqchip/irq-gic-v5-its.c b/drivers/irqchip/irq-gic-v5-its.c
index 340640fdbdf6..9290ac741949 100644
--- a/drivers/irqchip/irq-gic-v5-its.c
+++ b/drivers/irqchip/irq-gic-v5-its.c
@@ -973,7 +973,6 @@ static int gicv5_its_irq_domain_alloc(struct irq_domain *domain, unsigned int vi
irqd = irq_get_irq_data(virq + i);
irqd_set_single_target(irqd);
irqd_set_affinity_on_activate(irqd);
- irqd_set_resend_when_in_progress(irqd);
}
return 0;
--
2.48.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 2/3] irqchip/gic-v5: iwb: Remove module boilerplate
2025-08-01 7:58 ` [PATCH 2/3] irqchip/gic-v5: iwb: Remove module boilerplate Lorenzo Pieralisi
@ 2025-08-01 12:24 ` Marc Zyngier
2025-08-01 14:04 ` Lorenzo Pieralisi
0 siblings, 1 reply; 12+ messages in thread
From: Marc Zyngier @ 2025-08-01 12:24 UTC (permalink / raw)
To: Lorenzo Pieralisi
Cc: Thomas Gleixner, Sascha Bischoff, Timothy Hayes, linux-arm-kernel,
linux-kernel
On Fri, 01 Aug 2025 08:58:19 +0100,
Lorenzo Pieralisi <lpieralisi@kernel.org> wrote:
>
> The IWB driver cannot be compiled as a module and is as matter of fact a
> builtin driver at present.
What is blocking that?
>
> Make it explicitly so by removing useless boilerplate and by using the
> builtin_platform_driver() helper to initialize its registration
> functions.
>
> Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Marc Zyngier <maz@kernel.org>
> ---
> drivers/irqchip/irq-gic-v5-iwb.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/irqchip/irq-gic-v5-iwb.c b/drivers/irqchip/irq-gic-v5-iwb.c
> index ad9fdc14d1c6..c3a3b30e9f4e 100644
> --- a/drivers/irqchip/irq-gic-v5-iwb.c
> +++ b/drivers/irqchip/irq-gic-v5-iwb.c
> @@ -263,7 +263,6 @@ static const struct of_device_id gicv5_iwb_of_match[] = {
> { .compatible = "arm,gic-v5-iwb" },
> { /* END */ }
> };
> -MODULE_DEVICE_TABLE(of, gicv5_iwb_of_match);
>
> static struct platform_driver gicv5_iwb_platform_driver = {
> .driver = {
> @@ -274,4 +273,4 @@ static struct platform_driver gicv5_iwb_platform_driver = {
> .probe = gicv5_iwb_device_probe,
> };
>
> -module_platform_driver(gicv5_iwb_platform_driver);
> +builtin_platform_driver(gicv5_iwb_platform_driver);
>
I'd rather we make the driver buildable as a module if at all
possible, instead of forcing it as built-in for everyone. It would
definitely help pipe-cleaning the potential missing dependencies.
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/3] irqchip/gic-v5: iwb: Fix iounmap probe failure path
2025-08-01 7:58 ` [PATCH 1/3] irqchip/gic-v5: iwb: Fix iounmap probe failure path Lorenzo Pieralisi
@ 2025-08-01 12:26 ` Marc Zyngier
2025-08-05 8:48 ` [tip: irq/urgent] " tip-bot2 for Lorenzo Pieralisi
1 sibling, 0 replies; 12+ messages in thread
From: Marc Zyngier @ 2025-08-01 12:26 UTC (permalink / raw)
To: Lorenzo Pieralisi
Cc: Thomas Gleixner, Sascha Bischoff, Timothy Hayes, linux-arm-kernel,
linux-kernel, kernel test robot
On Fri, 01 Aug 2025 08:58:18 +0100,
Lorenzo Pieralisi <lpieralisi@kernel.org> wrote:
>
> Kbot reported that on the failure path the driver
> iounmap() IWB resources that are managed through
> devm_ioremap(), which is clearly wrong because
> the driver would end up unmapping the MMIO
> resource twice on probing failure.
>
> Fix this by removing the error path altogether
> and by letting devres manage the iounmapping
> on clean-up.
>
> Fixes: 695949d8b16f ("irqchip/gic-v5: Add GICv5 IWB support")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202508010038.N3r4ZmII-lkp@intel.com
> Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Marc Zyngier <maz@kernel.org>
Reviewed-by: Marc Zyngier <maz@kernel.org>
M.
--
Without deviation from the norm, progress is not possible.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 3/3] irqchip/gic-v5: Remove IRQD_RESEND_WHEN_IN_PROGRESS for ITS IRQs
2025-08-01 7:58 ` [PATCH 3/3] irqchip/gic-v5: Remove IRQD_RESEND_WHEN_IN_PROGRESS for ITS IRQs Lorenzo Pieralisi
@ 2025-08-01 12:30 ` Marc Zyngier
2025-08-01 14:01 ` Lorenzo Pieralisi
2025-08-05 8:48 ` [tip: irq/urgent] " tip-bot2 for Lorenzo Pieralisi
1 sibling, 1 reply; 12+ messages in thread
From: Marc Zyngier @ 2025-08-01 12:30 UTC (permalink / raw)
To: Lorenzo Pieralisi
Cc: Thomas Gleixner, Sascha Bischoff, Timothy Hayes, linux-arm-kernel,
linux-kernel
On Fri, 01 Aug 2025 08:58:20 +0100,
Lorenzo Pieralisi <lpieralisi@kernel.org> wrote:
>
> GICv5 LPI interrupts have an active state hence they cannot retrigger
> while the IRQ is being handled.
>
> Therefore setting IRQD_RESEND_WHEN_IN_PROGRESS for GICv5 ITS
> interrupts provides no benefit and it is useless (and confusing),
> it solves an issue that cannot happen.
This doesn't read very well. How about:
"Therefore, setting the IRQD_RESEND_WHEN_IN_PROGRESS flag on LPIs
is pointless, as the situation this flag caters for cannot happen".
>
> Remove it.
>
> Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Marc Zyngier <maz@kernel.org>
> ---
> drivers/irqchip/irq-gic-v5-its.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/irqchip/irq-gic-v5-its.c b/drivers/irqchip/irq-gic-v5-its.c
> index 340640fdbdf6..9290ac741949 100644
> --- a/drivers/irqchip/irq-gic-v5-its.c
> +++ b/drivers/irqchip/irq-gic-v5-its.c
> @@ -973,7 +973,6 @@ static int gicv5_its_irq_domain_alloc(struct irq_domain *domain, unsigned int vi
> irqd = irq_get_irq_data(virq + i);
> irqd_set_single_target(irqd);
> irqd_set_affinity_on_activate(irqd);
> - irqd_set_resend_when_in_progress(irqd);
> }
>
> return 0;
>
With that,
Reviewed-by: Marc Zyngier <maz@kernel.org>
M.
--
Without deviation from the norm, progress is not possible.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 3/3] irqchip/gic-v5: Remove IRQD_RESEND_WHEN_IN_PROGRESS for ITS IRQs
2025-08-01 12:30 ` Marc Zyngier
@ 2025-08-01 14:01 ` Lorenzo Pieralisi
0 siblings, 0 replies; 12+ messages in thread
From: Lorenzo Pieralisi @ 2025-08-01 14:01 UTC (permalink / raw)
To: Marc Zyngier
Cc: Thomas Gleixner, Sascha Bischoff, Timothy Hayes, linux-arm-kernel,
linux-kernel
On Fri, Aug 01, 2025 at 01:30:32PM +0100, Marc Zyngier wrote:
> On Fri, 01 Aug 2025 08:58:20 +0100,
> Lorenzo Pieralisi <lpieralisi@kernel.org> wrote:
> >
> > GICv5 LPI interrupts have an active state hence they cannot retrigger
> > while the IRQ is being handled.
> >
> > Therefore setting IRQD_RESEND_WHEN_IN_PROGRESS for GICv5 ITS
> > interrupts provides no benefit and it is useless (and confusing),
> > it solves an issue that cannot happen.
>
> This doesn't read very well. How about:
>
> "Therefore, setting the IRQD_RESEND_WHEN_IN_PROGRESS flag on LPIs
> is pointless, as the situation this flag caters for cannot happen".
Yes it is clearer, I can respin a v2 unless Thomas can update the log
please while applying it ? Just let me know.
Thanks,
Lorenzo
> > Remove it.
> >
> > Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
> > Cc: Thomas Gleixner <tglx@linutronix.de>
> > Cc: Marc Zyngier <maz@kernel.org>
> > ---
> > drivers/irqchip/irq-gic-v5-its.c | 1 -
> > 1 file changed, 1 deletion(-)
> >
> > diff --git a/drivers/irqchip/irq-gic-v5-its.c b/drivers/irqchip/irq-gic-v5-its.c
> > index 340640fdbdf6..9290ac741949 100644
> > --- a/drivers/irqchip/irq-gic-v5-its.c
> > +++ b/drivers/irqchip/irq-gic-v5-its.c
> > @@ -973,7 +973,6 @@ static int gicv5_its_irq_domain_alloc(struct irq_domain *domain, unsigned int vi
> > irqd = irq_get_irq_data(virq + i);
> > irqd_set_single_target(irqd);
> > irqd_set_affinity_on_activate(irqd);
> > - irqd_set_resend_when_in_progress(irqd);
> > }
> >
> > return 0;
> >
>
> With that,
>
> Reviewed-by: Marc Zyngier <maz@kernel.org>
>
> M.
>
> --
> Without deviation from the norm, progress is not possible.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/3] irqchip/gic-v5: iwb: Remove module boilerplate
2025-08-01 12:24 ` Marc Zyngier
@ 2025-08-01 14:04 ` Lorenzo Pieralisi
0 siblings, 0 replies; 12+ messages in thread
From: Lorenzo Pieralisi @ 2025-08-01 14:04 UTC (permalink / raw)
To: Marc Zyngier
Cc: Thomas Gleixner, Sascha Bischoff, Timothy Hayes, linux-arm-kernel,
linux-kernel
On Fri, Aug 01, 2025 at 01:24:57PM +0100, Marc Zyngier wrote:
> On Fri, 01 Aug 2025 08:58:19 +0100,
> Lorenzo Pieralisi <lpieralisi@kernel.org> wrote:
> >
> > The IWB driver cannot be compiled as a module and is as matter of fact a
> > builtin driver at present.
>
> What is blocking that?
Yep, you read my mind I need to test this but AFAICS at the moment
the answer is: nothing.
> > Make it explicitly so by removing useless boilerplate and by using the
> > builtin_platform_driver() helper to initialize its registration
> > functions.
> >
> > Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
> > Cc: Thomas Gleixner <tglx@linutronix.de>
> > Cc: Marc Zyngier <maz@kernel.org>
> > ---
> > drivers/irqchip/irq-gic-v5-iwb.c | 3 +--
> > 1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/drivers/irqchip/irq-gic-v5-iwb.c b/drivers/irqchip/irq-gic-v5-iwb.c
> > index ad9fdc14d1c6..c3a3b30e9f4e 100644
> > --- a/drivers/irqchip/irq-gic-v5-iwb.c
> > +++ b/drivers/irqchip/irq-gic-v5-iwb.c
> > @@ -263,7 +263,6 @@ static const struct of_device_id gicv5_iwb_of_match[] = {
> > { .compatible = "arm,gic-v5-iwb" },
> > { /* END */ }
> > };
> > -MODULE_DEVICE_TABLE(of, gicv5_iwb_of_match);
> >
> > static struct platform_driver gicv5_iwb_platform_driver = {
> > .driver = {
> > @@ -274,4 +273,4 @@ static struct platform_driver gicv5_iwb_platform_driver = {
> > .probe = gicv5_iwb_device_probe,
> > };
> >
> > -module_platform_driver(gicv5_iwb_platform_driver);
> > +builtin_platform_driver(gicv5_iwb_platform_driver);
> >
>
> I'd rather we make the driver buildable as a module if at all
> possible, instead of forcing it as built-in for everyone. It would
> definitely help pipe-cleaning the potential missing dependencies.
Yes - I took a shortcut by removing boilerplate (that the
compiler/linker remove anyway) - it makes sense to rework the
build to make it possible to build as a module instead.
This patch can be dropped then, I will work on the follow-up.
Lorenzo
^ permalink raw reply [flat|nested] 12+ messages in thread
* [tip: irq/urgent] irqchip/gic-v5: Remove IRQD_RESEND_WHEN_IN_PROGRESS for ITS IRQs
2025-08-01 7:58 ` [PATCH 3/3] irqchip/gic-v5: Remove IRQD_RESEND_WHEN_IN_PROGRESS for ITS IRQs Lorenzo Pieralisi
2025-08-01 12:30 ` Marc Zyngier
@ 2025-08-05 8:48 ` tip-bot2 for Lorenzo Pieralisi
1 sibling, 0 replies; 12+ messages in thread
From: tip-bot2 for Lorenzo Pieralisi @ 2025-08-05 8:48 UTC (permalink / raw)
To: linux-tip-commits
Cc: Lorenzo Pieralisi, Thomas Gleixner, Marc Zyngier, x86,
linux-kernel
The following commit has been merged into the irq/urgent branch of tip:
Commit-ID: 9ba0a63badc8e74ac0d490f9113300dda0ce2c19
Gitweb: https://git.kernel.org/tip/9ba0a63badc8e74ac0d490f9113300dda0ce2c19
Author: Lorenzo Pieralisi <lpieralisi@kernel.org>
AuthorDate: Fri, 01 Aug 2025 09:58:20 +02:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Tue, 05 Aug 2025 10:43:48 +02:00
irqchip/gic-v5: Remove IRQD_RESEND_WHEN_IN_PROGRESS for ITS IRQs
GICv5 LPI interrupts have an active state hence they cannot retrigger
while the interrupt is being handled.
Therefore, setting the IRQD_RESEND_WHEN_IN_PROGRESS flag on LPIs is
pointless, as the situation this flag caters for cannot happen.
Remove it.
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/all/20250801-gic-v5-fixes-6-17-v1-3-4fcedaccf9e6@kernel.org
---
drivers/irqchip/irq-gic-v5-its.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/irqchip/irq-gic-v5-its.c b/drivers/irqchip/irq-gic-v5-its.c
index 340640f..9290ac7 100644
--- a/drivers/irqchip/irq-gic-v5-its.c
+++ b/drivers/irqchip/irq-gic-v5-its.c
@@ -973,7 +973,6 @@ static int gicv5_its_irq_domain_alloc(struct irq_domain *domain, unsigned int vi
irqd = irq_get_irq_data(virq + i);
irqd_set_single_target(irqd);
irqd_set_affinity_on_activate(irqd);
- irqd_set_resend_when_in_progress(irqd);
}
return 0;
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [tip: irq/urgent] irqchip/gic-v5: iwb: Fix iounmap probe failure path
2025-08-01 7:58 ` [PATCH 1/3] irqchip/gic-v5: iwb: Fix iounmap probe failure path Lorenzo Pieralisi
2025-08-01 12:26 ` Marc Zyngier
@ 2025-08-05 8:48 ` tip-bot2 for Lorenzo Pieralisi
1 sibling, 0 replies; 12+ messages in thread
From: tip-bot2 for Lorenzo Pieralisi @ 2025-08-05 8:48 UTC (permalink / raw)
To: linux-tip-commits
Cc: kernel test robot, Lorenzo Pieralisi, Thomas Gleixner,
Marc Zyngier, x86, linux-kernel
The following commit has been merged into the irq/urgent branch of tip:
Commit-ID: a8913d54ab1f9ed871b4e45a7c8a4f7a9949d071
Gitweb: https://git.kernel.org/tip/a8913d54ab1f9ed871b4e45a7c8a4f7a9949d071
Author: Lorenzo Pieralisi <lpieralisi@kernel.org>
AuthorDate: Fri, 01 Aug 2025 09:58:18 +02:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Tue, 05 Aug 2025 10:43:48 +02:00
irqchip/gic-v5: iwb: Fix iounmap probe failure path
The 0-day bot reported that on the failure path the driver iounmap()s IWB
resources that are managed through devm_ioremap(), which is clearly wrong
because the driver would end up unmapping the MMIO resource twice on
probing failure.
Fix this by removing the error path altogether and by letting devres manage
the iounmapping on clean-up.
Fixes: 695949d8b16f ("irqchip/gic-v5: Add GICv5 IWB support")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/all/20250801-gic-v5-fixes-6-17-v1-1-4fcedaccf9e6@kernel.org
Closes: https://lore.kernel.org/oe-kbuild-all/202508010038.N3r4ZmII-lkp@intel.com
---
drivers/irqchip/irq-gic-v5-iwb.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
diff --git a/drivers/irqchip/irq-gic-v5-iwb.c b/drivers/irqchip/irq-gic-v5-iwb.c
index ed72fbd..ad9fdc1 100644
--- a/drivers/irqchip/irq-gic-v5-iwb.c
+++ b/drivers/irqchip/irq-gic-v5-iwb.c
@@ -241,7 +241,6 @@ static int gicv5_iwb_device_probe(struct platform_device *pdev)
struct gicv5_iwb_chip_data *iwb_node;
void __iomem *iwb_base;
struct resource *res;
- int ret;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res)
@@ -254,16 +253,10 @@ static int gicv5_iwb_device_probe(struct platform_device *pdev)
}
iwb_node = gicv5_iwb_init_bases(iwb_base, pdev);
- if (IS_ERR(iwb_node)) {
- ret = PTR_ERR(iwb_node);
- goto out_unmap;
- }
+ if (IS_ERR(iwb_node))
+ return PTR_ERR(iwb_node);
return 0;
-
-out_unmap:
- iounmap(iwb_base);
- return ret;
}
static const struct of_device_id gicv5_iwb_of_match[] = {
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 0/3] irqchip/gic-v5: Minor clean-ups/fixes
2025-08-01 7:58 [PATCH 0/3] irqchip/gic-v5: Minor clean-ups/fixes Lorenzo Pieralisi
` (2 preceding siblings ...)
2025-08-01 7:58 ` [PATCH 3/3] irqchip/gic-v5: Remove IRQD_RESEND_WHEN_IN_PROGRESS for ITS IRQs Lorenzo Pieralisi
@ 2025-08-05 9:30 ` Lorenzo Pieralisi
3 siblings, 0 replies; 12+ messages in thread
From: Lorenzo Pieralisi @ 2025-08-05 9:30 UTC (permalink / raw)
To: Marc Zyngier, Thomas Gleixner, Sascha Bischoff, Timothy Hayes
Cc: linux-arm-kernel, linux-kernel, kernel test robot
On Fri, Aug 01, 2025 at 09:58:17AM +0200, Lorenzo Pieralisi wrote:
> A trivial fix for a kbot reported issue and two clean-ups
> discovered after the initial series was queued for v6.17;
> now that the driver code is merged I am sharing them.
>
> Only patch (1) is a fix, the two others are cleaning the code up
> and removing useless constructs.
>
> The series apply cleanly on top of this three-patch series [1] fixing
> some exit path issues with the gic-v5 driver that should also
> be considered for merging please (I reviewed it and tested it [2]):
Hi Thomas, Marc,
thank you for reviewing and pulling these fixes, please also consider
fixes in [1] below that are still current, Dan sent them before the
series was queued for -next and I reviewed/tested them (in particular
patch (3) - others are obvious).
Thanks,
Lorenzo
>
> [1] https://lore.kernel.org/lkml/670bb1dc-7827-4916-84f3-bb46ee408b20@sabinyo.mountain/
> [2] https://lore.kernel.org/lkml/aHoU8sKPuyzEFRIn@lpieralisi/
>
> Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org>
> ---
> Lorenzo Pieralisi (3):
> irqchip/gic-v5: iwb: Fix iounmap probe failure path
> irqchip/gic-v5: iwb: Remove module boilerplate
> irqchip/gic-v5: Remove IRQD_RESEND_WHEN_IN_PROGRESS for ITS IRQs
>
> drivers/irqchip/irq-gic-v5-its.c | 1 -
> drivers/irqchip/irq-gic-v5-iwb.c | 14 +++-----------
> 2 files changed, 3 insertions(+), 12 deletions(-)
> ---
> base-commit: 260f6f4fda93c8485c8037865c941b42b9cba5d2
> change-id: 20250731-gic-v5-fixes-6-17-949eae3c5594
>
> Best regards,
> --
> Lorenzo Pieralisi <lpieralisi@kernel.org>
>
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2025-08-05 9:30 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-01 7:58 [PATCH 0/3] irqchip/gic-v5: Minor clean-ups/fixes Lorenzo Pieralisi
2025-08-01 7:58 ` [PATCH 1/3] irqchip/gic-v5: iwb: Fix iounmap probe failure path Lorenzo Pieralisi
2025-08-01 12:26 ` Marc Zyngier
2025-08-05 8:48 ` [tip: irq/urgent] " tip-bot2 for Lorenzo Pieralisi
2025-08-01 7:58 ` [PATCH 2/3] irqchip/gic-v5: iwb: Remove module boilerplate Lorenzo Pieralisi
2025-08-01 12:24 ` Marc Zyngier
2025-08-01 14:04 ` Lorenzo Pieralisi
2025-08-01 7:58 ` [PATCH 3/3] irqchip/gic-v5: Remove IRQD_RESEND_WHEN_IN_PROGRESS for ITS IRQs Lorenzo Pieralisi
2025-08-01 12:30 ` Marc Zyngier
2025-08-01 14:01 ` Lorenzo Pieralisi
2025-08-05 8:48 ` [tip: irq/urgent] " tip-bot2 for Lorenzo Pieralisi
2025-08-05 9:30 ` [PATCH 0/3] irqchip/gic-v5: Minor clean-ups/fixes Lorenzo Pieralisi
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).