accel/habanalabs: split user interrupts pending list
authorfarah kassabri <fkassabri@habana.ai>
Wed, 19 Jul 2023 13:56:53 +0000 (16:56 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Mon, 9 Oct 2023 09:37:22 +0000 (12:37 +0300)
commitba24b5ec7847d4126fc37cabd4cef3579d9ca806
treefb9c0595f0cc41b4fd1136f44d23f491b96a977c
parent1157b5d6b3b069394e37cd3b1d32c39eb833e546
accel/habanalabs: split user interrupts pending list

Currently driver maintain one list for both pending user interrupts
which seeks to wait till CQ reaches it's target value and also the ones
that seeks to get timestamp records when the CQ reaches it's target
value.
This causes delay in handling the waiters which gets higher priority
than the timestamp records.
In order to solve this, let's split the list into two,
one for each case and each one is protected by it's own spinlock.
Waiters will be handled within the interrupt context first,
then the timestamp records will be set.
Freeing the timestamp related memory will be handled in a workqueue.

Signed-off-by: farah kassabri <fkassabri@habana.ai>
Reviewed-by: Tomer Tayar <ttayar@habana.ai>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/accel/habanalabs/common/command_submission.c
drivers/accel/habanalabs/common/habanalabs.h
drivers/accel/habanalabs/common/irq.c
drivers/accel/habanalabs/gaudi2/gaudi2.c