OpenCloudOS-Kernel/drivers/dma
Xiaochen Shen 68974a46ed dmaengine: idxd: Fix max batch size for Intel IAA
commit e8dbd6445d upstream.

>From Intel IAA spec [1], Intel IAA does not support batch processing.

Two batch related default values for IAA are incorrect in current code:
(1) The max batch size of device is set during device initialization,
    that indicates batch is supported. It should be always 0 on IAA.
(2) The max batch size of work queue is set to WQ_DEFAULT_MAX_BATCH (32)
    as the default value regardless of Intel DSA or IAA device during
    work queue setup and cleanup. It should be always 0 on IAA.

Fix the issues by setting the max batch size of device and max batch
size of work queue to 0 on IAA device, that means batch is not
supported.

[1]: https://cdrdv2.intel.com/v1/dl/getContent/721858

【【SPR内核开发】SPR系列patch合入kernel+kvm】http://tapd.oa.com/Virtualization/prong/stories/view/1020422237869387499
--story=869387499 【SPR内核开发】SPR系列patch合入kernel+kvm

Fixes: 23084545db ("dmaengine: idxd: set max_xfer and max_batch for RO device")
Fixes: 92452a72eb ("dmaengine: idxd: set defaults for wq configs")
Fixes: bfe1d56091 ("dmaengine: idxd: Init and probe for Intel data accelerators")
Signed-off-by: Xiaochen Shen <xiaochen.shen@intel.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Fenghua Yu <fenghua.yu@intel.com>
Link: https://lore.kernel.org/r/20220930201528.18621-2-xiaochen.shen@intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Chen Zhuo <sagazchen@tencent.com>
Signed-off-by: Xinghui Li <korantli@tencent.com>
2024-06-11 21:18:44 +08:00
..
bestcomm treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
dw ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
dw-axi-dmac dmaengine fixes for v5.2-rc4 2019-06-08 12:46:31 -07:00
dw-edma ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
hsu ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
idxd dmaengine: idxd: Fix max batch size for Intel IAA 2024-06-11 21:18:44 +08:00
ioat ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
ipu treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
mediatek ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
ppc4xx treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 7 2019-05-21 11:28:40 +02:00
qcom dmaengine: qcom: bam_dma: Fix resource leak 2019-10-18 13:27:58 +05:30
sh ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
ti tkernel: add base tlinux kernel interfaces 2024-06-11 20:09:33 +08:00
xilinx ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
Kconfig dmaengine: idxd: fix setting up priv mode for dwq 2024-06-11 21:09:30 +08:00
Makefile dmaengine: dsa: move dsa_bus_type out of idxd driver to standalone 2024-06-11 21:09:24 +08:00
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: Drop double check for ACPI companion device 2024-06-11 21:08:43 +08:00
altera-msgdma.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
amba-pl08x.c Revert "dmaengine: Remove dma_async_is_complete from client API" 2024-06-11 21:18:00 +08:00
at_hdmac.c Revert "dmaengine: Remove dma_async_is_complete from client API" 2024-06-11 21:18:00 +08:00
at_hdmac_regs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
at_xdmac.c dmaengine updates for v5.3-rc1 2019-07-17 09:55:43 -07:00
bcm-sba-raid.c dmaengine: bcm-sba-raid: no need to check return value of debugfs_create functions 2019-06-14 11:14:58 +05:30
bcm2835-dma.c dmaengine updates for v5.4-rc1 2019-09-17 19:04:40 -07:00
coh901318.c tkernel: add base tlinux kernel interfaces 2024-06-11 20:09:33 +08:00
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 tkernel: add base tlinux kernel interfaces 2024-06-11 20:09:33 +08:00
dma-jz4780.c ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
dmaengine.c Revert "dmaengine: Remove the last, used parameters in dma_async_is_tx_complete" 2024-06-11 21:17:59 +08:00
dmaengine.h Revert "dmaengine: Remove dma_async_is_complete from client API" 2024-06-11 21:18:00 +08:00
dmatest.c Revert "dmaengine: Remove the last, used parameters in dma_async_is_tx_complete" 2024-06-11 21:17:59 +08:00
ep93xx_dma.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
fsl-edma-common.c ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
fsl-edma-common.h ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
fsl-edma.c ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
fsl-qdma.c tkernel: add base tlinux kernel interfaces 2024-06-11 20:09:33 +08:00
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 ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
fsldma.h ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
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: Providers should prefer dma_set_residue over dma_set_tx_state 2024-06-11 21:17:01 +08:00
iop-adma.c dmaengine updates for v5.4-rc1 2019-09-17 19:04:40 -07:00
iop-adma.h dma: iop-adma: allow building without platform headers 2019-08-14 15:36:22 +02:00
k3dma.c tkernel: add base tlinux kernel interfaces 2024-06-11 20:09:33 +08:00
lpc18xx-dmamux.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
mcf-edma.c ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
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
mmp_pdma.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
mmp_tdma.c dmaengine: Providers should prefer dma_set_residue over dma_set_tx_state 2024-06-11 21:17:01 +08:00
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 ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
mxs-dma.c dmaengine: Providers should prefer dma_set_residue over dma_set_tx_state 2024-06-11 21:17:01 +08: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 2024-06-11 21:08:29 +08:00
owl-dma.c ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
pch_dma.c ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
pl330.c ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
pxa_dma.c dmaengine updates for v5.3-rc1 2019-07-17 09:55:43 -07:00
s3c24xx-dma.c dmaengine: Remove dev_err() usage after platform_get_irq() 2019-07-31 20:50:53 +05:30
sa11x0-dma.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
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: Fix the possible memory leak issue 2019-10-15 15:47: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 ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
stm32-dmamux.c dmaengine: stm32-dmamux: Switch to use device_property_count_u32() 2019-07-29 12:25:21 +05:30
stm32-mdma.c ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
sun4i-dma.c dmaengine: Remove dev_err() usage after platform_get_irq() 2019-07-31 20:50:53 +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 ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
tegra210-adma.c ock: sync codes to ock 5.4.119-20.0009.21 2024-06-11 20:27:38 +08:00
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: Remove dev_err() usage after platform_get_irq() 2019-07-31 20:50:53 +05:30
virt-dma.c tkernel: add base tlinux kernel interfaces 2024-06-11 20:09:33 +08:00
virt-dma.h dmaengine updates for v5.3-rc1 2019-07-17 09:55:43 -07:00
xgene-dma.c dmaengine: Remove dev_err() usage after platform_get_irq() 2019-07-31 20:50:53 +05:30
zx_dma.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00