summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorfarah kassabri <fkassabri@habana.ai>2021-11-02 11:34:18 +0200
committerOded Gabbay <ogabbay@kernel.org>2021-12-26 08:59:09 +0200
commitb9d31cada7d9f137028c11534fff77fec8511690 (patch)
treea1af0a83f458c57dc8d66c691f0e27283eecc7f7 /Makefile
parente2558f0f84d85bfe2407b91d57798f133d8ad32a (diff)
downloadlinux-b9d31cada7d9f137028c11534fff77fec8511690.tar.bz2
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 'Makefile')
0 files changed, 0 insertions, 0 deletions