]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
PCI: endpoint: pci-ep-msi: Refactor doorbell allocation for new backends
authorKoichiro Den <den@valinux.co.jp>
Tue, 14 Apr 2026 14:15:11 +0000 (23:15 +0900)
committerManivannan Sadhasivam <mani@kernel.org>
Thu, 30 Apr 2026 16:18:48 +0000 (21:48 +0530)
commita3a079e5c5b7748f206c4baeb92593f9eca3184a
tree676f9fd55d5e31b8c6b76bf9e3282a38d2284ee7
parentec2075cfc629eed09d8865621be76ff2197781d6
PCI: endpoint: pci-ep-msi: Refactor doorbell allocation for new backends

Prepare pci-ep-msi for non-MSI doorbell backends.

Factor MSI doorbell allocation into a helper and extend struct
pci_epf_doorbell_msg with:

  - irq_flags: required IRQ request flags (e.g. IRQF_SHARED for some
    backends)
  - type: doorbell backend type
  - bar/offset: pre-exposed doorbell target location, if any

Initialize these fields for the existing MSI-backed doorbell
implementation.

Also add PCI_EPF_DOORBELL_EMBEDDED type, which is to be implemented in a
follow-up patch.

No functional changes.

Signed-off-by: Koichiro Den <den@valinux.co.jp>
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
Tested-by: Niklas Cassel <cassel@kernel.org>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260414141514.1341429-5-den@valinux.co.jp
drivers/pci/endpoint/pci-ep-msi.c
include/linux/pci-epf.h