Hi— On Tue, Nov 17, 2026 at 07:23:02PM -0500, Sasha Levin wrote: > > This patch makes substantial changes to the driver and how it > > processes interrupts. I am not sure it is a great candidate for > > stable. > > Agreed. I dropped it, and the BIT() fix that needed it, from the 6.18, 6.12, > 6.6 and 6.1 queues. The same applies to your notices for the other three trees. > > Could you send git-am-able BIT()-only backports of 0f214e5bbee5 > ("irqchip/sifive-plic: Avoid signed shift in interrupt enable mask"), one per > tree ([PATCH 6.18.y] through [PATCH 6.1.y])? I'll queue them. 7.3 already has > the cache patch in its base release, so it keeps the original fix. The following (below the scissors) can be am'd on top of all of the trees. I am not sure exactly what format is desirable for a stable commit, but I did add the upstream commit hash and my SoB. > > -- > Thanks, > Sasha Best—Charlie -- >8 -- commit 9ebdbab003ec949b3739f548f527c18b811d6568 Author: Pengpeng Hou Date: Sun, 20 Sep 2026 21:06:53 +0800 [Upstream commit 0f214e5bbee59d5952d3c061fd65ed9a1e175981] __plic_toggle() builds a 32-bit interrupt enable mask using a signed integer literal. A valid interrupt selecting bit 31 evaluates 1 << 31, which shifts a signed int into its sign bit. Use BIT(), matching the equivalent mask construction in plic_irq_eoi(). The resulting mask remains representable in u32 on both RV32 and RV64. The issue was found by our static-analysis tool. Fixes: 8237f8bc4f6e ("irqchip: add a SiFive PLIC driver") Signed-off-by: Pengpeng Hou Signed-off-by: Thomas Gleixner Assisted-by: gpt 5 Link: https://patch.msgid.link/caplitmus-rv.v2.plic.87a8fc444de44e109889ba28703c76f3@163.com Signed-off-by: Charles Mirabile --- drivers/irqchip/irq-sifive-plic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-sifive-plic.c b/drivers/irqchip/irq-sifive-plic.c index ca70641982ed6..0995e1fdd5b47 100644 --- a/drivers/irqchip/irq-sifive-plic.c +++ b/drivers/irqchip/irq-sifive-plic.c @@ -97,7 +97,7 @@ static int plic_irq_set_type(struct irq_data *d, unsigned int type); static void __plic_toggle(void __iomem *enable_base, int hwirq, int enable) { u32 __iomem *reg = enable_base + (hwirq / 32) * sizeof(u32); - u32 hwirq_mask = 1 << (hwirq % 32); + u32 hwirq_mask = BIT(hwirq % 32); if (enable) writel(readl(reg) | hwirq_mask, reg); -- 2.56.0