Rust for Linux List
 help / color / mirror / Atom feed
* [PATCH v2 0/2] rust: add a few helpers
@ 2026-06-05 12:54 Andreas Hindborg
  2026-06-05 12:54 ` [PATCH v2 1/2] rust: add a wrapper for the `num_possible_cpus` C function Andreas Hindborg
  2026-06-05 12:54 ` [PATCH v2 2/2] rust: add a wrapper for the `nr_online_nodes` " Andreas Hindborg
  0 siblings, 2 replies; 9+ messages in thread
From: Andreas Hindborg @ 2026-06-05 12:54 UTC (permalink / raw)
  To: Miguel Ojeda, Gary Guo, Björn Roy Baron, Benno Lossin,
	Alice Ryhl, Trevor Gross, Danilo Krummrich, Boqun Feng,
	Thomas Gleixner, Peter Zijlstra, Boqun Feng
  Cc: Dirk Behme, linux-kernel, rust-for-linux, Andreas Hindborg

This series adds two helpers for obtaining information about the number
of numa domains and cpu count of the system.

Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org>
---
Changes in v2:
- Move helpers out of the crate root into the `cpu` and `numa`
  modules (Miguel).
- Mark Rust wrappers `#[inline]` (Alice).
- Mark the `num_possible_cpus` C helper `__rust_helper` (Dirk).
- Mention the Rust null block driver as the consumer in commit
  messages (Miguel).
- Link to v1: https://msgid.link/20260215-cpu-helpers-v1-0-fab13d817a5e@kernel.org

To: Miguel Ojeda <ojeda@kernel.org>
To: Boqun Feng <boqun@kernel.org>
To: Gary Guo <gary@garyguo.net>
To: Björn Roy Baron <bjorn3_gh@protonmail.com>
To: Benno Lossin <lossin@kernel.org>
To: Andreas Hindborg <a.hindborg@kernel.org>
To: Alice Ryhl <aliceryhl@google.com>
To: Trevor Gross <tmgross@umich.edu>
To: Danilo Krummrich <dakr@kernel.org>
To: Thomas Gleixner <tglx@kernel.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org
Cc: rust-for-linux@vger.kernel.org

---
Andreas Hindborg (2):
      rust: add a wrapper for the `num_possible_cpus` C function
      rust: add a wrapper for the `nr_online_nodes` C function

 rust/helpers/helpers.c  |  1 +
 rust/helpers/num_cpus.c |  8 ++++++++
 rust/kernel/cpu.rs      |  7 +++++++
 rust/kernel/lib.rs      |  1 +
 rust/kernel/numa.rs     | 19 +++++++++++++++++++
 5 files changed, 36 insertions(+)
---
base-commit: 7fd2df204f342fc17d1a0bfcd474b24232fb0f32
change-id: 20260215-cpu-helpers-08efb2572487

Best regards,
--  
Andreas Hindborg <a.hindborg@kernel.org>



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-06-08 11:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-05 12:54 [PATCH v2 0/2] rust: add a few helpers Andreas Hindborg
2026-06-05 12:54 ` [PATCH v2 1/2] rust: add a wrapper for the `num_possible_cpus` C function Andreas Hindborg
2026-06-08  7:28   ` Alice Ryhl
2026-06-08 11:06   ` Gary Guo
2026-06-05 12:54 ` [PATCH v2 2/2] rust: add a wrapper for the `nr_online_nodes` " Andreas Hindborg
2026-06-08  7:28   ` Alice Ryhl
2026-06-08 11:05   ` Gary Guo
2026-06-08 11:52     ` Andreas Hindborg
2026-06-08 11:57       ` Gary Guo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox