linux/drivers/irqchip
Thomas Gleixner a11f42496a genirq/affinity: Make affinity setting if activated opt-in
commit f0c7baca18 upstream.

John reported that on a RK3288 system the perf per CPU interrupts are all
affine to CPU0 and provided the analysis:

 "It looks like what happens is that because the interrupts are not per-CPU
  in the hardware, armpmu_request_irq() calls irq_force_affinity() while
  the interrupt is deactivated and then request_irq() with IRQF_PERCPU |
  IRQF_NOBALANCING.

  Now when irq_startup() runs with IRQ_STARTUP_NORMAL, it calls
  irq_setup_affinity() which returns early because IRQF_PERCPU and
  IRQF_NOBALANCING are set, leaving the interrupt on its original CPU."

This was broken by the recent commit which blocked interrupt affinity
setting in hardware before activation of the interrupt. While this works in
general, it does not work for this particular case. As contrary to the
initial analysis not all interrupt chip drivers implement an activate
callback, the safe cure is to make the deferred interrupt affinity setting
at activation time opt-in.

Implement the necessary core logic and make the two irqchip implementations
for which this is required opt-in. In hindsight this would have been the
right thing to do, but ...

Fixes: baedb87d1b ("genirq/affinity: Handle affinity setting on inactive interrupts correctly")
Reported-by: John Keeping <john@metanate.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Marc Zyngier <maz@kernel.org>
Acked-by: Marc Zyngier <maz@kernel.org>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/87blk4tzgm.fsf@nanos.tec.linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-08-21 13:05:20 +02:00
..
Kconfig
Makefile
alphascale_asm9260-icoll.h
exynos-combiner.c
irq-al-fic.c
irq-alpine-msi.c
irq-armada-370-xp.c
irq-aspeed-i2c-ic.c
irq-aspeed-vic.c
irq-ath79-cpu.c
irq-ath79-misc.c
irq-ativic32.c
irq-atmel-aic-common.c
irq-atmel-aic-common.h
irq-atmel-aic.c
irq-atmel-aic5.c
irq-bcm2835.c
irq-bcm2836.c
irq-bcm6345-l1.c
irq-bcm7038-l1.c
irq-bcm7120-l2.c
irq-brcmstb-l2.c
irq-clps711x.c
irq-crossbar.c
irq-csky-apb-intc.c
irq-csky-mpintc.c
irq-davinci-aintc.c
irq-davinci-cp-intc.c
irq-digicolor.c
irq-dw-apb-ictl.c
irq-eznps.c
irq-ftintc010.c
irq-gic-common.c
irq-gic-common.h
irq-gic-pm.c
irq-gic-realview.c
irq-gic-v2m.c
irq-gic-v3-its-fsl-mc-msi.c
irq-gic-v3-its-pci-msi.c
irq-gic-v3-its-platform-msi.c
irq-gic-v3-its.c genirq/affinity: Make affinity setting if activated opt-in 2020-08-21 13:05:20 +02:00
irq-gic-v3-mbi.c
irq-gic-v3.c irqchip/gic-v3: Only provision redistributors that are enabled in ACPI 2020-02-24 08:36:59 +01:00
irq-gic-v4.c
irq-gic.c irqchip/gic: Atomically update affinity 2020-07-09 09:37:56 +02:00
irq-goldfish-pic.c
irq-hip04.c
irq-i8259.c
irq-imgpdc.c
irq-imx-gpcv2.c
irq-imx-irqsteer.c
irq-ingenic-tcu.c
irq-ingenic.c
irq-ixp4xx.c
irq-jcore-aic.c
irq-keystone.c
irq-lpc32xx.c
irq-ls-scfg-msi.c
irq-ls1x.c
irq-madera.c
irq-mbigen.c irqchip/mbigen: Free msi_desc on device teardown 2020-04-23 10:36:20 +02:00
irq-meson-gpio.c
irq-mips-cpu.c
irq-mips-gic.c
irq-mmp.c
irq-mscc-ocelot.c
irq-mtk-cirq.c
irq-mtk-sysirq.c irqchip/irq-mtk-sysirq: Replace spinlock with raw_spinlock 2020-08-19 08:16:02 +02:00
irq-mvebu-gicp.c
irq-mvebu-icu.c
irq-mvebu-odmi.c
irq-mvebu-pic.c
irq-mvebu-sei.c
irq-mxs.c
irq-nvic.c
irq-omap-intc.c
irq-ompic.c
irq-or1k-pic.c
irq-orion.c
irq-partition-percpu.c
irq-pic32-evic.c
irq-rda-intc.c
irq-renesas-h8s.c
irq-renesas-h8300h.c
irq-renesas-intc-irqpin.c
irq-renesas-irqc.c
irq-renesas-rza1.c
irq-s3c24xx.c
irq-sa11x0.c
irq-sifive-plic.c
irq-sirfsoc.c
irq-sni-exiu.c
irq-st.c
irq-stm32-exti.c
irq-sun4i.c
irq-sunxi-nmi.c
irq-tango.c
irq-tb10x.c
irq-tegra.c
irq-ti-sci-inta.c irqchip/ti-sci-inta: Fix return value about devm_ioremap_resource() 2020-08-19 08:15:58 +02:00
irq-ti-sci-intr.c
irq-ts4800.c
irq-uniphier-aidet.c
irq-versatile-fpga.c irqchip/versatile-fpga: Apply clear-mask earlier 2020-04-17 10:50:11 +02:00
irq-vf610-mscm-ir.c
irq-vic.c
irq-vt8500.c
irq-xilinx-intc.c
irq-xtensa-mx.c
irq-xtensa-pic.c
irq-zevio.c
irqchip.c
qcom-irq-combiner.c
qcom-pdc.c
spear-shirq.c