linux-stable/include/uapi/misc
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
..
uacce crypto: hisilicon/qm - add queue isolation support for Kunpeng930 2021-03-26 20:15:58 +11:00
cxl.h
fastrpc.h misc: fastrpc: add ioctl for attaching to sensors pd 2020-09-16 17:30:37 +02:00
habanalabs.h habanalabs: change wait_for_interrupt implementation 2021-12-26 08:59:09 +02:00
ocxl.h ocxl: do not use C++ style comments in uapi header 2019-06-14 15:35:53 +10:00
pvpanic.h misc: pvpanic: add crash loaded event 2020-01-14 15:07:37 +01:00
xilinx_sdfec.h misc: xilinx_sdfec: Add stats & status ioctls 2019-08-15 17:54:38 +02:00