linux/drivers/irqchip
Yipeng Zou 2f61f0c6b7 irqchip/mbigen: Fix mbigen node address layout
[ Upstream commit 6be6cba9c4 ]

The mbigen interrupt chip has its per node registers located in a
contiguous region of page sized chunks. The code maps them into virtual
address space as a contiguous region and determines the address of a node
by using the node ID as index.

                    mbigen chip
       |-----------------|------------|--------------|
   mgn_node_0         mgn_node_1     ...         mgn_node_i
|--------------|   |--------------|       |----------------------|
[0x0000, 0x0x0FFF] [0x1000, 0x1FFF]    [i*0x1000, (i+1)*0x1000 - 1]

This works correctly up to 10 nodes, but then fails because the 11th's
array slot is used for the MGN_CLEAR registers.

                         mbigen chip
    |-----------|--------|--------|---------------|--------|
mgn_node_0  mgn_node_1  ...  mgn_clear_register  ...   mgn_node_i
                            |-----------------|
                             [0xA000, 0xAFFF]

Skip the MGN_CLEAR register space when calculating the offset for node IDs
greater than or equal to ten.

Fixes: a6c2f87b88 ("irqchip/mbigen: Implement the mbigen irq chip operation functions")
Signed-off-by: Yipeng Zou <zouyipeng@huawei.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20240730014400.1751530-1-zouyipeng@huawei.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-08-19 05:32:10 +02:00
..
alphascale_asm9260-icoll.h
exynos-combiner.c
irq-alpine-msi.c irqchip/alpine-msi: Fix off-by-one in allocation error path 2024-06-16 13:23:26 +02:00
irq-armada-370-xp.c irqchip/armada-370-xp: Do not touch Performance Counter Overflow on A375, A38x, A39x 2022-06-14 16:59:29 +02:00
irq-aspeed-i2c-ic.c irqchip/aspeed-i2c-ic: Fix irq_of_parse_and_map() return value 2022-06-14 16:59:21 +02:00
irq-aspeed-vic.c
irq-ath79-cpu.c
irq-ath79-misc.c Revert "MIPS: perf: ath79: Fix perfcount IRQ assignment" 2019-06-11 12:20:53 +02:00
irq-ativic32.c irqchip: Andestech Internal Vector Interrupt Controller driver 2018-02-22 10:44:36 +08:00
irq-atmel-aic5.c irqchip/atmel-aic: Remove root argument from ->fixup() prototype 2017-07-04 11:10:37 +01:00
irq-atmel-aic-common.c irqchip/atmel-aic: Remove root argument from ->fixup() prototype 2017-07-04 11:10:37 +01:00
irq-atmel-aic-common.h irqchip/atmel-aic: Remove root argument from ->fixup() prototype 2017-07-04 11:10:37 +01:00
irq-atmel-aic.c irqchip/atmel-aic: Remove root argument from ->fixup() prototype 2017-07-04 11:10:37 +01:00
irq-bcm2835.c irqchip: Convert to using %pOF instead of full_name 2017-08-23 10:09:28 +01:00
irq-bcm2836.c irqchip/irq-bcm2836: Add support for DT interrupt polarity 2018-01-04 11:12:39 +00:00
irq-bcm6345-l1.c irq-bcm6345-l1: Do not assume a fixed block to cpu mapping 2023-08-11 11:45:35 +02:00
irq-bcm7038-l1.c irqchip/irq-bcm7038-l1: Enable parent IRQ if necessary 2020-01-04 19:12:52 +01:00
irq-bcm7120-l2.c irqchip/irq-bcm7120-l2: Set IRQ_LEVEL for level triggered interrupts 2023-03-11 16:31:39 +01:00
irq-brcmstb-l2.c irqchip/irq-brcmstb-l2: Add write memory barrier before exit 2024-02-23 08:12:58 +01:00
irq-clps711x.c
irq-crossbar.c irqchip: Convert to using %pOF instead of full_name 2017-08-23 10:09:28 +01:00
irq-digicolor.c irqchip: Convert to using %pOF instead of full_name 2017-08-23 10:09:28 +01:00
irq-dw-apb-ictl.c irqchip: Convert to using %pOF instead of full_name 2017-08-23 10:09:28 +01:00
irq-eznps.c
irq-ftintc010.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
irq-gic-common.c irqchip/gic: Take lock when updating irq type 2018-03-29 11:47:50 +01:00
irq-gic-common.h irqchip/gic: Make quirks matching conditional on init return value 2017-10-19 11:22:38 +01:00
irq-gic-pm.c irqchip: gic-pm: Use pm_runtime_resume_and_get() in gic_probe() 2023-01-18 11:30:06 +01:00
irq-gic-realview.c irqchip/gic/realview: Fix refcount leak in realview_gic_of_init 2022-06-25 11:49:16 +02:00
irq-gic-v2m.c irqchip/gic-v2m: Fix SPI release on error path 2018-06-22 14:22:00 +02:00
irq-gic-v3-its-fsl-mc-msi.c irqchip/gic-v3-its: Move minimum LPI requirements to individual busses 2018-07-16 14:22:19 +01:00
irq-gic-v3-its-pci-msi.c irqchip/gic-v3-its: Reduce minimum LPI allocation to 1 for PCI devices 2018-07-27 10:01:24 +01:00
irq-gic-v3-its-platform-msi.c irqchip/gic-v3-its: Move minimum LPI requirements to individual busses 2018-07-16 14:22:19 +01:00
irq-gic-v3-its.c irqchip/gic-v3-its: Prevent double free on error 2024-05-02 16:17:13 +02:00
irq-gic-v3-mbi.c irqchip/gic-v3: Fix OF_BAD_ADDR error handling 2021-05-22 10:59:30 +02:00
irq-gic-v3.c irqchip/gic-v3: Fix refcount leak in gic_populate_ppi_partitions 2022-06-25 11:49:16 +02:00
irq-gic-v4.c irqchip/gic-v4: Clear IRQ_DISABLE_UNLAZY again if mapping fails 2017-11-10 09:50:36 +00:00
irq-gic.c irqchip/gic: Atomically update affinity 2020-07-09 09:37:12 +02:00
irq-goldfish-pic.c irqchip/irq-goldfish-pic: Add Goldfish PIC driver 2018-01-04 11:14:04 +00:00
irq-hip04.c irqchip/hip04: Report that effective affinity is a single target 2017-08-18 10:54:42 +02:00
irq-i8259.c irqchip/i8259: Set I/O port resource types correctly 2017-12-18 23:07:46 -06:00
irq-imgpdc.c treewide: devm_kzalloc() -> devm_kcalloc() 2018-06-12 16:19:22 -07:00
irq-imx-gpcv2.c irqchip/irq-imx-gpcv2: Forward irq type to parent 2019-08-25 10:47:53 +02:00
irq-ingenic.c irqchip: ingenic: Error out if IRQ domain creation failed 2020-01-04 19:12:52 +01:00
irq-jcore-aic.c irqchip/jcore-aic: Fix missing allocation of IRQ descriptors 2023-08-11 11:45:02 +02:00
irq-keystone.c
irq-lpc32xx.c irqchip: Convert to using %pOF instead of full_name 2017-08-23 10:09:28 +01:00
irq-ls-scfg-msi.c irqchip/ls-scfg-msi: Fix MSI affinity handling 2018-06-22 14:22:00 +02:00
irq-mbigen.c irqchip/mbigen: Fix mbigen node address layout 2024-08-19 05:32:10 +02:00
irq-meson-gpio.c irqchip/meson-gpio: Mark OF related data as maybe unused 2023-06-21 15:39:56 +02:00
irq-mips-cpu.c irqchip/mips-cpu: Set IPI domain parent chip 2021-01-27 11:05:40 +01:00
irq-mips-gic.c irqchip/mips-gic: Don't touch vl_map if a local interrupt is not routable 2023-08-30 16:31:56 +02:00
irq-mmp.c irqchip/mmp: Only touch the PJ4 IRQ & FIQ bits on enable/disable 2019-03-13 14:02:35 -07:00
irq-mscc-ocelot.c irqchip: Add a driver for the Microsemi Ocelot controller 2018-03-22 15:52:27 +00:00
irq-mtk-cirq.c
irq-mtk-sysirq.c irqchip/irq-mtk-sysirq: Replace spinlock with raw_spinlock 2020-08-19 08:14:52 +02:00
irq-mvebu-gicp.c irqchip/irq-mvebu-gicp: Fix refcount leak in mvebu_gicp_probe 2023-03-11 16:31:37 +01:00
irq-mvebu-icu.c irqchip/irq-mvebu-icu: Fix wrong private data retrieval 2019-11-24 08:19:40 +01:00
irq-mvebu-odmi.c
irq-mvebu-pic.c
irq-mxs.c irqchip: Convert to using %pOF instead of full_name 2017-08-23 10:09:28 +01:00
irq-nvic.c irqchip/nvic: Release nvic_base upon failure 2022-04-15 14:14:54 +02:00
irq-omap-intc.c irqchip/irq-omap-intc: Do not statically initialize variables 2017-10-16 21:05:14 +02:00
irq-ompic.c irqchip/ompic: fix return value check in ompic_of_init() 2018-01-04 11:13:22 +00:00
irq-or1k-pic.c irqchip: or1k-pic: Undefine mask_ack for level triggered hardware 2022-07-21 21:09:31 +02:00
irq-orion.c
irq-partition-percpu.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
irq-pic32-evic.c
irq-renesas-h8s.c h8300: irqchip: fix warning 2018-08-22 19:14:19 +09:00
irq-renesas-h8300h.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
irq-renesas-intc-irqpin.c irqchip/renesas-intc-irqpin: Use wakeup_path i.s.o. explicit clock handling 2018-03-14 11:11:15 +00:00
irq-renesas-irqc.c irqchip/renesas-irqc: Use wakeup_path i.s.o. explicit clock handling 2018-03-14 11:11:21 +00:00
irq-s3c24xx.c ARM: s3c: irq-s3c24xx: Fix return value check for s3c24xx_init_intc() 2021-11-26 11:36:12 +01:00
irq-sa11x0.c
irq-sifive-plic.c irqchip/sifive-plic: Add missing thead,c900-plic match string 2022-02-23 11:58:41 +01:00
irq-sirfsoc.c
irq-sni-exiu.c irqchip/exiu: Fix return value check in exiu_init() 2017-11-14 11:27:22 +01:00
irq-st.c
irq-stm32-exti.c irqchip/stm32-exti: add missing DT IRQ flag translation 2023-11-08 11:22:19 +01:00
irq-sun4i.c irqchip: Convert to using %pOF instead of full_name 2017-08-23 10:09:28 +01:00
irq-sunxi-nmi.c
irq-tango.c irqchip/tango: Set irq handler and data in one go 2018-08-20 09:54:44 +01:00
irq-tb10x.c
irq-tegra.c irqchip/tegra: Fix overflow implicit truncation warnings 2022-08-25 11:15:43 +02:00
irq-ts4800.c
irq-uniphier-aidet.c irqchip: Add UniPhier AIDET irqchip driver 2017-08-23 10:08:44 +01:00
irq-versatile-fpga.c irqchip/versatile-fpga: Apply clear-mask earlier 2020-04-17 10:48:46 +02:00
irq-vf610-mscm-ir.c
irq-vic.c
irq-vt8500.c
irq-xilinx-intc.c irqchip: Convert to using %pOF instead of full_name 2017-08-23 10:09:28 +01:00
irq-xtensa-mx.c irqchip: irq-xtensa-mx: fix initial IRQ affinity 2022-06-14 16:59:29 +02:00
irq-xtensa-pic.c xtensa: drop variant IRQ support 2018-08-20 12:28:05 -07:00
irq-zevio.c
irqchip.c
Kconfig irqchip/goldfish-pic: Select GENERIC_IRQ_CHIP to fix build 2021-10-06 15:31:15 +02:00
Makefile irqchip: add a SiFive PLIC driver 2018-08-13 08:31:32 -07:00
qcom-irq-combiner.c irqchip/qcom: Fix check for spurious interrupts 2018-05-02 15:56:10 +02:00
qcom-pdc.c irqchip/qcom-pdc: Fix broken locking 2022-04-15 14:14:54 +02:00
spear-shirq.c