[RFC PATCH kernel 0/2] irq: Add reference counting to IRQ mappings

From: Alexey Kardashevskiy
Date: Tue Oct 27 2020 - 05:07:44 EST



This is an attempt to fix a bug with PCI hot unplug with
a bunch of PCIe bridges and devices sharing INTx.

This did not hit us before as even if we did not
call irq_domain_ops::unmap, the platform (PowerVM) would not
produce an error but with POWER9's XIVE interrupt controller
there is an error if unmap is not called at all (2/2 fixes that)
or an error if we unmapped an interrupt which is still in use
by another device (1/2 fixes that).

One way of fixing that is doing reference counting in
the POWERPC code but since there is a kobj in irq_desc
already, I thought I'll give it a try first.


This is based on sha1
4525c8781ec0 Linus Torvalds "scsi: qla2xxx: remove incorrect sparse #ifdef".

Please comment. Thanks.



Alexey Kardashevskiy (1):
irq: Add reference counting to IRQ mappings

Oliver O'Halloran (1):
powerpc/pci: Remove LSI mappings on device teardown

arch/powerpc/kernel/pci-common.c | 21 +++++++++++++++++++
kernel/irq/irqdesc.c | 35 +++++++++++++++++++++-----------
kernel/irq/irqdomain.c | 27 ++++++++++++------------
3 files changed, 57 insertions(+), 26 deletions(-)

--
2.17.1