]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
NTB: epf: Implement .db_vector_count()/mask() for doorbells
authorKoichiro Den <den@valinux.co.jp>
Wed, 13 May 2026 02:49:23 +0000 (11:49 +0900)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 23 Jun 2026 16:37:44 +0000 (11:37 -0500)
commit1fda82e37e00eb679d762756867b2e7508dd73f9
tree70f3da2f503d62eafcf7c4645d2612925f1b4c17
parent4fdea8dbb62d746429498e07385a3ba0b0f6d1ab
NTB: epf: 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.

Report vectors as 0..(db_count - 2) (skipping the unused slot) and return
BIT_ULL(db_vector) for the corresponding doorbell bit. Use
ntb_epf_db_vector_count() for bounds checks in ntb_epf_db_vector_mask(), so
the same lower-bound guard is applied before building the bitmask.

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: Dave Jiang <dave.jiang@intel.com>
Link: https://patch.msgid.link/20260513024923.451765-13-den@valinux.co.jp
drivers/ntb/hw/epf/ntb_hw_epf.c