<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/next/linux-next.git/drivers/dma/mmp_pdma.c, branch master</title>
<subtitle>The linux-next integration testing tree</subtitle>
<id>https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/atom?h=master</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/'/>
<updated>2026-09-22T11:56:16+00:00</updated>
<entry>
<title>Merge branch 'next' of https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git</title>
<updated>2026-09-22T11:56:16+00:00</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2026-09-22T11:56:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=61c971e265876a0c9b8df2bde8f2b531a8575cf0'/>
<id>urn:sha1:61c971e265876a0c9b8df2bde8f2b531a8575cf0</id>
<content type='text'>
# Conflicts:
#	Documentation/devicetree/bindings/usb/am33xx-usb.txt
#	Documentation/devicetree/bindings/usb/da8xx-usb.txt
</content>
</entry>
<entry>
<title>dmaengine: mmp_pdma: fix wrong sg length in mmp_pdma_prep_slave_sg()</title>
<updated>2026-09-15T16:27:40+00:00</updated>
<author>
<name>Baineng Shou</name>
<email>shoubaineng@gmail.com</email>
</author>
<published>2026-09-10T02:16:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=075bc7b1d3dde5ed43fbaabbc1a69f09b7fc3a47'/>
<id>urn:sha1:075bc7b1d3dde5ed43fbaabbc1a69f09b7fc3a47</id>
<content type='text'>
In mmp_pdma_prep_slave_sg(), for_each_sg() iterates the scatterlist
putting each entry into 'sg', but the entry length is read from 'sgl'
(the list head) instead of 'sg' (the current entry):

    for_each_sg(sgl, sg, sg_len, i) {
        addr = sg_dma_address(sg);
        avail = sg_dma_len(sgl);   /* should be 'sg' */

Consequently 'avail' is always the length of the first entry. For
multi-sg lists this causes out-of-bounds reads when a later entry is
shorter than the first, and silent data loss when it is longer.
Single-sg or uniformly-sized lists happen to mask the issue.

Fixes: c8acd6aa6bed3 ("dmaengine: mmp-pdma support")
Signed-off-by: Baineng Shou &lt;shoubaineng@gmail.com&gt;
Reviewed-by: Frank Li &lt;Frank.Li@nxp.com&gt;
Link: https://patch.msgid.link/20260910021652.1296640-1-shoubaineng@gmail.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: use dma_chan_name() helper to get per-channel device name</title>
<updated>2026-09-15T16:24:16+00:00</updated>
<author>
<name>Frank Li</name>
<email>Frank.Li@nxp.com</email>
</author>
<published>2026-09-09T16:22:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=76574306c1ac38137683c69407f0e7810f407e4d'/>
<id>urn:sha1:76574306c1ac38137683c69407f0e7810f407e4d</id>
<content type='text'>
Use the existing dma_chan_name() helper to obtain the per-channel device
name instead of open-coding: dev_name(chan-&gt;dev-&gt;device) /
dev_name(chan2dev()).

Simplify the code, improve consistency and reduce line wrapping where
possible.

No functional change intended.

Reviewed-by: Logan Gunthorpe &lt;logang@deltatee.com&gt;
Reviewed-by: Amelie Delaunay &lt;amelie.delaunay@foss.st.com&gt; # For STM32
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Frank Li &lt;Frank.Li@nxp.com&gt;
Link: https://patch.msgid.link/20260909-dma-chan_dev-rename-v4-2-d8fb6892a70f@nxp.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: mmp_pdma: fix wrong extended DRCMR base for SpacemiT K3</title>
<updated>2026-09-03T15:52:21+00:00</updated>
<author>
<name>Troy Mitchell</name>
<email>troy.mitchell@linux.spacemit.com</email>
</author>
<published>2026-07-27T08:26:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=d1fc569fcbc7be6de06b034cf954a95e30ca1fb2'/>
<id>urn:sha1:d1fc569fcbc7be6de06b034cf954a95e30ca1fb2</id>
<content type='text'>
The extended DRCMR window on SpacemiT K3 starts at 0x1100. Commit
6587b8661a0b ("dmaengine: mmp_pdma: add SpacemiT K3 support") incorrectly
set it to 0x1000, causing DRCMR accesses for request IDs &gt;= 64 to target
offsets 0x100 too low.

The 0x1100 base has been verified on K3 silicon using real SPI and QSPI
DMA transactions. The K3 DMA documentation [1] was updated on June 24,
2026, to reflect the corrected register addresses.

Drop the bogus DRCMR_EXT_BASE_K3 macro and reuse
DRCMR_EXT_BASE_DEFAULT for the K3 ops.

Fixes: 6587b8661a0b ("dmaengine: mmp_pdma: add SpacemiT K3 support")
Link: https://www.spacemit.com/community/document/info?nodepath=hardware/key_stone/k3/k3_docs/k3_usermanual/16_peripherals/dma.md&amp;lang=en [1]
Signed-off-by: Troy Mitchell &lt;troy.mitchell@linux.spacemit.com&gt;
Reviewed-by: Frank Li &lt;Frank.Li@nxp.com&gt;
Link: https://patch.msgid.link/20260727-k3-pdma-fix-drcmr-base-v2-1-afba55cba1f3@linux.spacemit.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: mmp_pdma: add SpacemiT K3 support</title>
<updated>2026-05-19T17:16:17+00:00</updated>
<author>
<name>Guodong Xu</name>
<email>guodong@riscstar.com</email>
</author>
<published>2026-05-18T03:32:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=6587b8661a0b61c2f4b260bfc9f0e9ef9de0ea2e'/>
<id>urn:sha1:6587b8661a0b61c2f4b260bfc9f0e9ef9de0ea2e</id>
<content type='text'>
SpacemiT K3 reuses most of the PDMA IP design found on K1, with one
difference being the extended DRCMR base address. Add "spacemit,k3-pdma"
compatible string and define a new mmp_pdma_ops for K3 PDMA.

Signed-off-by: Guodong Xu &lt;guodong@riscstar.com&gt;
Signed-off-by: Troy Mitchell &lt;troy.mitchell@linux.spacemit.com&gt;
Link: https://patch.msgid.link/20260518-k3-pdma-v6-3-67fdf319a8f8@linux.spacemit.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: mmp_pdma: refactor DRCMR access with helper function</title>
<updated>2026-05-19T17:16:17+00:00</updated>
<author>
<name>Guodong Xu</name>
<email>guodong@riscstar.com</email>
</author>
<published>2026-05-18T03:32:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=f46b47623e70dea8b03794a5420ffba060425e85'/>
<id>urn:sha1:f46b47623e70dea8b03794a5420ffba060425e85</id>
<content type='text'>
Refactor the DRCMR macro into a helper function mmp_pdma_get_drcmr()
to support variable extended DRCMR base addresses across different PDMA
implementations, such as SpacemiT K3.

Signed-off-by: Guodong Xu &lt;guodong@riscstar.com&gt;
Signed-off-by: Troy Mitchell &lt;troy.mitchell@linux.spacemit.com&gt;
Link: https://patch.msgid.link/20260518-k3-pdma-v6-2-67fdf319a8f8@linux.spacemit.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: mmp_pdma: Fix race condition in mmp_pdma_residue()</title>
<updated>2025-12-16T14:58:39+00:00</updated>
<author>
<name>Guodong Xu</name>
<email>guodong@riscstar.com</email>
</author>
<published>2025-12-16T14:10:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=a143545855bc2c6e1330f6f57ae375ac44af00a7'/>
<id>urn:sha1:a143545855bc2c6e1330f6f57ae375ac44af00a7</id>
<content type='text'>
Add proper locking in mmp_pdma_residue() to prevent use-after-free when
accessing descriptor list and descriptor contents.

The race occurs when multiple threads call tx_status() while the tasklet
on another CPU is freeing completed descriptors:

CPU 0                              CPU 1
-----                              -----
mmp_pdma_tx_status()
mmp_pdma_residue()
  -&gt; NO LOCK held
     list_for_each_entry(sw, ..)
                                   DMA interrupt
                                   dma_do_tasklet()
                                     -&gt; spin_lock(&amp;desc_lock)
                                        list_move(sw-&gt;node, ...)
                                        spin_unlock(&amp;desc_lock)
  |                                     dma_pool_free(sw) &lt;- FREED!
  -&gt; access sw-&gt;desc &lt;- UAF!

This issue can be reproduced when running dmatest on the same channel with
multiple threads (threads_per_chan &gt; 1).

Fix by protecting the chain_running list iteration and descriptor access
with the chan-&gt;desc_lock spinlock.

Signed-off-by: Juan Li &lt;lijuan@linux.spacemit.com&gt;
Signed-off-by: Guodong Xu &lt;guodong@riscstar.com&gt;
Link: https://patch.msgid.link/20251216-mmp-pdma-race-v1-1-976a224bb622@riscstar.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: mmp_pdma: fix DMA mask handling</title>
<updated>2025-12-14T09:17:23+00:00</updated>
<author>
<name>Guodong Xu</name>
<email>guodong@riscstar.com</email>
</author>
<published>2025-09-18T14:27:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=49400b701eca849c1b53717b1f5d779a8d066ec0'/>
<id>urn:sha1:49400b701eca849c1b53717b1f5d779a8d066ec0</id>
<content type='text'>
The driver's existing logic for setting the DMA mask for "marvell,pdma-1.0"
was flawed. It incorrectly relied on pdev-&gt;dev-&gt;coherent_dma_mask instead
of declaring the hardware's fixed addressing capability. A cleaner and
more correct approach is to define the mask directly based on the hardware
limitations.

The MMP/PXA PDMA controller is a 32-bit DMA engine. This is supported by
datasheets and various dtsi files for PXA25x, PXA27x, PXA3xx, and MMP2,
all of which are 32-bit systems.

This patch simplifies the driver's logic by replacing the 'u64 dma_mask'
field with a simpler 'u32 dma_width' to store the addressing capability
in bits. The complex if/else block in probe() is then replaced with a
single, clear call to dma_set_mask_and_coherent(). This sets a fixed
32-bit DMA mask for "marvell,pdma-1.0" and a 64-bit mask for
"spacemit,k1-pdma," matching each device's hardware capabilities.

Finally, this change also works around a specific build error encountered
with clang-20 on x86_64 allyesconfig. The shift-count-overflow error is
caused by a known clang compiler issue where the DMA_BIT_MASK(n) macro's
ternary operator is not correctly evaluated in static initializers. By
moving the macro's evaluation into the probe() function, the driver avoids
this compiler bug.

Fixes: 5cfe585d8624 ("dmaengine: mmp_pdma: Add SpacemiT K1 PDMA support with 64-bit addressing")
Reported-by: Naresh Kamboju &lt;naresh.kamboju@linaro.org&gt;
Closes: https://lore.kernel.org/lkml/CA+G9fYsPcMfW-e_0_TRqu4cnwqOqYF3aJOeKUYk6Z4qRStdFvg@mail.gmail.com
Suggested-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Guodong Xu &lt;guodong@riscstar.com&gt;
Reviewed-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Tested-by: Nathan Chancellor &lt;nathan@kernel.org&gt; # build
Tested-by: Naresh Kamboju &lt;naresh.kamboju@linaro.org&gt;
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: mmp_pdma: Add SpacemiT K1 PDMA support with 64-bit addressing</title>
<updated>2025-09-02T07:07:42+00:00</updated>
<author>
<name>Guodong Xu</name>
<email>guodong@riscstar.com</email>
</author>
<published>2025-08-22T03:06:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=5cfe585d8624f7482505183dd0e4c534b061e822'/>
<id>urn:sha1:5cfe585d8624f7482505183dd0e4c534b061e822</id>
<content type='text'>
Add support for SpacemiT K1 PDMA controller which features 64-bit
addressing capabilities.

The SpacemiT K1 PDMA extends the descriptor format with additional
32-bit words for high address bits, enabling access to memory beyond
4GB boundaries. The new spacemit_k1_pdma_ops provides necessary 64-bit
address handling functions and k1 specific controller configurations.

Key changes:
- Add ARCH_SPACEMIT dependency to Kconfig
- Define new high 32-bit address registers (DDADRH, DSADRH, DTADRH)
- Add DCSR_LPAEEN bit for Long Physical Address Extension Enable
- Implement 64-bit operations for SpacemiT K1 PDMA

Signed-off-by: Guodong Xu &lt;guodong@riscstar.com&gt;
Link: https://lore.kernel.org/r/20250822-working_dma_0701_v2-v5-5-f5c0eda734cc@riscstar.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>dmaengine: mmp_pdma: Add operations structure for controller abstraction</title>
<updated>2025-09-02T07:07:42+00:00</updated>
<author>
<name>Guodong Xu</name>
<email>guodong@riscstar.com</email>
</author>
<published>2025-08-22T03:06:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=35e40bf761fcb24b1355d6a8d48b5b10683fe1a3'/>
<id>urn:sha1:35e40bf761fcb24b1355d6a8d48b5b10683fe1a3</id>
<content type='text'>
Introduce mmp_pdma_ops structure to abstract 32-bit addressing operations
and enable support for different controller variants. This prepares for
adding 64-bit addressing support.

The ops structure includes:
- Hardware register operations (read/write DDADR, DSADR, DTADR)
- Descriptor memory operations (manipulate descriptor structs)
- Controller configuration (run bits, DMA mask)

Convert existing 32-bit operations to use the new abstraction layer
while maintaining backward compatibility.

Cc: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Signed-off-by: Guodong Xu &lt;guodong@riscstar.com&gt;
Link: https://lore.kernel.org/r/20250822-working_dma_0701_v2-v5-4-f5c0eda734cc@riscstar.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
</feed>
