habanalabs/gaudi2: configure virtual MSI-X doorbell interface
authorTomer Tayar <ttayar@habana.ai>
Wed, 29 Jun 2022 13:37:55 +0000 (16:37 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Tue, 12 Jul 2022 06:09:30 +0000 (09:09 +0300)
commit1cf596c6b9ac07a94fa8489866511e76f9c7644b
tree59a4dfaf02136d00a5c4107a37c8861f73d0a606
parentaf2e650b36a9a0c0e127dde20c394cbbf318e729
habanalabs/gaudi2: configure virtual MSI-X doorbell interface

Due to a watchdog timer in the LBW path, writes to the MSI-X doorbell
can return sporadic error responses.
To work-around this issue, a virtual MSI-X doorbell on the HBW path is
configured, using the MSI-X AXI slave interface in the PCIe controller.
Upon an access to a configured HBW host address, the controller will
generate MSI-X interrupt instead of treating the access as regular host
memory access.

This patch allocates the dedicate host memory page, and communicate the
address to F/W, so it will configure the relevant address match
registers in the controller, and will use this address to generate MSI-X
interrupts for F/W events.

Following patches will handle other initiators in the device, to move
them to use the virtual MSI-X doorbell.

Signed-off-by: Tomer Tayar <ttayar@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/gaudi2/gaudi2.c
drivers/misc/habanalabs/gaudi2/gaudi2P.h
drivers/misc/habanalabs/gaudi2/gaudi2_masks.h