- 08 1月, 2019 1 次提交
-
-
由 Luis Chamberlain 提交于
We already need to zero out memory for dma_alloc_coherent(), as such using dma_zalloc_coherent() is superflous. Phase it out. This change was generated with the following Coccinelle SmPL patch: @ replace_dma_zalloc_coherent @ expression dev, size, data, handle, flags; @@ -dma_zalloc_coherent(dev, size, handle, flags) +dma_alloc_coherent(dev, size, handle, flags) Suggested-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NLuis Chamberlain <mcgrof@kernel.org> [hch: re-ran the script on the latest tree] Signed-off-by: NChristoph Hellwig <hch@lst.de>
-
- 17 12月, 2018 9 次提交
-
-
由 Joerg Roedel 提交于
Use Use device_iommu_mapped() to check if the device is already mapped by an IOMMU. Acked-by: NVinod Koul <vkoul@kernel.org> Signed-off-by: NJoerg Roedel <jroedel@suse.de>
-
由 Yangtao Li 提交于
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: NYangtao Li <tiny.windzz@gmail.com> Acked-by: NSinan Kaya <okaya@kernel.org> Signed-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Yangtao Li 提交于
We already have the DEFINE_SHOW_ATTRIBUTE, There is no need to define such a macro, so remove DBGFS_FUNC_DECL. Signed-off-by: NYangtao Li <tiny.windzz@gmail.com> Acked-by: NRobert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Yangtao Li 提交于
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: NYangtao Li <tiny.windzz@gmail.com> Signed-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Yangtao Li 提交于
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: NYangtao Li <tiny.windzz@gmail.com> Signed-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Seraj Alijan 提交于
Existing transfer size "len" is either generated randomly or set to the size of test_buf_size. In some cases we need to explicitly specify a transfer size that is different from the buffer size and non aligned to test the target device's ability to handle unaligned transfers. This patch adds optional parameter "transfer_size" to allow setting explicit transfer size for dma transfers. Signed-off-by: NSeraj Alijan <seraj.alijan@sondrel.com> Signed-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Seraj Alijan 提交于
Add parameter "alignment" to allow setting the address alignment manually. Having the ability to configure address alignment from user space adds new testing capabilities where different alignments can be configured for testing without having to modify the dma device alignment properties. If configured, the alignment value will override the device alignment property of the target device. Signed-off-by: NSeraj Alijan <seraj.alijan@sondrel.com> Signed-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Seraj Alijan 提交于
Use fixed point division to calculate iops to prevent reporting 0 iops when operations last for longer than a second. Signed-off-by: NSeraj Alijan <seraj.alijan@sondrel.com> Signed-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Seraj Alijan 提交于
Add support for running tests on multiple channels simultaneously as the driver currently limits to 1 channel per test run. This will add support for stress testing DMA controllers with multi channel capabilities. This is done by adding a callback function to the "channel" parameter that registers the requested channel prior to the "run" parameter being set to 1. Each time the "channel" parameter is populated with a new dma channel, a new test is appended to the thread queue. Once the "run" parameter is set to 1, the test will kick start all pending threads. Signed-off-by: NSeraj Alijan <seraj.alijan@sondrel.com> Signed-off-by: NVinod Koul <vkoul@kernel.org>
-
- 07 12月, 2018 1 次提交
-
-
由 Andy Shevchenko 提交于
Intel Merrifield has a reduced size of FIFO used in iDMA 32-bit controller, i.e. 512 bytes instead of 1024. Fix this by partitioning it as 64 bytes per channel. Note, in the future we might switch to 'fifo-size' property instead of hard coded value. Fixes: 199244d6 ("dmaengine: dw: add support of iDMA 32-bit hardware") Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: stable@vger.kernel.org Signed-off-by: NVinod Koul <vkoul@kernel.org>
-
- 05 12月, 2018 15 次提交
-
-
由 Michael Tretter 提交于
All device_prep_dma_* functions and device_issue_pending can be called from an interrupt context. As this includes hard IRQs, we must use spin_lock_irqsave() instead of spin_lock_bh() to access chan->lock. Signed-off-by: NMichael Tretter <m.tretter@pengutronix.de> Signed-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Eric Long 提交于
Add me as one of the module authors. Signed-off-by: NEric Long <eric.long@spreadtrum.com> Signed-off-by: NBaolin Wang <baolin.wang@linaro.org> Signed-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Eric Long 提交于
The Spreadtrum DMA controller supports channel 2-stage tansfer mode, that means we can request 2 dma channels, one for source channel, and another one for destination channel. Once the source channel's transaction is done, it will trigger the destination channel's transaction automatically by hardware signal. Signed-off-by: NEric Long <eric.long@spreadtrum.com> Signed-off-by: NBaolin Wang <baolin.wang@linaro.org> Signed-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Eric Long 提交于
The Spreadtrum DMA link-list mode is always one cyclic transfer, so we should clear the SPRD_DMA_LLIST_END flag for the link-list configuration. Moreover add cyclic callback support for the cyclic transfer. Signed-off-by: NEric Long <eric.long@spreadtrum.com> Signed-off-by: NBaolin Wang <baolin.wang@linaro.org> Signed-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Eric Long 提交于
It will be failed to start one new transfer if the channel started one none interrupt transfer before, since we will only set the schan->cur_desc as NULL depending on the transfer interrupt now. Thus we should set schan->cur_desc as NULL when free or terminate one dma channel to avoid this issue. Signed-off-by: NEric Long <eric.long@spreadtrum.com> Signed-off-by: NBaolin Wang <baolin.wang@linaro.org> Signed-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Eric Long 提交于
We will pass sglen as 0 configure the last link-list configuration when filling the descriptor, which will cause the incorrect link-list configuration. Thus we should check if the sglen is 0 to configure the correct link-list configuration. Signed-off-by: NEric Long <eric.long@spreadtrum.com> Signed-off-by: NBaolin Wang <baolin.wang@linaro.org> Signed-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Eric Long 提交于
Add one field to save the transfer direction for struct sprd_dma_desc, which is used to get correct transfer residue depending on the transfer direction. [Baolin Wang adds one field to present the transfer direction] Signed-off-by: NEric Long <eric.long@spreadtrum.com> Signed-off-by: NBaolin Wang <baolin.wang@linaro.org> Signed-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Baolin Wang 提交于
The direction field of struct dma_slave_config was marked deprecated, thus remove the usage. Signed-off-by: NBaolin Wang <baolin.wang@linaro.org> Signed-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Bin Liu 提交于
The driver defines three states for a cppi channel. - idle: .chan_busy == 0 && not in .pending list - pending: .chan_busy == 0 && in .pending list - busy: .chan_busy == 1 && not in .pending list There are cases in which the cppi channel could be in the pending state when cppi41_dma_issue_pending() is called after cppi41_runtime_suspend() is called. cppi41_stop_chan() has a bug for these cases to set channels to idle state. It only checks the .chan_busy flag, but not the .pending list, then later when cppi41_runtime_resume() is called the channels in .pending list will be transitioned to busy state. Removing channels from the .pending list solves the problem. Fixes: 975faaeb ("dma: cppi41: start tear down only if channel is busy") Cc: stable@vger.kernel.org # v3.15+ Signed-off-by: NBin Liu <b-liu@ti.com> Reviewed-by: NPeter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Lucas Stach 提交于
DMA buffer descriptors aren't allocated from atomic context, so they can use the less heavyweigth GFP_NOWAIT. Signed-off-by: NLucas Stach <l.stach@pengutronix.de> Signed-off-by: NRobin Gong <yibin.gong@nxp.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Lucas Stach 提交于
The dmaengine documentation states that device_terminate_all may be asynchronous and need not wait for the active transfers to stop. This allows us to move most of the functionality currently implemented in the sdma channel termination function to run in a worker, outside of any atomic context. Moving this out of atomic context has two benefits: we can now sleep while waiting for the channel to terminate, instead of busy waiting and the freeing of the dma descriptors happens with IRQs enabled, getting rid of a warning in the dma mapping code. As the termination is now async, we need to implement the device_synchronize dma engine function which simply waits for the worker to finish its execution. Signed-off-by: NLucas Stach <l.stach@pengutronix.de> Signed-off-by: NRobin Gong <yibin.gong@nxp.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Lucas Stach 提交于
This reverts commit fe5b85c6. The SDMA engine needs the descriptors to be contiguous in memory. As the dma pool API is only able to provide a single descriptor per alloc invocation there is no guarantee that multiple descriptors satisfy this requirement. Also the code in question is broken as it only allocates memory for a single descriptor, without looking at the number of descriptors required for the transfer, leading to out-of-bounds accesses when the descriptors are written. Signed-off-by: NLucas Stach <l.stach@pengutronix.de> Signed-off-by: NRobin Gong <yibin.gong@nxp.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Lucas Stach 提交于
This reverts commit c1199875, as this depends on another commit that is going to be reverted. Signed-off-by: NLucas Stach <l.stach@pengutronix.de> Signed-off-by: NRobin Gong <yibin.gong@nxp.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Dan Carpenter 提交于
We recently moved the test size tests around but it means we need to adjust the error handling as well or we leak the "pq_coefs" memory. I updated the label name to reflect that we're freeing coefs. Fixes: 787d3083 ("dmaengine: dmatest: move size checks earlier in function") Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Geert Uytterhoeven 提交于
Renesas R-Mobile APE6 support is currently unused: - DMA slaves were never enabled in r8a73a4.dtsi, - The driver relies on legacy filter matching and describing all slaves and MID/RIDs in a table, unlike modern DMA engine drivers for similar hardware like rcar-dmac, - The driver doesn't seem to work well. Remove the driver, it can be resurrected from git history when needed. As this was the last user of SH_DMAE_BASE on Renesas ARM SoCs, the sh-dma-engine driver core is now used on SuperH only. Note that the DT bindings are still present, as r8a73a4.dtsi uses them. Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: NUlrich Hecht <uli+renesas@fpond.eu> Reviewed-by: NSimon Horman <horms+renesas@verge.net.au> Signed-off-by: NVinod Koul <vkoul@kernel.org>
-
- 04 12月, 2018 1 次提交
-
-
由 Robert Jarzmik 提交于
As the pxa architecture and all its related drivers do not rely anymore on the filter function, thanks to the slave map conversion, make pxad_filter_fn() static, and remove it from the global namespace. Signed-off-by: NRobert Jarzmik <robert.jarzmik@free.fr> Acked-by: NVinod Koul <vkoul@kernel.org>
-
- 29 11月, 2018 2 次提交
-
-
由 Richard Genoud 提交于
of_dma_controller_free() was not called on module onloading. This lead to a soft lockup: watchdog: BUG: soft lockup - CPU#0 stuck for 23s! Modules linked in: at_hdmac [last unloaded: at_hdmac] when of_dma_request_slave_channel() tried to call ofdma->of_dma_xlate(). Cc: stable@vger.kernel.org Fixes: bbe89c8e ("at_hdmac: move to generic DMA binding") Acked-by: NLudovic Desroches <ludovic.desroches@microchip.com> Signed-off-by: NRichard Genoud <richard.genoud@gmail.com> Signed-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Richard Genoud 提交于
The leak was found when opening/closing a serial port a great number of time, increasing kmalloc-32 in slabinfo. Each time the port was opened, dma_request_slave_channel() was called. Then, in at_dma_xlate(), atslave was allocated with devm_kzalloc() and never freed. (Well, it was free at module unload, but that's not what we want). So, here, kzalloc is more suited for the job since it has to be freed in atc_free_chan_resources(). Cc: stable@vger.kernel.org Fixes: bbe89c8e ("at_hdmac: move to generic DMA binding") Reported-by: NMario Forner <m.forner@be4energy.com> Suggested-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Acked-by: NAlexandre Belloni <alexandre.belloni@bootlin.com> Acked-by: NLudovic Desroches <ludovic.desroches@microchip.com> Signed-off-by: NRichard Genoud <richard.genoud@gmail.com> Signed-off-by: NVinod Koul <vkoul@kernel.org>
-
- 26 11月, 2018 1 次提交
-
-
由 Vinod Koul 提交于
Commit 627469e4 ("dmaengine: coh901318: Fix a double-lock bug") left flags variable unused, so remove it to fix the warning. drivers/dma/coh901318.c: In function 'coh901318_config': drivers/dma/coh901318.c:1805:16: warning: unused variable 'flags' [-Wunused-variable] unsigned long flags; ^~~~~ Fixes: 627469e4 ("dmaengine: coh901318: Fix a double-lock bug") Reported-By: NStephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: NVinod Koul <vkoul@kernel.org>
-
- 24 11月, 2018 10 次提交
-
-
由 Vinod Koul 提交于
dma_slave_config direction was marked as deprecated quite some time back, remove the usage from this driver so that the field can be removed Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Vinod Koul 提交于
dma_slave_config direction was marked as deprecated quite some time back, remove the usage from this driver so that the field can be removed Signed-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Vinod Koul 提交于
dma_slave_config direction was marked as deprecated quite some time back, remove the usage from this driver so that the field can be removed ENBLn bit should be set before any dma request triggered, please refer to the below information from i.mx6sololite RM. Otherwise, spi/uart test will be fail because there is dma request from tx fifo always before dmaengine_prep_slave_sg() in where ENBLn set and violate the below rule. https://www.nxp.com/docs/en/reference-manual/IMX6SLRM.pdf: 40.8.28 Channel Enable RAM (SDMAARM_CHNENBLn) "It is thus essential for the Arm platform to program them before any DMA request is triggered to the SDMA, otherwise an unpredictable combination of channels may be started". Signed-off-by: NRobin Gong <yibin.gong@nxp.com> [vkoul: sqashed patch from Robin into direction change] Signed-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Christian Lamparter 提交于
This patch adds a new device-tree property that allows to specify the dma protection control bits for the all of the DMA controller's channel uniformly. Setting the "correct" bits can have a huge impact on the PPC460EX and APM82181 that use this DMA engine in combination with a DesignWare' SATA-II core (sata_dwc_460ex driver). In the OpenWrt Forum, the user takimata reported that: |It seems your patch unleashed the full power of the SATA port. |Where I was previously hitting a really hard limit at around |82 MB/s for reading and 27 MB/s for writing, I am now getting this: | |root@OpenWrt:/mnt# time dd if=/dev/zero of=tempfile bs=1M count=1024 |1024+0 records in |1024+0 records out |real 0m 13.65s |user 0m 0.01s |sys 0m 11.89s | |root@OpenWrt:/mnt# time dd if=tempfile of=/dev/null bs=1M count=1024 |1024+0 records in |1024+0 records out |real 0m 8.41s |user 0m 0.01s |sys 0m 4.70s | |This means: 121 MB/s reading and 75 MB/s writing! | |The drive is a WD Green WD10EARX taken from an older MBL Single. |I repeated the test a few times with even larger files to rule out |any caching, I'm still seeing the same great performance. OpenWrt is |now completely on par with the original MBL firmware's performance. Another user And.short reported: |I can report that your fix worked! Boots up fine with two |drives even with more partitions, and no more reboot on |concurrent disk access! A closer look into the sata_dwc_460ex code revealed that the driver did initally set the correct protection control bits. However, this feature was lost when the sata_dwc_460ex driver was converted to the generic DMA driver framework. BugLink: https://forum.openwrt.org/t/wd-mybook-live-duo-two-disks/16195/55 BugLink: https://forum.openwrt.org/t/wd-mybook-live-duo-two-disks/16195/50 Fixes: 8b344485 ("sata_dwc_460ex: move to generic DMA driver") Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NChristian Lamparter <chunkeey@gmail.com> Signed-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Jia-Ju Bai 提交于
The function coh901318_alloc_chan_resources() calls spin_lock_irqsave() before calling coh901318_config(). But coh901318_config() calls spin_lock_irqsave() again in its definition, which may cause a double-lock bug. Because coh901318_config() is only called by coh901318_alloc_chan_resources(), the bug fix is to remove the calls to spin-lock and -unlock functions in coh901318_config(). Signed-off-by: NJia-Ju Bai <baijiaju1990@gmail.com> Reviewed-by: NLinus Walleij <linus.walleij@linaro.org> Signed-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Masahiro Yamada 提交于
The MIO DMAC (Media IO DMA Controller) is used in UniPhier LD4, Pro4, and sLD8 SoCs. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Alexandru Ardelean 提交于
There's no need to allocate all that memory if these sizes are invalid anyway. Signed-off-by: NAlexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Alexandru Ardelean 提交于
The `dmaengine_terminate_all()` is marked as deprecated, so update the test with `dmaengine_terminate_sync()` which is the recommended alternative. Signed-off-by: NAlexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Alexandru Ardelean 提交于
After the DMA transfer is done, we don't need to call the un-mapping code in 3 places. One is enough. Signed-off-by: NAlexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Nathan Chancellor 提交于
Clang warns: drivers/dma/xilinx/zynqmp_dma.c:166:4: warning: attribute 'aligned' is ignored, place it after "struct" to apply attribute to type declaration [-Wignored-attributes] }; __aligned(64) ^ ./include/linux/compiler_types.h:200:38: note: expanded from macro '__aligned' ^ 1 warning generated. As Nick pointed out in the previous version of this patch, the author likely intended for this struct to be 8-byte (64-bit) aligned, not 64-byte, which is the default. Remove the hanging __aligned attribute. Fixes: b0cc417c ("dmaengine: Add Xilinx zynqmp dma engine driver support") Reported-by: NNick Desaulniers <ndesaulniers@google.com> Suggested-by: NNick Desaulniers <ndesaulniers@google.com> Signed-off-by: NNathan Chancellor <natechancellor@gmail.com> Reviewed-by: NNick Desaulniers <ndesaulniers@google.com> Signed-off-by: NVinod Koul <vkoul@kernel.org>
-