[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87zfiico74.fsf@kernel.org>
Date: Wed, 19 Feb 2025 09:51:11 +0100
From: Andreas Hindborg <a.hindborg@...nel.org>
To: "Asahi Lina" <lina@...hilina.net>
Cc: "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>, "Alice Ryhl" <aliceryhl@...gle.com>,
"Trevor Gross" <tmgross@...ch.edu>, "Jann Horn" <jannh@...gle.com>,
"Matthew Wilcox" <willy@...radead.org>, "Paolo Bonzini"
<pbonzini@...hat.com>, "Danilo Krummrich" <dakr@...nel.org>, "Wedson
Almeida Filho" <wedsonaf@...il.com>, "Valentin Obst"
<kernel@...entinobst.de>, "Andrew Morton" <akpm@...ux-foundation.org>,
<linux-mm@...ck.org>, <airlied@...hat.com>, "Abdiel Janulgue"
<abdiel.janulgue@...il.com>, <rust-for-linux@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <asahi@...ts.linux.dev>
Subject: Re: [PATCH 4/6] rust: addr: Add a module to declare core address types
"Asahi Lina" <lina@...hilina.net> writes:
> Encapsulates the core physical/DMA address types, so they can be used by
> Rust abstractions.
>
> Signed-off-by: Asahi Lina <lina@...hilina.net>
> ---
> rust/kernel/addr.rs | 15 +++++++++++++++
> rust/kernel/lib.rs | 1 +
> 2 files changed, 16 insertions(+)
>
> diff --git a/rust/kernel/addr.rs b/rust/kernel/addr.rs
> new file mode 100644
> index 0000000000000000000000000000000000000000..06aff10a0332355597060c5518d7fd6e114cf630
> --- /dev/null
> +++ b/rust/kernel/addr.rs
> @@ -0,0 +1,15 @@
> +// SPDX-License-Identifier: GPL-2.0
> +
> +//! Kernel core address types.
How about just "Kernel address tyeps"? What does "core" mean here?
> +
> +use bindings;
> +use core::ffi;
> +
> +/// A physical memory address (which may be wider than the CPU pointer size)
Missing period at end of sentence.
> +pub type PhysicalAddr = bindings::phys_addr_t;
> +/// A DMA memory address (which may be narrower than `PhysicalAddr` on some systems)
Same.
> +pub type DmaAddr = bindings::dma_addr_t;
> +/// A physical resource size, typically the same width as `PhysicalAddr`
Same.
Best regards,
Andreas Hindborg
Powered by blists - more mailing lists