WSL2-Linux-Kernel/include
farah kassabri b9d31cada7 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>
2021-12-26 08:59:09 +02:00
..
acpi
asm-generic Add linux/cacheflush.h 2021-11-17 10:36:15 -05:00
clocksource
crypto
drm
dt-bindings dt-bindings: iio: add AD74413R 2021-12-12 17:09:11 +00:00
keys
kunit
kvm
linux 1st set of IIO new device support, features and cleanup for 5.17 2021-12-22 12:33:01 +01:00
math-emu
media
memory
misc
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf 2021-12-08 17:02:35 -08:00
pcmcia
ras
rdma RDMA/netlink: Add __maybe_unused to static inline in C file 2021-11-16 13:13:08 -04:00
scsi SCSI misc on 20211112 2021-11-12 12:25:50 -08:00
soc net: mscc: ocelot: create a function that replaces an existing VCAP filter 2021-11-26 11:38:20 -08:00
sound ASoC: Fixes for v5.16 2021-11-25 14:35:24 +01:00
target
trace NFS client bugfixes for Linux 5.16 2021-11-27 10:33:55 -08:00
uapi habanalabs: change wait_for_interrupt implementation 2021-12-26 08:59:09 +02:00
vdso
video
xen xen: add "not_essential" flag to struct xenbus_driver 2021-11-23 13:41:29 -06:00