<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/rust/kernel/dma.rs, branch v6.15</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.15</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.15'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2025-03-24T19:14:10Z</updated>
<entry>
<title>rust: dma: add `Send` implementation for `CoherentAllocation`</title>
<updated>2025-03-24T19:14:10Z</updated>
<author>
<name>Danilo Krummrich</name>
<email>dakr@kernel.org</email>
</author>
<published>2025-03-24T17:40:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=28bb48c4cb34f65a9aa602142e76e1426da31293'/>
<id>urn:sha1:28bb48c4cb34f65a9aa602142e76e1426da31293</id>
<content type='text'>
Stephen found a future build failure in linux-next [1]:

    error[E0277]: `*mut MyStruct` cannot be sent between threads safely
      --&gt; samples/rust/rust_dma.rs:47:22
       |
    47 | impl pci::Driver for DmaSampleDriver {
       |                      ^^^^^^^^^^^^^^^ `*mut MyStruct` cannot be sent between threads safely

It is caused by the interaction between commit 935e1d90bf6f ("rust: pci:
require Send for Driver trait implementers") from the driver-core tree,
which fixes a missing concurrency requirement, and commit 9901addae63b
("samples: rust: add Rust dma test sample driver") which adds a sample
that does not satisfy that requirement.

Add a `Send` implementation to `CoherentAllocation`, which allows the
sample (and other future users) to satisfy it.

Reported-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Closes: https://lore.kernel.org/linux-next/20250324215702.1515ba92@canb.auug.org.au/ [1]
Signed-off-by: Danilo Krummrich &lt;dakr@kernel.org&gt;
Reviewed-by: Boqun Feng &lt;boqun.feng@gmail.com&gt;
Link: https://lore.kernel.org/r/20250324174048.1075597-1-ojeda@kernel.org
[ Added number to Closes. Fix typo spotted by Boqun. - Miguel ]
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
</entry>
<entry>
<title>rust: add dma coherent allocator abstraction</title>
<updated>2025-03-20T20:44:46Z</updated>
<author>
<name>Abdiel Janulgue</name>
<email>abdiel.janulgue@gmail.com</email>
</author>
<published>2025-03-17T18:52:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ad2907b4e308a93deac93ff408f8bbbcac333905'/>
<id>urn:sha1:ad2907b4e308a93deac93ff408f8bbbcac333905</id>
<content type='text'>
Add a simple dma coherent allocator rust abstraction. Based on
Andreas Hindborg's dma abstractions from the rnvme driver, which
was also based on earlier work by Wedson Almeida Filho.

Reviewed-by: Alice Ryhl &lt;aliceryhl@google.com&gt;
Signed-off-by: Abdiel Janulgue &lt;abdiel.janulgue@gmail.com&gt;
Acked-by: Danilo Krummrich &lt;dakr@kernel.org&gt;
Link: https://lore.kernel.org/r/20250317185345.2608976-3-abdiel.janulgue@gmail.com
Nacked-by: Christoph Hellwig &lt;hch@lst.de&gt;
[ Removed period. - Miguel ]
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
</entry>
</feed>
