public inbox for rust-for-linux@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] rust: cpumask: Bindings for core cpumasks and cpumask iterators
@ 2025-11-05 23:16 Mitchell Levy
  2025-11-05 23:16 ` [PATCH 1/2] rust: cpumask: Add a `Cpumask` iterator Mitchell Levy
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Mitchell Levy @ 2025-11-05 23:16 UTC (permalink / raw)
  To: Yury Norov, Miguel Ojeda, Alex Gaynor, Boqun Feng, Gary Guo,
	Björn Roy Baron, Benno Lossin, Andreas Hindborg, Alice Ryhl,
	Trevor Gross, Danilo Krummrich, Viresh Kumar
  Cc: rust-for-linux, linux-kernel, Mitchell Levy

The kernel provides a number of very useful CPU masks from the C side,
including CPU masks for possible and online CPUs. In particular, these
are very useful when some operation must be done on each CPU (either
each possible CPU or each online CPU, etc). Therefore, it seems to make
sense to add both of these functionalities at once.

Signed-off-by: Mitchell Levy <levymitchell0@gmail.com>
---
These patches originated as part of my work on a Rust per-CPU API [1].
Boqun suggested to me that these may make sense to merge separately, and
it does seem like these might be useful beyond the per-CPU work.

[1]: https://lore.kernel.org/rust-for-linux/20251105-rust-percpu-v4-0-984b1470adcb@gmail.com/

---
Mitchell Levy (2):
      rust: cpumask: Add a `Cpumask` iterator
      rust: cpumask: Add getters for globally defined cpumasks

 rust/helpers/cpumask.c |  5 +++
 rust/kernel/cpumask.rs | 94 +++++++++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 98 insertions(+), 1 deletion(-)
---
base-commit: f3f6b3664302e16ef1c6b91034a72df5564d6b8a
change-id: 20251105-cpumask-iter-ff0f1a5899b3

Best regards,
-- 
Mitchell Levy <levymitchell0@gmail.com>


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

end of thread, other threads:[~2025-11-08  3:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-05 23:16 [PATCH 0/2] rust: cpumask: Bindings for core cpumasks and cpumask iterators Mitchell Levy
2025-11-05 23:16 ` [PATCH 1/2] rust: cpumask: Add a `Cpumask` iterator Mitchell Levy
2025-11-05 23:16 ` [PATCH 2/2] rust: cpumask: Add getters for globally defined cpumasks Mitchell Levy
2025-11-06  0:19 ` [PATCH 0/2] rust: cpumask: Bindings for core cpumasks and cpumask iterators John Hubbard
2025-11-07  1:38   ` Yury Norov
2025-11-07 23:56     ` Mitchell Levy
2025-11-08  3:30       ` Yury Norov

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