linux-sg2042/drivers/dma
Andy Shevchenko aa72f1d20e dmaengine: dmatest: Fix process hang when reading 'wait' parameter
If we do

  % echo 1 > /sys/module/dmatest/parameters/run
  [  115.851124] dmatest: Could not start test, no channels configured

  % echo dma8chan7 > /sys/module/dmatest/parameters/channel
  [  127.563872] dmatest: Added 1 threads using dma8chan7

  % cat /sys/module/dmatest/parameters/wait
  ... !!! HANG !!! ...

The culprit is the commit 6138f967bc

  ("dmaengine: dmatest: Use fixed point div to calculate iops")

which makes threads not to run, but pending and being kicked off by writing
to the 'run' node. However, it forgot to consider 'wait' routine to avoid
above mentioned case.

In order to fix this, check for really running threads, i.e. with pending
and done flags unset.

It's pity the culprit commit hadn't updated documentation and tested all
possible scenarios.

Fixes: 6138f967bc ("dmaengine: dmatest: Use fixed point div to calculate iops")
Cc: Seraj Alijan <seraj.alijan@sondrel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20200428113518.70620-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2020-04-28 21:46:35 +05:30
..
bestcomm treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
dw dmaengine: dw: platform: Mark 'hclk' clock optional 2019-10-14 13:51:44 +05:30
dw-axi-dmac dmaengine: virt-dma: Add missing locking 2019-12-26 10:04:18 +05:30
dw-edma dmaengine: dw-edma: fix endianess confusion 2019-07-22 20:58:15 +05:30
fsl-dpaa2-qdma dmaengine: fsl-dpaa2-qdma: remove set but not used variable 'dpaa2_qdma' 2020-03-06 19:04:55 +05:30
hsu dmaengine updates for v5.3-rc1 2019-07-17 09:55:43 -07:00
idxd dmaengine updates for v5.7-rc1 2020-04-02 16:04:42 -07:00
ioat dmanegine: ioat/dca: Replace zero-length array with flexible-array member 2020-02-19 17:48:40 +05:30
ipu treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
mediatek dmaengine: virt-dma: Add missing locking 2019-12-26 10:04:18 +05:30
ppc4xx dmaengine: ppc4xx: Use scnprintf() for avoiding potential buffer overflow 2020-03-11 15:10:45 +05:30
qcom dmaengine: qcom: bam_dma: Fix resource leak 2019-10-18 13:27:58 +05:30
sf-pdma dmaengine: virt-dma: Add missing locking 2019-12-26 10:04:18 +05:30
sh dmaengine: fix spelling mistake "exceds" -> "exceeds" 2020-03-23 11:39:49 +05:30
ti dmaengine: ti: k3-psil: fix deadlock on error path 2020-04-15 21:38:28 +05:30
xilinx dmaengine: xilinx_dma: Add missing check for empty list 2020-04-15 21:42:11 +05:30
Kconfig dmaengine: hisilicon: Fix build error without PCI_MSI 2020-04-15 21:18:57 +05:30
Makefile dmaengine: uniphier-xdmac: Add UniPhier external DMA controller driver 2020-03-02 14:54:34 +05:30
TODO dmaengine: dw: don't perform DMA when dmaengine_submit is called 2014-07-15 22:14:30 +05:30
acpi-dma.c dmaengine: acpi: Add kernel doc parameter descriptions 2019-08-21 09:41:27 +05:30
altera-msgdma.c remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
amba-pl08x.c dmaengine updates for v5.3-rc1 2019-07-17 09:55:43 -07:00
at_hdmac.c dmaengine: at_hdmac: Fix deadlocks 2020-02-25 11:27:27 +05:30
at_hdmac_regs.h dmaengine: at_hdmac: Return err in case the chan is not free at alloc res time 2020-02-25 11:27:27 +05:30
at_xdmac.c dmaengine: at_xdmac: Fix locking in tasklet 2020-02-25 11:27:27 +05:30
bcm-sba-raid.c dmaengine: bcm-sba-raid: Replace zero-length array with flexible-array member 2020-02-13 20:15:35 +05:30
bcm2835-dma.c dmaengine: bcm2835: do not call vchan_vdesc_fini() with lock held 2019-12-26 10:04:18 +05:30
coh901318.c dmaengine: coh901318: Fix a double lock bug in dma_tc_handle() 2020-02-24 21:59:45 +05:30
coh901318.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194 2019-05-30 11:29:22 -07:00
coh901318_lli.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194 2019-05-30 11:29:22 -07:00
dma-axi-dmac.c dmaengine: axi-dmac: add a check for devm_regmap_init_mmio 2019-12-11 16:11:50 +05:30
dma-jz4780.c dmaengine updates for v5.6-rc1 2020-01-27 10:55:50 -08:00
dmaengine.c dmaengine: fix channel index enumeration 2020-04-27 21:26:23 +05:30
dmaengine.h dmaengine: Create debug directories for DMA devices 2020-03-11 14:56:14 +05:30
dmatest.c dmaengine: dmatest: Fix process hang when reading 'wait' parameter 2020-04-28 21:46:35 +05:30
ep93xx_dma.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
fsl-edma-common.c dmaengine: fsl-edma: Add eDMA support for QorIQ LS1028A platform 2019-12-18 11:55:46 +05:30
fsl-edma-common.h dmaengine: fsl-edma: Add eDMA support for QorIQ LS1028A platform 2019-12-18 11:55:46 +05:30
fsl-edma.c dmaengine: fsl-edma: Add eDMA support for QorIQ LS1028A platform 2019-12-18 11:55:46 +05:30
fsl-qdma.c dmaengine: fsl-qdma: fix duplicated argument to && 2020-01-21 13:15:37 +05:30
fsl_raid.c dmaengine: fsl_raid: make of_device_ids const. 2017-06-29 09:25:28 +05:30
fsl_raid.h dmaengine: Driver support for FSL RaidEngine device. 2015-04-02 16:10:27 +05:30
fsldma.c dmaengine: fsldma: Mark expected switch fall-through 2019-08-20 19:42:34 -05:00
fsldma.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 40 2019-05-24 17:27:12 +02:00
hisi_dma.c dmaengine: hisilicon: Add Kunpeng DMA engine support 2020-01-24 11:18:45 +05:30
idma64.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
idma64.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
img-mdc-dma.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 422 2019-06-05 17:37:15 +02:00
imx-dma.c dmaengine: imx-dma: Mark expected switch fall-through 2019-07-31 20:49:04 +05:30
imx-sdma.c dmaengine: imx-sdma: Fix the event id check to include RX event for UART6 2020-02-25 14:15:26 +05:30
iop-adma.c dmaengine: iop-adma: clean up an indentation issue 2019-11-14 10:27:37 +05:30
iop-adma.h dma: iop-adma: allow building without platform headers 2019-08-14 15:36:22 +02:00
k3dma.c dmaengine: k3dma: Avoid null pointer traversal 2019-12-23 13:21:14 +05:30
lpc18xx-dmamux.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
mcf-edma.c dmaengine: fsl-edma: add drvdata for fsl-edma 2019-07-03 13:28:22 +05:30
mic_x100_dma.c dmaengine updates for v5.3-rc1 2019-07-17 09:55:43 -07:00
mic_x100_dma.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 290 2019-06-05 17:36:38 +02:00
milbeaut-hdmac.c dmaengine: milbeaut-hdmac: remove redundant error log 2019-11-08 09:26:17 +05:30
milbeaut-xdmac.c dmaengine: milbeaut-xdmac: remove redundant error log 2019-11-08 09:26:17 +05:30
mmp_pdma.c dmaengine: mmp_pdma: add missed of_dma_controller_free 2019-11-22 10:51:30 +05:30
mmp_tdma.c dmaengine: mmp_tdma: Reset channel error on release 2020-04-23 12:44:30 +05:30
moxart-dma.c treewide: Use struct_size() for kmalloc()-family 2018-06-06 11:15:43 -07:00
mpc512x_dma.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 7 2019-05-21 11:28:40 +02:00
mv_xor.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 288 2019-06-05 17:36:37 +02:00
mv_xor.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 288 2019-06-05 17:36:37 +02:00
mv_xor_v2.c treewide: remove redundant IS_ERR() before error code check 2020-02-04 03:05:27 +00:00
mxs-dma.c dmaengine updates for v5.3-rc1 2019-07-17 09:55:43 -07:00
nbpfaxi.c dmaengine: nbpfaxi: Use dev_get_drvdata() 2019-04-29 10:47:15 +05:30
of-dma.c dmaengine: Move dma_get_{,any_}slave_channel() to private dmaengine.h 2020-01-21 15:05:29 +05:30
owl-dma.c dmaengine: virt-dma: Add missing locking 2019-12-26 10:04:18 +05:30
pch_dma.c dmaengine: pch_dma.c: Avoid data race between probe and irq handler 2020-04-23 11:47:16 +05:30
pl330.c dmaengine: pl330: Convert to the *_late and *_early system sleep callbacks 2019-12-10 11:39:04 +05:30
plx_dma.c dmaengine: plx-dma: Implement descriptor submission 2020-01-15 19:40:51 +05:30
pxa_dma.c dmaengine updates for v5.3-rc1 2019-07-17 09:55:43 -07:00
s3c24xx-dma.c dmaengine: s3c24xx-dma: fix spelling mistake "to" -> "too" 2020-01-23 17:03:25 +05:30
sa11x0-dma.c dmaengine: sa11x0: Replace zero-length array with flexible-array member 2020-02-19 17:48:40 +05:30
sirf-dma.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 4 2019-05-21 11:28:40 +02:00
sprd-dma.c dmaengine: sprd: Set request pending flag when DMA controller is active 2020-03-23 11:38:24 +05:30
st_fdma.c dmaengine: Remove dev_err() usage after platform_get_irq() 2019-07-31 20:50:53 +05:30
st_fdma.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
ste_dma40.c dmaengine: ste_dma40: fix unneeded variable warning 2019-07-22 20:58:33 +05:30
ste_dma40_ll.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194 2019-05-30 11:29:22 -07:00
ste_dma40_ll.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 194 2019-05-30 11:29:22 -07:00
stm32-dma.c dmaengine: stm32-dma: use vchan_terminate_vdesc() in .terminate_all 2020-02-25 11:15:05 +05:30
stm32-dmamux.c dmaengine: stm32-dmamux: driver defers probe for clock and reset 2020-02-24 22:22:44 +05:30
stm32-mdma.c dmaengine: stm32-mdma: use vchan_terminate_vdesc() in .terminate_all 2020-02-24 22:20:01 +05:30
sun4i-dma.c dmaengine: sun4i: set the linear_mode properly 2020-02-17 12:21:08 +05:30
sun6i-dma.c dmaengine: Remove dev_err() usage after platform_get_irq() 2019-07-31 20:50:53 +05:30
tegra20-apb-dma.c dmaengine: tegra-apb: Ensure that clock is enabled during of DMA synchronization 2020-04-27 21:35:35 +05:30
tegra210-adma.c dmaengine: tegra210-adma: Replace zero-length array with flexible-array member 2020-02-19 17:48:40 +05:30
timb_dma.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
txx9dmac.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
txx9dmac.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
uniphier-mdmac.c dmaengine: uniphier-mdmac: replace zero-length array with flexible-array member 2020-02-13 20:15:57 +05:30
uniphier-xdmac.c dmaengine: uniphier-xdmac: Remove redandant error log for platform_get_irq 2020-03-26 12:22:56 +05:30
virt-dma.c dmaengine updates for v5.6-rc1 2020-01-27 10:55:50 -08:00
virt-dma.h dmaengine: virt-dma: Add missing locking around list operations 2019-12-26 10:04:18 +05:30
xgene-dma.c dmaengine: Remove dev_err() usage after platform_get_irq() 2019-07-31 20:50:53 +05:30
zx_dma.c dmaengine: zx: remove: removed dmam_pool_destroy 2019-11-14 12:16:53 +05:30