From 52c73e3cecd0603346e176da1d04a0c4d3c98f1b Mon Sep 17 00:00:00 2001 From: Koichiro Den Date: Wed, 29 Jul 2026 02:23:05 +0900 Subject: PCI: endpoint: pci-ep-msi: Make embedded doorbell IRQ exclusive Embedded doorbells may use the same virq for several messages. This does not mean the IRQ itself should be shared. Consumers only need to request each distinct virq once, as vNTB and pci-epf-test already do. IRQF_SHARED would let different EPFs register handlers for the same IRQ. The embedded doorbell interface cannot tell which EPF a write targets, so every handler would handle it. Only the first EPF can allocate doorbells today, so this cannot happen yet. Drop IRQF_SHARED before extending the embedded backend to non-first EPFs. A second request for the same IRQ will then fail with -EBUSY instead of attaching another handler. Signed-off-by: Koichiro Den Signed-off-by: Manivannan Sadhasivam Reviewed-by: Frank Li Link: https://patch.msgid.link/20260728172306.2751813-3-den@valinux.co.jp --- include/linux/pci-epf.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/pci-epf.h b/include/linux/pci-epf.h index 704e1dc8b30a..226f3e59cf60 100644 --- a/include/linux/pci-epf.h +++ b/include/linux/pci-epf.h @@ -163,7 +163,8 @@ enum pci_epf_doorbell_type { * For MSI-backed doorbells this is the MSI message, while for * "embedded" doorbells this represents an MMIO write that asserts * an interrupt on the EP side. - * @virq: IRQ number of this doorbell message + * @virq: IRQ number of this doorbell message. Multiple messages may use the + * same IRQ; consumers must request each distinct IRQ only once. * @irq_flags: Required flags for request_irq()/request_threaded_irq(). * Callers may OR-in additional flags (e.g. IRQF_ONESHOT). * @type: Doorbell type. -- cgit v1.2.3