linux-stable/drivers/misc
Omer Shpigelman b75f22505a habanalabs: add signal/wait to CS IOCTL operations
Add the following two operations to the CS IOCTL:

Signal:

The signal operation is basically a command submission, that is created by
the driver upon user request. It will be implemented using a dedicated PQE
that will increment a specific SOB. There will be a new flag:
HL_CS_FLAGS_SIGNAL. When the user set this flag in the CS IOCTL structure,
the driver will execute a dedicated code path that will prepare this
special PQE and submit it. The user only needs to provide a queue index on
which to put the signal.

Wait:

The wait operation is also a command submission that is created by the
driver upon user request. It will be implemented using a dedicated PQE that
will contain packets of "ARM a monitor" + FENCE packet. There will be a new
flag: HL_CS_FLAGS_WAIT. When the user set this flag in the CS structure,
the driver will execute a dedicated code path that will prepare this
special PQE and submit it.

The user needs to provide the following parameters:
1. queue ID
2. an array of signal_seq numbers and the number of signals to wait on
   (the length of signal_seq_arr).

The IOCTL will return the CS sequence number of the wait it put on the
queue ID.

Currently, the code supports signal_seq_nr==1. But this API definition will
allow us to put a single PQE that waits on multiple signals.

To correctly configure the monitor and fence, the driver will need to
retrieve the specified signal CS object that contains the relevant SOB and
its expected value. In case the signal CS has already been completed, there
is no point of adding a wait operation. In this case, the driver will
return to the user *without* putting anything on the PQ. The return code
should reflect to the user that the signal was completed, as we won't
return a CS sequence number for this wait.

Signed-off-by: Omer Shpigelman <oshpigelman@habana.ai>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
2020-05-19 14:48:41 +03:00
..
altera-stapl altera-stapl: altera_get_note: prevent write beyond end of 'key' 2020-03-03 08:02:57 +01:00
c2port
cardreader misc: rtsx: Improve compatibility for rts5261 2020-04-23 16:55:24 +02:00
cb710
cxl misc: cxl: use mmgrab 2020-01-16 14:59:36 +10:00
echo
eeprom Linux 5.6-rc7 2020-03-26 12:09:58 +01:00
genwqe misc: genwqe: fix compile warnings 2020-01-14 15:06:06 +01:00
habanalabs habanalabs: add signal/wait to CS IOCTL operations 2020-05-19 14:48:41 +03:00
ibmasm
lis3lv02d lis3lv02d: switch to using input device polling mode 2019-10-10 15:24:19 +02:00
lkdtm lkdtm: bugs: Fix spelling mistake 2020-04-23 16:30:09 +02:00
mei mei: me: disable mei interface on LBG servers. 2020-05-05 16:56:41 +02:00
mic Merge 5.7-rc3 into char-misc-next 2020-04-27 09:34:02 +02:00
ocxl ocxl: Add PCI hotplug dependency to Kconfig 2020-01-23 21:31:18 +11:00
sgi-gru misc: Replace zero-length array with flexible-array member 2020-03-18 12:24:19 +01:00
sgi-xp sgi-xp: make some symbols static in xpc_main.c 2020-04-23 16:55:23 +02:00
ti-st drivers/misc: ti-st: remove redundant assignment to variables i and flags 2020-01-14 15:16:51 +01:00
uacce uacce: unmap remaining mmapping from user space 2020-03-06 12:28:24 +11:00
vmw_vmci VMCI: Avoid extra check for access_ok() 2020-05-15 16:25:21 +02:00
ad525x_dpot-i2c.c
ad525x_dpot-spi.c
ad525x_dpot.c
ad525x_dpot.h
apds990x.c
apds9802als.c
atmel-ssc.c
atmel_tclib.c misc: atmel_tclib: use devm_platform_ioremap_resource() to simplify code 2019-10-10 15:24:19 +02:00
bh1770glc.c
cs5535-mfgpt.c
ds1682.c
dummy-irq.c
enclosure.c scsi: enclosure: Fix stale device oops with hot replug 2020-01-10 01:38:40 -05:00
fastrpc.c misc: fastrpc: fix potential fastrpc_invoke_ctx leak 2020-05-15 16:21:08 +02:00
hmc6352.c
hpilo.c
hpilo.h misc: Use the correct style for SPDX License Identifier 2019-10-10 15:34:40 +02:00
ibmvmc.c
ibmvmc.h misc: Use the correct style for SPDX License Identifier 2019-10-10 15:34:40 +02:00
ics932s401.c
isl29003.c
isl29020.c misc: isl29020: add missed pm_runtime_disable 2020-01-14 15:06:07 +01:00
Kconfig uacce: add uacce driver 2020-02-22 09:25:42 +08:00
kgdbts.c
lattice-ecp3-config.c
Makefile uacce: add uacce driver 2020-02-22 09:25:42 +08:00
pch_phub.c
pci_endpoint_test.c misc: pci_endpoint_test: remove duplicate macro PCI_ENDPOINT_TEST_STATUS 2020-04-02 17:57:10 +01:00
phantom.c
pti.c Char/Misc driver changes for 5.6-rc1 2020-01-29 10:35:54 -08:00
pvpanic.c misc: pvpanic: add crash loaded event 2020-01-14 15:07:37 +01:00
qcom-coincell.c
sram-exec.c drivers/misc: sram-exec: have the callers of set_memory_*() check the return value 2020-01-14 15:06:06 +01:00
sram.c misc: sram: use devm_platform_ioremap_resource_wc() 2019-11-05 18:32:47 +01:00
sram.h
tifm_7xx1.c
tifm_core.c
tsl2550.c misc: tsl2550: remove redundant initialization to variable r 2020-01-14 15:16:51 +01:00
vexpress-syscfg.c misc: vexpress: Replace zero-length array with flexible-array member 2020-02-11 14:03:19 -08:00
vmw_balloon.c vmw_balloon: Explicitly include linux/io.h for virt_to_phys() 2019-12-10 10:15:48 +01:00
xilinx_sdfec.c misc: xilinx-sdfec: convert to module_platform_driver() 2020-05-15 16:20:01 +02:00