diff options
| author | Koichiro Den <den@valinux.co.jp> | 2026-05-13 11:49:18 +0900 |
|---|---|---|
| committer | Bjorn Helgaas <bhelgaas@google.com> | 2026-06-23 11:37:27 -0500 |
| commit | 2579f3f7f52090463596765040aaad71e91ef4d5 (patch) | |
| tree | 54cf3f34dda54eb3451882459d8e00b1c7b1f86b /rust/zerocopy/src/pointer/git@git.tavy.me:linux-stable.git | |
| parent | 823468a4ea1613f1c1235bd16af8b9c6eb9c9677 (diff) | |
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
Diffstat (limited to 'rust/zerocopy/src/pointer/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions
