summaryrefslogtreecommitdiffstats
path: root/drivers/misc/habanalabs/goya/goyaP.h
diff options
context:
space:
mode:
authorOded Gabbay2019-02-15 23:39:18 +0100
committerGreg Kroah-Hartman2019-02-18 09:46:45 +0100
commit1251f23ae8583b1bb99c3db07102f4c9cc3160fe (patch)
tree6110a9e71aa5ac4426c229ef7c02c6bb2092e0c6 /drivers/misc/habanalabs/goya/goyaP.h
parenthabanalabs: add h/w queues module (diff)
downloadkernel-qcow2-linux-1251f23ae8583b1bb99c3db07102f4c9cc3160fe.tar.gz
kernel-qcow2-linux-1251f23ae8583b1bb99c3db07102f4c9cc3160fe.tar.xz
kernel-qcow2-linux-1251f23ae8583b1bb99c3db07102f4c9cc3160fe.zip
habanalabs: add event queue and interrupts
This patch adds support for receiving events from Goya's control CPU and for receiving MSI-X interrupts from Goya's DMA engines and CPU. Goya's PCI controller supports up to 8 MSI-X interrupts, which only 6 of them are currently used. The first 5 interrupts are dedicated for Goya's DMA engine queues. The 6th interrupt is dedicated for Goya's control CPU. The DMA queue will signal its MSI-X entry upon each completion of a command buffer that was placed on its primary queue. The driver will then mark that CB as completed and free the related resources. It will also update the command submission object which that CB belongs to. There is a dedicated event queue (EQ) between the driver and Goya's control CPU. The EQ is located on the Host memory. The control CPU writes a new entry to the EQ for various reasons, such as ECC error, MMU page fault, Hot temperature. After writing the new entry to the EQ, the control CPU will trigger its dedicated MSI-X entry to signal the driver that there is a new entry in the EQ. The driver will then read the entry and act accordingly. Reviewed-by: Mike Rapoport <rppt@linux.ibm.com> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/habanalabs/goya/goyaP.h')
-rw-r--r--drivers/misc/habanalabs/goya/goyaP.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/misc/habanalabs/goya/goyaP.h b/drivers/misc/habanalabs/goya/goyaP.h
index 791605cbecfe..7cd007d3cb0b 100644
--- a/drivers/misc/habanalabs/goya/goyaP.h
+++ b/drivers/misc/habanalabs/goya/goyaP.h
@@ -152,6 +152,7 @@ struct goya_device {
/* TODO: remove hw_queues_lock after moving to scheduler code */
spinlock_t hw_queues_lock;
u64 ddr_bar_cur_addr;
+ u32 events_stat[GOYA_ASYNC_EVENT_ID_SIZE];
u32 hw_cap_initialized;
};