[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <dd57c3ba-246e-414d-a9c1-eb2cff032d83@arm.com>
Date: Mon, 17 Feb 2025 13:52:46 +0000
From: Robin Murphy <robin.murphy@....com>
To: Daniel Almeida <daniel.almeida@...labora.com>,
Abdiel Janulgue <abdiel.janulgue@...il.com>
Cc: rust-for-linux@...r.kernel.org, dakr@...nel.org, aliceryhl@...gle.com,
Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...il.com>,
Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <benno.lossin@...ton.me>,
Andreas Hindborg <a.hindborg@...nel.org>, Trevor Gross <tmgross@...ch.edu>,
Valentin Obst <kernel@...entinobst.de>,
open list <linux-kernel@...r.kernel.org>, Christoph Hellwig <hch@....de>,
Marek Szyprowski <m.szyprowski@...sung.com>, airlied@...hat.com,
"open list:DMA MAPPING HELPERS" <iommu@...ts.linux.dev>
Subject: Re: [PATCH v11 2/3] rust: add dma coherent allocator abstraction.
On 15/02/2025 9:40 pm, Daniel Almeida wrote:
> Hi Abdiel
>
> I noticed that there’s no API to call `dma_set_mask/dma_set_coherent_mask`.
>
> This should probably be included, i.e.:
>
> ```
> By default, the kernel assumes that your device can address 32-bits of DMA addressing.
> For a 64-bit capable device, this needs to be increased, and for a device with limitations,
> it needs to be decreased.
> ```
Oh, good point (and I'm rather ashamed I missed that!)
FWIW we've been wanting to steer away from relying on the default mask
in new code, so it would be quite neat to actually enforce that
allocations fail if dma_coherent_mask hasn't been explicitly set
(assuming it's sufficiently cheap to keep a flag in the Device handle or
something like that - it's not the end of the world if it isn't practical).
Thanks,
Robin.
Powered by blists - more mailing lists