- 26 Jul, 2022 6 commits
-
-
Slark Xiao authored
Replace 'the the' with 'the' in the comment. Signed-off-by:
Slark Xiao <slark_xiao@163.com> Link: https://lore.kernel.org/r/20220721055647.46085-1-slark_xiao@163.comSigned-off-by:
Vinod Koul <vkoul@kernel.org>
-
Mathias Tausen authored
Marking the DMA as cache coherent (dma-coherent in devicetree) is only safe with versions of axi_dmac that have this feature enabled. Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: Vinod Koul <vkoul@kernel.org> Acked-by:
Nuno Sá <nuno.sa@analog.com> Signed-off-by:
Mathias Tausen <mta@satlab.com> Link: https://lore.kernel.org/r/20220726140213.786939-1-mta@satlab.comSigned-off-by:
Vinod Koul <vkoul@kernel.org>
-
Biju Das authored
Some on-chip peripheral modules(for eg:- rspi) on RZ/G2L SoC use the same signal for both interrupt and DMA transfer requests. The signal works as a DMA transfer request signal by setting DMARS, and subsequent interrupt requests to the interrupt controller are masked. We can re-enable the interrupt by clearing the DMARS. This patch adds device_synchronize callback for clearing DMARS and thereby allowing DMA consumers to switch to interrupt mode. Signed-off-by:
Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by:
Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20220722084430.969333-1-biju.das.jz@bp.renesas.comSigned-off-by:
Vinod Koul <vkoul@kernel.org>
-
Uwe Kleine-König authored
It's not allowed to quit remove early without cleaning up completely. Otherwise this results in resource leaks that probably yield graver problems later. Here for example some tasklets might survive the lifetime of the sprd-dma device and access sdev which is freed after .remove() returns. As none of the device freeing requires an active device, just ignore the return value of pm_runtime_get_sync(). Signed-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by:
Baolin Wang <baolin.wang7@gmail.com> Link: https://lore.kernel.org/r/20220721204054.323602-1-u.kleine-koenig@pengutronix.deSigned-off-by:
Vinod Koul <vkoul@kernel.org>
-
Akhil R authored
In certain cases where the DMA client bus gets corrupted or if the end device ceases to send/receive data, DMA can wait indefinitely for the data to be received/sent. Attempting to terminate the transfer will put the DMA in pause flush mode and it remains there. The channel is irrecoverable once this pause times out in Tegra194 and earlier chips. Whereas, from Tegra234, it can be recovered by disabling the channel and reprograming it. Hence add a new terminate() function that ignores the outcome of dma_pause() so that terminate_all() can proceed to disable the channel. Signed-off-by:
Akhil R <akhilrajeev@nvidia.com> Reviewed-by:
Jon Hunter <jonathanh@nvidia.com> Link: https://lore.kernel.org/r/20220720104045.16099-3-akhilrajeev@nvidia.comSigned-off-by:
Vinod Koul <vkoul@kernel.org>
-
Akhil R authored
Document the compatible string used by GPCDMA controller for Tegra234. Signed-off-by:
Akhil R <akhilrajeev@nvidia.com> Reviewed-by:
Jon Hunter <jonathanh@nvidia.com> Acked-by:
Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20220720104045.16099-2-akhilrajeev@nvidia.comSigned-off-by:
Vinod Koul <vkoul@kernel.org>
-
- 21 Jul, 2022 6 commits
-
-
XueBing Chen authored
The strlcpy should not be used because it doesn't limit the source length. Preferred is strscpy. Signed-off-by:
XueBing Chen <chenxuebing@jari.cn> Reviewed-by:
Laurent Pinchart <laurent.pinchart@ideasonboard.com> Link: https://lore.kernel.org/r/39aa840f.e31.181ed9461c2.Coremail.chenxuebing@jari.cnSigned-off-by:
Vinod Koul <vkoul@kernel.org>
-
Shengjiu Wang authored
The peripheral may have several FIFOs, but some case just select some FIFOs from them for data transfer, which means FIFO0 and FIFO2 may be selected. So add FIFO address stride support, 0 means all FIFOs are continuous, 1 means 1 word stride between FIFOs. All stride between FIFOs should be same. Another option words_per_fifo means how many audio channel data copied to one FIFO one time, 1 means one channel per FIFO, 2 means 2 channels per FIFO. If 'n_fifos_src = 4' and 'words_per_fifo = 2', it means the first two words(channels) fetch from FIFO0 and then jump to FIFO1 for next two words, and so on after the last FIFO3 fetched, roll back to FIFO0. Signed-off-by:
Joy Zou <joy.zou@nxp.com> Signed-off-by:
Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1657162829-9273-1-git-send-email-shengjiu.wang@nxp.comSigned-off-by:
Vinod Koul <vkoul@kernel.org>
-
Fenghua Yu authored
Some IAX operation code nomenclatures are misleading or don't match with others: 1. Operation code 0x4c is Zero Compress 32. IAX_OPCODE_DECOMP_32 is a misleading name. Change it to IAX_OPCODE_ZERO_COMP_32. 2. Operation code 0x4d is Zero Compress 16. IAX_OPCODE_DECOMP_16 is a misleading name. Change it to IAX_OPCODE_ZERO_COMP_16. 3. IAX_OPCDE_FIND_UNIQUE is corrected to match with other nomenclatures. Co-developed-by:
Li Zhang <li4.zhang@intel.com> Signed-off-by:
Li Zhang <li4.zhang@intel.com> Signed-off-by:
Fenghua Yu <fenghua.yu@intel.com> Reviewed-by:
Dave Jiang <dave.jiang@intel.com> Link: https://lore.kernel.org/r/20220707002052.1546361-1-fenghua.yu@intel.comSigned-off-by:
Vinod Koul <vkoul@kernel.org>
-
Fabio Estevam authored
Change the of_device_get_match_data() cast to (uintptr_t) to silence the following clang warning: drivers/dma/imx-dma.c:1048:20: warning: cast to smaller integer type 'enum imx_dma_type' from 'const void *' [-Wvoid-pointer-to-enum-cast] Reported-by:
kernel test robot <lkp@intel.com> Fixes: 0ab785c8 ("dmaengine: imx-dma: Remove unused .id_table") Signed-off-by:
Fabio Estevam <festevam@denx.de> Link: https://lore.kernel.org/r/20220706111327.940764-1-festevam@gmail.comSigned-off-by:
Vinod Koul <vkoul@kernel.org>
-
Ben Dooks authored
If the channel has no descriptor and the interrupt is raised then the kernel will OOPS. Check the result of vchan_next_desc() in the handler axi_chan_block_xfer_complete() to avoid the error happening. Signed-off-by:
Ben Dooks <ben.dooks@sifive.com> Link: https://lore.kernel.org/r/20220708170153.269991-4-ben.dooks@sifive.comSigned-off-by:
Vinod Koul <vkoul@kernel.org>
-
Ben Dooks authored
During debugging we have seen an issue where axi_chan_dump_lli() is passed a NULL LLI pointer which ends up causing an OOPS due to trying to get fields from it. Simply print NULL LLI and exit to avoid this. Signed-off-by:
Ben Dooks <ben.dooks@sifive.com> Link: https://lore.kernel.org/r/20220708170153.269991-3-ben.dooks@sifive.comSigned-off-by:
Vinod Koul <vkoul@kernel.org>
-
- 06 Jul, 2022 13 commits
-
-
Jiapeng Chong authored
Inconsistent function names describing msgdma_chan_remove() and msgdma_dma_remove are modified to msgdma_dev_remove() and msgdma_remove(). Remove some warnings found by running scripts/kernel-doc, which is caused by using 'make W=1'. drivers/dma/altera-msgdma.c:927: warning: expecting prototype for msgdma_dma_remove(). Prototype was for msgdma_remove() instead. drivers/dma/altera-msgdma.c:758: warning: expecting prototype for msgdma_chan_remove(). Prototype was for msgdma_dev_remove() instead. Signed-off-by:
Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Reviewed-by:
Stefan Roese <sr@denx.de> Link: https://lore.kernel.org/r/20220706082605.114907-1-jiapeng.chong@linux.alibaba.comSigned-off-by:
Vinod Koul <vkoul@kernel.org>
-
Shengjiu Wang authored
Fix compile warning that 'Function parameter or member not described' with 'W=1' option: Add missing description for struct sdma_desc There is not any description for struct sdma_script_start_addrs, so use /* instead of /** Signed-off-by:
Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1657086309-7964-1-git-send-email-shengjiu.wang@nxp.comSigned-off-by:
Vinod Koul <vkoul@kernel.org>
-
Viacheslav Mitrofanov authored
When we get a DMA channel and try to use it in multiple threads it will cause oops and hanging the system. % echo 64 > /sys/module/dmatest/parameters/threads_per_chan % echo 10000 > /sys/module/dmatest/parameters/iterations % echo 1 > /sys/module/dmatest/parameters/run [ 89.480664] Unable to handle kernel NULL pointer dereference at virtual address 00000000000000a0 [ 89.488725] Oops [#1] [ 89.494708] CPU: 2 PID: 1008 Comm: dma0chan0-copy0 Not tainted 5.17.0-rc5 [ 89.509385] epc : vchan_find_desc+0x32/0x46 [ 89.513553] ra : sf_pdma_tx_status+0xca/0xd6 This happens because of data race. Each thread rewrite channels's descriptor as soon as device_prep_dma_memcpy() is called. It leads to the situation when the driver thinks that it uses right descriptor that actually is freed or substituted for other one. With current fixes a descriptor changes its value only when it has been used. A new descriptor is acquired from vc->desc_issued queue that is already filled with descriptors that are ready to be sent. Threads have no direct access to DMA channel descriptor. Now it is just possible to queue a descriptor for further processing. Fixes: 6973886a ("dmaengine: sf-pdma: add platform DMA support for HiFive Unleashed A00") Signed-off-by:
Viacheslav Mitrofanov <v.v.mitrofanov@yadro.com> Link: https://lore.kernel.org/r/20220701082942.12835-1-v.v.mitrofanov@yadro.comSigned-off-by:
Vinod Koul <vkoul@kernel.org>
-
Conor Dooley authored
The Canaan k210 apparently has a Sysnopsys Designware AXI DMA controller, but according to the documentation & devicetree it has 6 interrupts rather than the standard one. Support the 6 interrupt configuration by unconditionally extending the binding to a maximum of 8 per-channel interrupts thereby matching the number of possible channels. Link: https://canaan-creative.com/wp-content/uploads/2020/03/kendryte_standalone_programming_guide_20190311144158_en.pdf #Page 51 Reviewed-by:
Serge Semin <fancer.lancer@gmail.com> Reviewed-by:
Rob Herring <robh@kernel.org> Signed-off-by:
Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20220705215213.1802496-4-mail@conchuod.ieSigned-off-by:
Vinod Koul <vkoul@kernel.org>
-
XueBing Chen authored
The strlcpy should not be used because it doesn't limit the source length. Preferred is strscpy. Signed-off-by:
XueBing Chen <chenxuebing@jari.cn> Link: https://lore.kernel.org/r/12e4cf06.a35.180fa748c29.Coremail.chenxuebing@jari.cnSigned-off-by:
Vinod Koul <vkoul@kernel.org>
-
Julia Lawall authored
Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by:
Julia Lawall <Julia.Lawall@inria.fr> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20220521111145.81697-17-Julia.Lawall@inria.frSigned-off-by:
Vinod Koul <vkoul@kernel.org>
-
Julia Lawall authored
Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by:
Julia Lawall <Julia.Lawall@inria.fr> Acked-by:
Paul Cercueil <paul@crapouillou.net> Link: https://lore.kernel.org/r/20220521111145.81697-20-Julia.Lawall@inria.frSigned-off-by:
Vinod Koul <vkoul@kernel.org>
-
Julia Lawall authored
Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by:
Julia Lawall <Julia.Lawall@inria.fr> Acked-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20220521111145.81697-46-Julia.Lawall@inria.frSigned-off-by:
Vinod Koul <vkoul@kernel.org>
-
Julia Lawall authored
Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by:
Julia Lawall <Julia.Lawall@inria.fr> Link: https://lore.kernel.org/r/20220521111145.81697-62-Julia.Lawall@inria.frSigned-off-by:
Vinod Koul <vkoul@kernel.org>
-
Julia Lawall authored
Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by:
Julia Lawall <Julia.Lawall@inria.fr> Link: https://lore.kernel.org/r/20220521111145.81697-7-Julia.Lawall@inria.frSigned-off-by:
Vinod Koul <vkoul@kernel.org>
-
Julia Lawall authored
Spelling mistake (triple letters) in comment. Detected with the help of Coccinelle. Signed-off-by:
Julia Lawall <Julia.Lawall@inria.fr> Link: https://lore.kernel.org/r/20220521111145.81697-61-Julia.Lawall@inria.frSigned-off-by:
Vinod Koul <vkoul@kernel.org>
-
Julia Lawall authored
Spelling mistakes (triple letters) in comments. Detected with the help of Coccinelle. Signed-off-by:
Julia Lawall <Julia.Lawall@inria.fr> Link: https://lore.kernel.org/r/20220521111145.81697-51-Julia.Lawall@inria.frSigned-off-by:
Vinod Koul <vkoul@kernel.org>
-
Tang Bin authored
In the function xilinx_dpdma_probe(), when get irq failed, the function platform_get_irq() logs an error message, so remove redundant message here. Signed-off-by:
Tang Bin <tangbin@cmss.chinamobile.com> Link: https://lore.kernel.org/r/20220519130855.7664-1-tangbin@cmss.chinamobile.comSigned-off-by:
Vinod Koul <vkoul@kernel.org>
-
- 05 Jul, 2022 1 commit
-
-
Samuel Holland authored
The sun4i DMA engine supports transfer sizes up to 128k for normal DMA and 16M for dedicated DMA, as documented in the A10 and A20 manuals. Since this is larger than the default segment size limit (64k), exposing the real limit reduces the number of transfers needed for a transaction. However, because the device can only report one segment size limit, we have to expose the smaller limit from normal DMA. One complication is that the driver combines pairs of periodic transfers to reduce programming overhead. This only works when the period size is at most half of the maximum transfer size. With the default 64k segment size limit, this was always the case, but for normal DMA it is no longer guaranteed. Skip the optimization if the period is too long; even without it, the overhead is less than before. Signed-off-by:
Samuel Holland <samuel@sholland.org> Link: https://lore.kernel.org/r/20220621031350.36187-1-samuel@sholland.orgSigned-off-by:
Vinod Koul <vkoul@kernel.org>
-
- 01 Jul, 2022 7 commits
-
-
Colin Ian King authored
The pointer last_sg is being assigned a value at the start of a loop however it is never read and is being re-assigned later on in both brances of an if-statement. The assignment is redundant and can be removed. Cleans up clang scan-build warning: drivers/dma/fsl-edma-common.c:563:3: warning: Value stored to 'last_sg' is never read [deadcode.DeadStores] Signed-off-by:
Colin Ian King <colin.i.king@gmail.com> Link: https://lore.kernel.org/r/20220614184759.164379-1-colin.i.king@gmail.comSigned-off-by:
Vinod Koul <vkoul@kernel.org>
-
Xiang wangx authored
Delete the redundant word 'be'. Signed-off-by:
Xiang wangx <wangxiang@cdjrlc.com> Link: https://lore.kernel.org/r/20220618130120.9783-1-wangxiang@cdjrlc.comSigned-off-by:
Vinod Koul <vkoul@kernel.org>
-
Xiang wangx authored
Delete the redundant word 'the'. Signed-off-by:
Xiang wangx <wangxiang@cdjrlc.com> Link: https://lore.kernel.org/r/20220618130349.11507-1-wangxiang@cdjrlc.comSigned-off-by:
Vinod Koul <vkoul@kernel.org>
-
Peng Fan authored
Convert the eDMA controller binding to DT schema. Reviewed-by:
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by:
Peng Fan <peng.fan@nxp.com> Link: https://lore.kernel.org/r/20220620020002.3966343-1-peng.fan@oss.nxp.comSigned-off-by:
Vinod Koul <vkoul@kernel.org>
-
Jiang Jian authored
Remove the repeated word 'and' from comments Signed-off-by:
Jiang Jian <jiangjian@cdjrlc.com> Link: https://lore.kernel.org/r/20220622143158.15091-1-jiangjian@cdjrlc.comSigned-off-by:
Vinod Koul <vkoul@kernel.org>
-
Fabio Estevam authored
On SoCs with several SDMA instances, such as i.MX8M for example, all the SDMA related interrupts appear with the same "sdma" name. Improve the SDMA irq name by associating it with the SDMA instance via dev_name(), so that the SDMA irq names can be unique. Signed-off-by:
Fabio Estevam <festevam@denx.de> Link: https://lore.kernel.org/r/20220623123353.2570410-1-festevam@gmail.comSigned-off-by:
Vinod Koul <vkoul@kernel.org>
-
Jayesh Choudhary authored
Add endpoint configuration for the four ingress and two egress threads for main domain crypto accelerator. Signed-off-by:
Jayesh Choudhary <j-choudhary@ti.com> Link: https://lore.kernel.org/r/20220628050232.331956-1-j-choudhary@ti.comSigned-off-by:
Vinod Koul <vkoul@kernel.org>
-
- 27 Jun, 2022 1 commit
-
-
Christoph Hellwig authored
This was removed before due to the complete lack of users, but 3218910f ("dmaengine: Add core function and capability check for DMA_MEMCPY_SG") and 29cf37fa ("dmaengine: Add consumer for the new DMA_MEMCPY_SG API function.") added it back despite still not having any users whatsoever. Fixes: 3218910f ("dmaengine: Add core function and capability check for DMA_MEMCPY_SG") Fixes: 29cf37fa ("dmaengine: Add consumer for the new DMA_MEMCPY_SG API function.") Signed-off-by:
Christoph Hellwig <hch@lst.de> Acked-by:
Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/20220606074733.622616-1-hch@lst.deSigned-off-by:
Vinod Koul <vkoul@kernel.org>
-
- 16 Jun, 2022 5 commits
-
-
Alexey Khoroshilov authored
Local variable chan is initialized by an address of element of chan array that is part of stm32_mdma_device struct, so it does not make sense to compare chan with NULL. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by:
Alexey Khoroshilov <khoroshilov@ispras.ru> Fixes: a4ffb13c ("dmaengine: Add STM32 MDMA driver") Reviewed-by:
Amelie Delaunay <amelie.delaunay@foss.st.com> Link: https://lore.kernel.org/r/1655072638-9103-1-git-send-email-khoroshilov@ispras.ruSigned-off-by:
Vinod Koul <vkoul@kernel.org>
-
Dave Jiang authored
Add Fenghua as maintainer of the idxd driver. Signed-off-by:
Fenghua Yu <fenghua.yu@intel.com> Signed-off-by:
Dave Jiang <dave.jiang@intel.com> Link: https://lore.kernel.org/r/20220615232651.177098-1-fenghua.yu@intel.comSigned-off-by:
Vinod Koul <vkoul@kernel.org>
-
Geert Uytterhoeven authored
If CONFIG_PHYS_ADDR_T_64BIT is not set: drivers/dma/apple-admac.c: In function ‘admac_cyclic_write_one_desc’: drivers/dma/apple-admac.c:213:22: error: right shift count >= width of type [-Werror=shift-count-overflow] 213 | writel_relaxed(addr >> 32, ad->base + REG_DESC_WRITE(channo)); | ^~ Fix this by using the {low,upp}er_32_bits() helper macros to obtain the address parts. Reported-by: noreply@ellerman.id.au Fixes: b127315d ("dmaengine: apple-admac: Add Apple ADMAC driver") Acked-by:
Martin Povišer <povik+lin@cutebit.org> Signed-off-by:
Geert Uytterhoeven <geert@linux-m68k.org> Link: https://lore.kernel.org/r/20220616141312.1953819-1-geert@linux-m68k.orgSigned-off-by:
Vinod Koul <vkoul@kernel.org>
-
Lukas Bulwahn authored
Maintainers of the directory Documentation/devicetree/bindings/dma are also the maintainers of the corresponding directory include/dt-bindings/dma. Add the file entry for include/dt-bindings/dma to the appropriate section in MAINTAINERS. Signed-off-by:
Lukas Bulwahn <lukas.bulwahn@gmail.com> Link: https://lore.kernel.org/r/20220613110326.18126-1-lukas.bulwahn@gmail.comSigned-off-by:
Vinod Koul <vkoul@kernel.org>
-
Rob Herring authored
Commit 873971f8 ("dt-bindings: dma: Add Apple ADMAC") has a warning in its example: Documentation/devicetree/bindings/dma/apple,admac.example.dtb: dma-controller@238200000: interrupts-extended: [[0], [4294967295, 0, 626, 4, 0, 0]] is too short From schema: /builds/robherring/linux-dt/Documentation/devicetree/bindings/dma/apple,admac.yaml The problem is the number of interrupt cells can't be guessed when there are empty '0' entries. So the example must have a valid interrupt controller defining the number of interrupt cells. Fixes: 873971f8 ("dt-bindings: dma: Add Apple ADMAC") Signed-off-by:
Rob Herring <robh@kernel.org> Acked-by:
Martin Povišer <povik+lin@cutebit.org> Link: https://lore.kernel.org/r/20220614152503.1410755-1-robh@kernel.orgSigned-off-by:
Vinod Koul <vkoul@kernel.org>
-
- 10 Jun, 2022 1 commit
-
-
Vladimir Zapolskiy authored
After adding commit 8fc5133d ("dmaengine: dw-edma: Fix unaligned 64bit access") two branches under macro conditional become identical, thus the code can be simplified without any functional change. Signed-off-by:
Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Acked-by:
Herve Codina <herve.codina@bootlin.com> Link: https://lore.kernel.org/r/20220610100700.2295522-1-vladimir.zapolskiy@linaro.orgSigned-off-by:
Vinod Koul <vkoul@kernel.org>
-