linux/drivers/pci/endpoint
Koichiro Den 2579f3f7f5 PCI: endpoint: pci-epf-vntb: Implement .db_vector_count()/mask() for doorbells
Implement .db_vector_count() and .db_vector_mask() so NTB core/clients can
map doorbell events to per-vector work and avoid the thundering-herd
behavior.

pci-epf-vntb reserves two slots in db_count: slot 0 for link events and
slot 1 which is historically unused. Therefore the number of doorbell
vectors is (db_count - 2).

Report vectors as 0..N-1 and return BIT_ULL(db_vector) for the
corresponding doorbell bit. Build db_valid_mask from a validated vector
count so out-of-range db_count values cannot create invalid shifts.

Signed-off-by: Koichiro Den <den@valinux.co.jp>
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260513024923.451765-8-den@valinux.co.jp
2026-06-23 11:37:27 -05:00
..
functions PCI: endpoint: pci-epf-vntb: Implement .db_vector_count()/mask() for doorbells 2026-06-23 11:37:27 -05:00
Kconfig PCI: endpoint: Add RC-to-EP doorbell support using platform MSI controller 2025-07-24 16:51:17 -05:00
Makefile PCI: endpoint: Add RC-to-EP doorbell support using platform MSI controller 2025-07-24 16:51:17 -05:00
pci-ep-cfs.c PCI: endpoint: Improve error messages 2026-03-26 22:33:11 +05:30
pci-ep-msi.c PCI: endpoint: pci-ep-msi: Add embedded doorbell fallback 2026-05-04 18:01:33 -05:00
pci-epc-core.c PCI: endpoint: Add auxiliary resource query API 2026-04-30 21:48:22 +05:30
pci-epc-mem.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
pci-epf-core.c PCI: endpoint: Fix typo in pci_epf_add_vepf() kernel-doc 2026-03-05 11:44:56 +05:30