* [PATCH v2 0/1] irqchip/mvebu-gicp: clear pending irqs on init
@ 2025-08-03 10:25 enachman
2025-08-03 10:25 ` [PATCH v2 1/1] " enachman
2025-08-03 15:45 ` [PATCH v2 0/1] irqchip/mvebu-gicp: clear pending irqs " Markus Elfring
0 siblings, 2 replies; 4+ messages in thread
From: enachman @ 2025-08-03 10:25 UTC (permalink / raw)
To: andrew, gregory.clement, sebastian.hesselbarth, tglx,
linux-arm-kernel, linux-kernel
Cc: enachman
From: Elad Nachman <enachman@marvell.com>
When a kexec'ed kernel boots up, there might be stale unhandled interrupts
pending in the interrupt controller. These are delivered as spurious
interrupts once the boot CPU enables interrupts.
Clear all pending interrupts when the driver is initialized to prevent
these spurious interrupts from locking the CPU in an endless loop.
v2:
1) rewrap commit message
2) don't keep remap, unmap register space after clearing pending irqs
3) fix code styling
Elad Nachman (1):
irqchip/mvebu-gicp: clear pending irqs on init
drivers/irqchip/irq-mvebu-gicp.c | 10 ++++++++++
1 file changed, 10 insertions(+)
--
2.25.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v2 1/1] irqchip/mvebu-gicp: clear pending irqs on init
2025-08-03 10:25 [PATCH v2 0/1] irqchip/mvebu-gicp: clear pending irqs on init enachman
@ 2025-08-03 10:25 ` enachman
2025-08-05 8:48 ` [tip: irq/urgent] irqchip/mvebu-gicp: Clear pending interrupts " tip-bot2 for Elad Nachman
2025-08-03 15:45 ` [PATCH v2 0/1] irqchip/mvebu-gicp: clear pending irqs " Markus Elfring
1 sibling, 1 reply; 4+ messages in thread
From: enachman @ 2025-08-03 10:25 UTC (permalink / raw)
To: andrew, gregory.clement, sebastian.hesselbarth, tglx,
linux-arm-kernel, linux-kernel
Cc: enachman
From: Elad Nachman <enachman@marvell.com>
When a kexec'ed kernel boots up, there might be stale unhandled interrupts
pending in the interrupt controller. These are delivered as spurious
interrupts once the boot CPU enables interrupts.
Clear all pending interrupts when the driver is initialized to prevent
these spurious interrupts from locking the CPU in an endless loop.
Signed-off-by: Elad Nachman <enachman@marvell.com>
---
drivers/irqchip/irq-mvebu-gicp.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/irqchip/irq-mvebu-gicp.c b/drivers/irqchip/irq-mvebu-gicp.c
index d3232d6d8dce..4b2cad09bc71 100644
--- a/drivers/irqchip/irq-mvebu-gicp.c
+++ b/drivers/irqchip/irq-mvebu-gicp.c
@@ -178,6 +178,7 @@ static int mvebu_gicp_probe(struct platform_device *pdev)
};
struct mvebu_gicp *gicp;
int ret, i;
+ void __iomem *base;
gicp = devm_kzalloc(&pdev->dev, sizeof(*gicp), GFP_KERNEL);
if (!gicp)
@@ -236,6 +237,15 @@ static int mvebu_gicp_probe(struct platform_device *pdev)
return -ENODEV;
}
+ base = ioremap(gicp->res->start, gicp->res->end - gicp->res->start);
+ if (IS_ERR(base)) {
+ dev_err(&pdev->dev, "ioremap() failed. Unable to clear pending interrupts.\n");
+ } else {
+ for (i = 0; i < 64; i++)
+ writel(i, base + GICP_CLRSPI_NSR_OFFSET);
+ iounmap(base);
+ }
+
return msi_create_parent_irq_domain(&info, &gicp_msi_parent_ops) ? 0 : -ENOMEM;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2 0/1] irqchip/mvebu-gicp: clear pending irqs on init
2025-08-03 10:25 [PATCH v2 0/1] irqchip/mvebu-gicp: clear pending irqs on init enachman
2025-08-03 10:25 ` [PATCH v2 1/1] " enachman
@ 2025-08-03 15:45 ` Markus Elfring
1 sibling, 0 replies; 4+ messages in thread
From: Markus Elfring @ 2025-08-03 15:45 UTC (permalink / raw)
To: Elad Nachman, linux-arm-kernel
Cc: LKML, Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
Thomas Gleixner
…
> v2:
> 1) rewrap commit message
…
You may omit a cover letter for a single patch,
don't you?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.16#n784
Regards,
Markus
^ permalink raw reply [flat|nested] 4+ messages in thread
* [tip: irq/urgent] irqchip/mvebu-gicp: Clear pending interrupts on init
2025-08-03 10:25 ` [PATCH v2 1/1] " enachman
@ 2025-08-05 8:48 ` tip-bot2 for Elad Nachman
0 siblings, 0 replies; 4+ messages in thread
From: tip-bot2 for Elad Nachman @ 2025-08-05 8:48 UTC (permalink / raw)
To: linux-tip-commits; +Cc: Elad Nachman, Thomas Gleixner, x86, linux-kernel, maz
The following commit has been merged into the irq/urgent branch of tip:
Commit-ID: 3c3d7dbab2c70a4bca47634d564bf659351c05ca
Gitweb: https://git.kernel.org/tip/3c3d7dbab2c70a4bca47634d564bf659351c05ca
Author: Elad Nachman <enachman@marvell.com>
AuthorDate: Sun, 03 Aug 2025 13:25:48 +03:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Tue, 05 Aug 2025 10:35:03 +02:00
irqchip/mvebu-gicp: Clear pending interrupts on init
When a kexec'ed kernel boots up, there might be stale unhandled interrupts
pending in the interrupt controller. These are delivered as spurious
interrupts once the boot CPU enables interrupts.
Clear all pending interrupts when the driver is initialized to prevent
these spurious interrupts from locking the CPU in an endless loop.
Signed-off-by: Elad Nachman <enachman@marvell.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20250803102548.669682-2-enachman@marvell.com
---
drivers/irqchip/irq-mvebu-gicp.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/irqchip/irq-mvebu-gicp.c b/drivers/irqchip/irq-mvebu-gicp.c
index d3232d6..fd85c84 100644
--- a/drivers/irqchip/irq-mvebu-gicp.c
+++ b/drivers/irqchip/irq-mvebu-gicp.c
@@ -177,6 +177,7 @@ static int mvebu_gicp_probe(struct platform_device *pdev)
.ops = &gicp_domain_ops,
};
struct mvebu_gicp *gicp;
+ void __iomem *base;
int ret, i;
gicp = devm_kzalloc(&pdev->dev, sizeof(*gicp), GFP_KERNEL);
@@ -236,6 +237,15 @@ static int mvebu_gicp_probe(struct platform_device *pdev)
return -ENODEV;
}
+ base = ioremap(gicp->res->start, gicp->res->end - gicp->res->start);
+ if (IS_ERR(base)) {
+ dev_err(&pdev->dev, "ioremap() failed. Unable to clear pending interrupts.\n");
+ } else {
+ for (i = 0; i < 64; i++)
+ writel(i, base + GICP_CLRSPI_NSR_OFFSET);
+ iounmap(base);
+ }
+
return msi_create_parent_irq_domain(&info, &gicp_msi_parent_ops) ? 0 : -ENOMEM;
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-08-05 8:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-03 10:25 [PATCH v2 0/1] irqchip/mvebu-gicp: clear pending irqs on init enachman
2025-08-03 10:25 ` [PATCH v2 1/1] " enachman
2025-08-05 8:48 ` [tip: irq/urgent] irqchip/mvebu-gicp: Clear pending interrupts " tip-bot2 for Elad Nachman
2025-08-03 15:45 ` [PATCH v2 0/1] irqchip/mvebu-gicp: clear pending irqs " Markus Elfring
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).