[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2025071648-aflutter-crinkle-729c@gregkh>
Date: Wed, 16 Jul 2025 19:28:08 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: Danilo Krummrich <dakr@...nel.org>
Cc: abdiel.janulgue@...il.com, daniel.almeida@...labora.com,
robin.murphy@....com, a.hindborg@...nel.org, ojeda@...nel.org,
alex.gaynor@...il.com, boqun.feng@...il.com, gary@...yguo.net,
bjorn3_gh@...tonmail.com, lossin@...nel.org, aliceryhl@...gle.com,
tmgross@...ch.edu, bhelgaas@...gle.com, kwilczynski@...nel.org,
rafael@...nel.org, rust-for-linux@...r.kernel.org,
linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 0/5] dma::Device trait and DMA mask
On Wed, Jul 16, 2025 at 05:02:45PM +0200, Danilo Krummrich wrote:
> This patch series adds the dma::Device trait to be implemented by bus devices on
> DMA capable busses.
>
> The dma::Device trait implements methods to set the DMA mask for for such
> devices.
>
> The first two bus devices implementing the trait are PCI and platform.
>
> Unfortunately, the DMA mask setters have to be unsafe for now, since, with
> reasonable effort, we can't prevent drivers from data races writing and reading
> the DMA mask fields concurrently (see also [1]).
>
> Link: https://lore.kernel.org/lkml/DB6YTN5P23X3.2S0NH4YECP1CP@kernel.org/ [1]
> Link: https://git.kernel.org/pub/scm/linux/kernel/git/dakr/linux.git/log/?h=rust/dma-mask
>
> Changes in v2:
> - replace dma_bit_mask() with a new type DmaMask
> - mention that DmaMask is the Rust equivalent of the C macro DMA_BIT_MASK()
> - make DmaMask::new() fallible
> - inline DmaMask methods
I like the DmaMask stuff, nice!
Reviewed-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Powered by blists - more mailing lists