summaryrefslogtreecommitdiffstats
path: root/.gitignore
diff options
context:
space:
mode:
authorfarah kassabri <fkassabri@habana.ai>2021-11-02 10:34:18 +0100
committerOded Gabbay <ogabbay@kernel.org>2021-12-26 07:59:09 +0100
commitb9d31cada7d9f137028c11534fff77fec8511690 (patch)
treea1af0a83f458c57dc8d66c691f0e27283eecc7f7 /.gitignore
parenthabanalabs: prevent wait if CS in multi-CS list completed (diff)
downloadlinux-b9d31cada7d9f137028c11534fff77fec8511690.tar.xz
linux-b9d31cada7d9f137028c11534fff77fec8511690.zip
habanalabs: change wait_for_interrupt implementation
Currently the cq counters are allocated in userspace memory, and mapped by the driver to the device address space. A new requirement that is part of new future API related to this one, requires that cq counters will be allocated in kernel memory. We leverage the existing cb_create API with KERNEL_MAPPED flag set to allocate this memory. That way we gain two things: 1. The memory cannot be freed while in use since it's protected by refcount in driver. 2. No need to wake up the user thread upon each interrupt from CQ, because the kernel has direct access to the counter. Therefore, it can make comparison with the target value in the interrupt handler and wake up the user thread only if the counter reaches the target value. This is instead of waking the thread up to copy counter value from user then go sleep again if target value wasn't reached. Signed-off-by: farah kassabri <fkassabri@habana.ai> Reviewed-by: Oded Gabbay <ogabbay@kernel.org> Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions