]> www.infradead.org Git - users/hch/misc.git/commit
PCI/MSI: Add startup/shutdown for per device domains
authorInochi Amaoto <inochiama@gmail.com>
Wed, 13 Aug 2025 23:28:32 +0000 (07:28 +0800)
committerThomas Gleixner <tglx@linutronix.de>
Sat, 23 Aug 2025 19:21:13 +0000 (21:21 +0200)
commit54f45a30c0d0153d2be091ba2d683ab6db6d1d5b
tree177653731d77126f19d69a4dcb246ffb7c4a3dd3
parent7a721a2fee2bce01af26699a87739db8ca8ea3c8
PCI/MSI: Add startup/shutdown for per device domains

As the RISC-V PLIC cannot apply affinity settings without invoking
irq_enable(), it will make the interrupt unavailble when used as an
underlying interrupt chip for the MSI controller.

Implement the irq_startup() and irq_shutdown() callbacks for the PCI MSI
and MSI-X templates.

For chips that specify MSI_FLAG_PCI_MSI_STARTUP_PARENT, the parent startup
and shutdown functions are invoked. That allows the interrupt on the parent
chip to be enabled if the interrupt has not been enabled during
allocation. This is necessary for MSI controllers which use PLIC as
underlying parent interrupt chip.

Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Chen Wang <unicorn_wang@outlook.com> # Pioneerbox
Reviewed-by: Chen Wang <unicorn_wang@outlook.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://lore.kernel.org/all/20250813232835.43458-3-inochiama@gmail.com
drivers/pci/msi/irqdomain.c
include/linux/msi.h