mirror-linux/drivers/irqchip
Yong-Xuan Wang cefafbd561 irqchip/riscv-imsic: Clear interrupt move state during CPU offlining
Affinity changes of IMSIC interrupts have to be careful to not lose an
interrupt in the process. Each vector keeps track of an affinity change in
progress with two pointers in struct imsic_vector.

imsic_vector::move_prev points to the previous CPU target data and
imsic_vector::move_next to the designated new CPU target data.

imsic_vector::move_prev on the new CPU can only be cleared after the
previous CPU has cleared imsic_vector::move_next, which ususally happens in
__imsic_remote_sync().

In case of CPU hot-unplug __imsic_remote_sync() is not invoked because the
CPU is already marked offline. That means imsic_vector::move_prev becomes
stale until the CPU is onlined again.

The stale pointer prevents further affinity changes for the affected
interrupts.

Solve this by clearing the imsic_vector::move_prev pointers in the CPU
hotplug offline path.

[ tglx: Replace word salad in change log ]

Fixes: 0f67911e82 ("irqchip/riscv-imsic: Separate next and previous pointers in IMSIC vector")
Signed-off-by: Yong-Xuan Wang <yongxuan.wang@sifive.com>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20260508-imsic-v2-1-e9f08dd46cf5@sifive.com
2026-05-11 15:23:11 +02:00
..
Kconfig irqchip/loongson-pch-lpc: Enable building on MIPS Loongson64 2026-03-26 16:15:04 +01:00
Makefile irqchip: Add RZ/{T2H,N2H} Interrupt Controller (ICU) driver 2025-12-15 22:44:32 +01:00
alphascale_asm9260-icoll.h
exynos-combiner.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq-aclint-sswi.c irqchip/aslint-sswi: Fix error check of of_io_request_and_map() result 2026-01-18 14:39:18 +01:00
irq-al-fic.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq-alpine-msi.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
irq-apple-aic.c irqchip/apple-aic: Add support for "apple,t8122-aic3" 2026-03-11 09:59:29 +01:00
irq-armada-370-xp.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq-aspeed-i2c-ic.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq-aspeed-intc.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq-aspeed-scu-ic.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq-aspeed-vic.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq-ath79-cpu.c irqchip/ath79-cpu: Remove unused function 2026-05-11 15:06:47 +02:00
irq-ath79-misc.c irqchip/ath79-misc: Fix missing prototypes warnings 2025-06-20 21:38:52 +02:00
irq-atmel-aic-common.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq-atmel-aic-common.h
irq-atmel-aic.c irqchip/atmel-aic[5]: Fix incorrect lock guard conversion 2025-08-23 21:41:07 +02:00
irq-atmel-aic5.c irqchip/atmel-aic[5]: Fix incorrect lock guard conversion 2025-08-23 21:41:07 +02:00
irq-bcm2712-mip.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq-bcm2835.c irqchip: Switch to irq_domain_create_*() 2025-05-16 21:06:09 +02:00
irq-bcm2836.c irqchip: Switch to irq_domain_create_*() 2025-05-16 21:06:09 +02:00
irq-bcm6345-l1.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
irq-bcm7038-l1.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
irq-bcm7120-l2.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
irq-brcmstb-l2.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq-clps711x.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq-crossbar.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq-csky-apb-intc.c A set of cleanups for the generic interrupt subsystem: 2025-05-27 08:07:32 -07:00
irq-csky-mpintc.c irqchip: Switch to irq_domain_create_*() 2025-05-16 21:06:09 +02:00
irq-davinci-cp-intc.c irqchip: Switch to irq_domain_create_*() 2025-05-16 21:06:09 +02:00
irq-digicolor.c irqchip: Switch to irq_domain_create_*() 2025-05-16 21:06:09 +02:00
irq-dw-apb-ictl.c A set of cleanups for the generic interrupt subsystem: 2025-05-27 08:07:32 -07:00
irq-econet-en751221.c irqchip/econet-en751221: Switch to of_fwnode_handle() 2025-05-13 16:39:03 +02:00
irq-ftintc010.c irqchip: Switch to irq_domain_create_*() 2025-05-16 21:06:09 +02:00
irq-gic-common.c
irq-gic-common.h irqchip/gic-v3: Rename GICv3 ITS MSI parent 2025-07-08 18:35:52 +01:00
irq-gic-its-msi-parent.c irqchip/gic-v5: Add ACPI ITS probing 2026-01-27 15:31:42 +01:00
irq-gic-its-msi-parent.h irqchip/gic-v5: Add GICv5 ITS support 2025-07-08 18:35:52 +01:00
irq-gic-pm.c
irq-gic-realview.c
irq-gic-v2m.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq-gic-v3-its-fsl-mc-msi.c of/irq: Convert of_msi_map_id() callers to of_msi_xlate() 2025-09-03 09:01:26 -05:00
irq-gic-v3-its.c Miscellaneous irqchip driver fixes: 2026-03-01 10:58:16 -08:00
irq-gic-v3-mbi.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq-gic-v3.c irqchip/gic-v3: Print a warning for out-of-range interrupt numbers 2026-03-26 17:26:14 +01:00
irq-gic-v4.c KVM: arm64: WARN if unmapping a vLPI fails in any path 2025-06-20 13:52:29 -07:00
irq-gic-v5-irs.c KVM/arm64 fixes for 7.0, take #1 2026-02-28 15:33:34 +01:00
irq-gic-v5-its.c irqchip/gic-v5: Allocate ITS parent LPIs as a range 2026-05-11 14:56:04 +02:00
irq-gic-v5-iwb.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
irq-gic-v5.c irqchip/gic-v5: Support range allocation for LPIs 2026-05-11 14:56:04 +02:00
irq-gic.c irqchip/gic: Expose CPU interface VA to KVM 2025-11-24 14:29:11 -08:00
irq-goldfish-pic.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq-hip04.c irqchip: Switch to irq_domain_create_*() 2025-05-16 21:06:09 +02:00
irq-i8259.c syscore: Pass context data to callbacks 2025-11-14 10:01:52 +01:00
irq-idt3243x.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq-imgpdc.c irqchip: Use dev_fwnode() 2025-06-12 15:08:12 +02:00
irq-imx-gpcv2.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq-imx-intmux.c irqchip: Switch to irq_domain_create_*() 2025-05-16 21:06:09 +02:00
irq-imx-irqsteer.c irqchip/imx-irqsteer: Add NXP S32N79 support 2026-03-11 09:55:26 +01:00
irq-imx-mu-msi.c irqchip: Pass platform device to platform drivers 2025-10-16 18:17:27 +02:00
irq-ingenic-tcu.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq-ingenic.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq-ixp4xx.c irqchip: Switch to of_fwnode_handle() 2025-05-16 21:06:07 +02:00
irq-jcore-aic.c irqchip: Switch to irq_domain_create_*() 2025-05-16 21:06:09 +02:00
irq-keystone.c irqchip: Use dev_fwnode() 2025-06-12 15:08:12 +02:00
irq-lan966x-oic.c A set of cleanups for the generic interrupt subsystem: 2025-05-27 08:07:32 -07:00
irq-loongarch-avec.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq-loongarch-cpu.c irqchip: Switch to of_fwnode_handle() 2025-05-16 21:06:07 +02:00
irq-loongson-eiointc.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq-loongson-htpic.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq-loongson-htvec.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq-loongson-liointc.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq-loongson-pch-lpc.c irqchip/loongson-pch-lpc: Add OF init code 2026-03-26 16:15:04 +01:00
irq-loongson-pch-msi.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq-loongson-pch-pic.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq-loongson.h
irq-lpc32xx.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq-ls-extirq.c irqchip/ls-extirq: Fix devm_of_iomap() error check 2026-02-24 18:35:49 +01:00
irq-ls-scfg-msi.c irqchip/ls-scfg-msi: Fix NULL dereference in error handling 2025-07-18 14:54:45 +02:00
irq-ls1x.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq-madera.c
irq-mbigen.c
irq-mchp-eic.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq-meson-gpio.c irqchip/meson-gpio: Use the correct register in meson_s4_gpio_irq_set_type() 2026-05-11 15:22:48 +02:00
irq-mips-cpu.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq-mips-gic.c irqchip/mips-gic: Allow forced affinity 2025-06-21 18:20:54 +02:00
irq-mmp.c irqchip/mmp: Make icu_irq_chip variable static const 2026-02-17 11:03:56 +01:00
irq-mscc-ocelot.c A set of cleanups for the generic interrupt subsystem: 2025-05-27 08:07:32 -07:00
irq-msi-lib.c irqchip/msi-lib: Refuse initialization when irq_write_msi_msg() is missing 2026-02-24 08:17:14 +01:00
irq-mst-intc.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq-mtk-cirq.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq-mtk-sysirq.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
irq-mvebu-gicp.c irqchip/mvebu-gicp: Fix an IS_ERR() vs NULL check in probe() 2025-08-24 12:00:47 +02:00
irq-mvebu-icu.c irqchip: Make irq-msi-lib.h globally available 2025-05-16 21:32:19 +02:00
irq-mvebu-odmi.c irqchip: Use IS_ERR_OR_NULL() instead of NULL and IS_ERR() checks 2026-03-10 18:34:52 +01:00
irq-mvebu-pic.c irqchip/mvebu-pic: Drop unused module alias 2025-10-16 18:17:28 +02:00
irq-mvebu-sei.c irqchip/mvebu: Convert to msi_create_parent_irq_domain() helper 2025-05-16 21:32:20 +02:00
irq-mxs.c irqchip: Switch to irq_domain_create_*() 2025-05-16 21:06:09 +02:00
irq-nvic.c irqchip: Use int type to store negative error codes 2025-09-03 14:10:30 +02:00
irq-omap-intc.c irqchip: Switch to irq_domain_create_*() 2025-05-16 21:06:09 +02:00
irq-ompic.c openrisc: Fix IPIs on simple multicore systems 2026-01-16 16:38:56 +00:00
irq-or1k-pic.c openrisc: Fix IPIs on simple multicore systems 2026-01-16 16:38:56 +00:00
irq-orion.c irqchip: Switch to irq_domain_create_*() 2025-05-16 21:06:09 +02:00
irq-owl-sirq.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq-pic32-evic.c irqchip/irq-pic32-evic: Add __maybe_unused for board_bind_eic_interrupt in COMPILE_TEST 2026-04-07 11:19:02 +02:00
irq-pruss-intc.c irqchip: Use dev_fwnode() 2025-06-12 15:08:12 +02:00
irq-qcom-mpm.c irqchip/qcom-mpm: Add missing mailbox TX done acknowledgment 2026-03-26 16:11:53 +01:00
irq-rda-intc.c
irq-realtek-rtl.c irqchip: Switch to irq_domain_create_*() 2025-05-16 21:06:09 +02:00
irq-renesas-intc-irqpin.c irqchip/renesas-intc-irqpin: Convert to DEFINE_SIMPLE_DEV_PM_OPS() 2025-07-18 16:46:09 +02:00
irq-renesas-irqc.c irqchip/renesas-irqc: Convert to DEFINE_SIMPLE_DEV_PM_OPS() 2025-07-18 16:46:09 +02:00
irq-renesas-rza1.c irqchip/renesas-rza1: Use for_each_of_imap_item iterator 2026-01-15 12:03:27 +01:00
irq-renesas-rzg2l.c irqchip/renesas-rzg2l: Add NMI support 2026-04-01 18:41:58 +02:00
irq-renesas-rzt2h.c irqchip: Add RZ/{T2H,N2H} Interrupt Controller (ICU) driver 2025-12-15 22:44:32 +01:00
irq-renesas-rzv2h.c irqchip/renesas-rzv2h: Kill icu_err string 2026-04-07 11:19:02 +02:00
irq-riscv-aplic-direct.c irqchip/riscv-aplic: Preserve APLIC states across suspend/resume 2025-12-16 19:08:43 +01:00
irq-riscv-aplic-main.c irqchip/riscv-aplic: Restrict genpd notifier to device tree only 2026-03-31 10:11:29 +02:00
irq-riscv-aplic-main.h irqchip/riscv-aplic: Preserve APLIC states across suspend/resume 2025-12-16 19:08:43 +01:00
irq-riscv-aplic-msi.c
irq-riscv-imsic-early.c irqchip/riscv-imsic: Clear interrupt move state during CPU offlining 2026-05-11 15:23:11 +02:00
irq-riscv-imsic-platform.c irqchip/riscv-imsic: Revert "Remove redundant irq_data lookups" 2026-01-13 09:51:46 +01:00
irq-riscv-imsic-state.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
irq-riscv-imsic-state.h Revert "irqchip/riscv-imsic: Embed the vector array in lpriv" 2026-01-09 16:10:05 +01:00
irq-riscv-intc.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
irq-riscv-rpmi-sysmsi.c irqchip/riscv-rpmi-sysmsi: Fix mailbox channel leak in rpmi_sysmsi_probe() 2026-03-17 11:16:15 +01:00
irq-sa11x0.c syscore: Pass context data to callbacks 2025-11-14 10:01:52 +01:00
irq-sg2042-msi.c irqchip/sg2042-msi: Set irq type according to DT configuration 2025-09-04 14:52:48 +02:00
irq-sifive-plic.c Miscellaneous irqchip driver fixes: 2026-03-01 10:58:16 -08:00
irq-sl28cpld.c
irq-sni-exiu.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq-sp7021-intc.c irqchip: Switch to irq_domain_create_*() 2025-05-16 21:06:09 +02:00
irq-st.c
irq-starfive-jh8100-intc.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq-stm32-exti.c Convert remaining multi-line kmalloc_obj/flex GFP_KERNEL uses 2026-02-22 08:26:33 -08:00
irq-stm32mp-exti.c irqchip: Use dev_fwnode() 2025-06-12 15:08:12 +02:00
irq-sun4i.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq-sun6i-r.c syscore: Pass context data to callbacks 2025-11-14 10:01:52 +01:00
irq-sunxi-nmi.c A set of cleanups for the generic interrupt subsystem: 2025-05-27 08:07:32 -07:00
irq-tb10x.c A set of cleanups for the generic interrupt subsystem: 2025-05-27 08:07:32 -07:00
irq-tegra.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq-ti-sci-inta.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq-ti-sci-intr.c irqchip/ti-sci-intr: Allow parsing interrupt-types per-line 2026-01-26 16:40:04 +01:00
irq-ts4800.c irqchip/ts4800: Drop unused module alias 2025-10-16 18:17:28 +02:00
irq-uniphier-aidet.c irqchip: Switch to of_fwnode_handle() 2025-05-16 21:06:07 +02:00
irq-versatile-fpga.c irqchip: Switch to irq_domain_create_*() 2025-05-16 21:06:09 +02:00
irq-vf610-mscm-ir.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq-vic.c syscore: Pass context data to callbacks 2025-11-14 10:01:52 +01:00
irq-vt8500.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq-wpcm450-aic.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq-xilinx-intc.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
irq-xtensa-mx.c irqchip: Switch to irq_domain_create_*() 2025-05-16 21:06:09 +02:00
irq-xtensa-pic.c irqchip: Switch to irq_domain_create_*() 2025-05-16 21:06:09 +02:00
irq-zevio.c irqchip: Switch to irq_domain_create_*() 2025-05-16 21:06:09 +02:00
irqchip.c irqchip: Pass platform device to platform drivers 2025-10-16 18:17:27 +02:00
qcom-irq-combiner.c irqchip/qcom-irq-combiner: Rename driver structure 2025-10-17 15:18:18 +02:00
qcom-pdc.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
spear-shirq.c irqchip: Switch to irq_domain_create_*() 2025-05-16 21:06:09 +02:00