[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <175438371158.1420.1973748316495700070.tip-bot2@tip-bot2>
Date: Tue, 05 Aug 2025 08:48:31 -0000
From: "tip-bot2 for Elad Nachman" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Elad Nachman <enachman@...vell.com>, Thomas Gleixner <tglx@...utronix.de>,
x86@...nel.org, linux-kernel@...r.kernel.org, maz@...nel.org
Subject:
[tip: irq/urgent] irqchip/mvebu-gicp: Clear pending interrupts on init
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@...vell.com>
AuthorDate: Sun, 03 Aug 2025 13:25:48 +03:00
Committer: Thomas Gleixner <tglx@...utronix.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@...vell.com>
Signed-off-by: Thomas Gleixner <tglx@...utronix.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;
}
Powered by blists - more mailing lists