OSDN Git Service

habanalabs: add uapi to flush inbound HBM transactions
authorOhad Sharabi <osharabi@habana.ai>
Sun, 18 Dec 2022 07:42:34 +0000 (09:42 +0200)
committerOded Gabbay <ogabbay@kernel.org>
Thu, 26 Jan 2023 09:52:10 +0000 (11:52 +0200)
commit20faaeec3794661c1d73578316691174a5a0e5a9
treea390f01c243d2fcabe40cd0d625c2627eb4ee073
parente65e175b07bef5974045cc42238de99057669ca7
habanalabs: add uapi to flush inbound HBM transactions

When doing p2p with a NIC device, the NIC needs to make sure all the
writes to the HBM (through the PCI bar of the Gaudi device) were
flushed.

It can be done by either the NIC or the host reading through the PCI
bar.

To support the host side, we supply a simple uapi to perform this flush
through the driver, because the user can't create such a transaction
by itself (the PCI bar isn't exposed to normal users).

Signed-off-by: Ohad Sharabi <osharabi@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/accel/habanalabs/common/command_submission.c
drivers/accel/habanalabs/common/habanalabs.h
drivers/accel/habanalabs/gaudi/gaudi.c
drivers/accel/habanalabs/gaudi2/gaudi2.c
drivers/accel/habanalabs/include/gaudi/asic_reg/gaudi_regs.h
include/uapi/drm/habanalabs_accel.h