rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] MAINTAINERS: add rust bindings entry for bitmap API
  2025-02-21 20:56 [PATCH " Yury Norov
@ 2025-02-21 20:56 ` Yury Norov
  2025-02-22 13:50   ` Miguel Ojeda
  0 siblings, 1 reply; 13+ messages in thread
From: Yury Norov @ 2025-02-21 20:56 UTC (permalink / raw)
  To: Miguel Ojeda, Viresh Kumar, Danilo Krummrich
  Cc: Yury Norov, Rafael J. Wysocki, Alex Gaynor, Boqun Feng, Gary Guo,
	Björn Roy Baron, Benno Lossin, Andreas Hindborg, Alice Ryhl,
	Trevor Gross, Rasmus Villemoes, Vincent Guittot, Stephen Boyd,
	Nishanth Menon, Manos Pitsidianakis, Erik Schilling,
	Alex Bennée, Joakim Bech, Rob Herring, Christoph Hellwig,
	Jason Gunthorpe, John Hubbard, linux-pm, rust-for-linux,
	linux-kernel

From: Yury Norov [NVIDIA] <yury.norov@gmail.com>

This entry enumerates all bitmap and related APIs that rust requires
but cannot use directly (i.e. inlined functions and macros).

The "Rust kernel policy" (https://rust-for-linux.com/rust-kernel-policy)
document describes the special status of rust support:

  "Exceptionally, for Rust, a subsystem may allow to temporarily
   break Rust code."

Bitmap developers do their best to keep the API stable. When API or
user-visible behavior needs to be changed such that it breaks rust,
bitmap and rust developers collaborate as follows:
 - bitmap developers don't consider rust bindings as a blocker for the
   API change;
 - bindings maintainer (me) makes sure that kernel build doesn't break
   with CONFIG_RUST=y. This implies fixes in the binding layer, but not
   in the rust codebase;
 - rust developers adopt new version of API in their codebase and remove
   unused bindings timely.

CC: Danilo Krummrich <dakr@redhat.com>
CC: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
CC: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Yury Norov [NVIDIA] <yury.norov@gmail.com>
---
 MAINTAINERS | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index efee40ea589f..4fb287405492 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4021,6 +4021,11 @@ F:	tools/include/vdso/bits.h
 F:	tools/lib/bitmap.c
 F:	tools/lib/find_bit.c
 
+BITMAP API BINDINGS [RUST]
+M:	Yury Norov <yury.norov@gmail.com>
+S:	Maintained
+F:	rust/helpers/cpumask.c
+
 BITOPS API
 M:	Yury Norov <yury.norov@gmail.com>
 R:	Rasmus Villemoes <linux@rasmusvillemoes.dk>
-- 
2.43.0


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

* Re: [PATCH 2/2] MAINTAINERS: add rust bindings entry for bitmap API
  2025-02-21 20:56 ` [PATCH 2/2] MAINTAINERS: add rust bindings entry for bitmap API Yury Norov
@ 2025-02-22 13:50   ` Miguel Ojeda
  2025-02-22 23:34     ` Yury Norov
  0 siblings, 1 reply; 13+ messages in thread
From: Miguel Ojeda @ 2025-02-22 13:50 UTC (permalink / raw)
  To: Yury Norov
  Cc: Viresh Kumar, Danilo Krummrich, Rafael J. Wysocki, Alex Gaynor,
	Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
	Andreas Hindborg, Alice Ryhl, Trevor Gross, Rasmus Villemoes,
	Vincent Guittot, Stephen Boyd, Nishanth Menon,
	Manos Pitsidianakis, Erik Schilling, Alex Bennée,
	Joakim Bech, Rob Herring, Christoph Hellwig, Jason Gunthorpe,
	John Hubbard, linux-pm, rust-for-linux, linux-kernel

On Fri, Feb 21, 2025 at 9:57 PM Yury Norov <yury.norov@gmail.com> wrote:
>
> Bitmap developers do their best to keep the API stable. When API or
> user-visible behavior needs to be changed such that it breaks rust,
> bitmap and rust developers collaborate as follows:

If I understand correctly, you are proposing to a "temporarily stable
API", i.e. to add new APIs while keeping old ones for a bit until the
Rust side updates to the new one (including perhaps workarounds in the
helpers when needed). Is that correct?

In other words, while the entry is about the helpers file, the policy
is about all APIs (since some APIs are called directly), right?

(Up to you, Viresh et al., of course, i.e. I am just trying to follow)

Thanks!

Cheers,
Miguel

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

* Re: [PATCH 2/2] MAINTAINERS: add rust bindings entry for bitmap API
  2025-02-22 13:50   ` Miguel Ojeda
@ 2025-02-22 23:34     ` Yury Norov
  2025-02-24  5:14       ` Viresh Kumar
  0 siblings, 1 reply; 13+ messages in thread
From: Yury Norov @ 2025-02-22 23:34 UTC (permalink / raw)
  To: Miguel Ojeda
  Cc: Viresh Kumar, Danilo Krummrich, Rafael J. Wysocki, Alex Gaynor,
	Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
	Andreas Hindborg, Alice Ryhl, Trevor Gross, Rasmus Villemoes,
	Vincent Guittot, Stephen Boyd, Nishanth Menon,
	Manos Pitsidianakis, Erik Schilling, Alex Bennée,
	Joakim Bech, Rob Herring, Christoph Hellwig, Jason Gunthorpe,
	John Hubbard, linux-pm, rust-for-linux, linux-kernel

On Sat, Feb 22, 2025 at 02:50:50PM +0100, Miguel Ojeda wrote:
> On Fri, Feb 21, 2025 at 9:57 PM Yury Norov <yury.norov@gmail.com> wrote:
> >
> > Bitmap developers do their best to keep the API stable. When API or
> > user-visible behavior needs to be changed such that it breaks rust,
> > bitmap and rust developers collaborate as follows:
> 
> If I understand correctly, you are proposing to a "temporarily stable
> API", i.e. to add new APIs while keeping old ones for a bit until the
> Rust side updates to the new one (including perhaps workarounds in the
> helpers when needed). Is that correct?

Yes. Keeping them under CONFIG_RUST for a while, or moving directly to
rust helpers would be an option.

> In other words, while the entry is about the helpers file, the policy
> is about all APIs (since some APIs are called directly), right?

Yes, it's about all functions used by rust. I can underline it in
the commit message. 
 
> (Up to you, Viresh et al., of course, i.e. I am just trying to follow)

What I want to make clear to my contributors is that lack of proficiency
in rust will never become a problem for them. If they have an improvement
that may break something on rust side, there will be someone who will take
care of it - this way or another.

I think rust developers need similar guarantees form rust maintainers:
there will be a rust engineer who will keep the bindings on rust side in
a good shape. Viresh, as per my understanding, has committed on that.

Thanks,
Yury

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

* Re: [PATCH 2/2] MAINTAINERS: add rust bindings entry for bitmap API
  2025-02-22 23:34     ` Yury Norov
@ 2025-02-24  5:14       ` Viresh Kumar
  0 siblings, 0 replies; 13+ messages in thread
From: Viresh Kumar @ 2025-02-24  5:14 UTC (permalink / raw)
  To: Yury Norov
  Cc: Miguel Ojeda, Danilo Krummrich, Rafael J. Wysocki, Alex Gaynor,
	Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
	Andreas Hindborg, Alice Ryhl, Trevor Gross, Rasmus Villemoes,
	Vincent Guittot, Stephen Boyd, Nishanth Menon,
	Manos Pitsidianakis, Erik Schilling, Alex Bennée,
	Joakim Bech, Rob Herring, Christoph Hellwig, Jason Gunthorpe,
	John Hubbard, linux-pm, rust-for-linux, linux-kernel

On 22-02-25, 18:34, Yury Norov wrote:
> I think rust developers need similar guarantees form rust maintainers:
> there will be a rust engineer who will keep the bindings on rust side in
> a good shape. Viresh, as per my understanding, has committed on that.

Yes.

-- 
viresh

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

* [PATCH v2 0/2] Bitmap bindings for rust
@ 2025-02-24 23:39 Yury Norov
  2025-02-24 23:39 ` [PATCH 1/2] rust: Add cpumask helpers Yury Norov
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Yury Norov @ 2025-02-24 23:39 UTC (permalink / raw)
  To: Miguel Ojeda, Viresh Kumar, Danilo Krummrich
  Cc: Yury Norov, Rafael J. Wysocki, Alex Gaynor, Boqun Feng, Gary Guo,
	Björn Roy Baron, Benno Lossin, Andreas Hindborg, Alice Ryhl,
	Trevor Gross, Rasmus Villemoes, Vincent Guittot, Stephen Boyd,
	Nishanth Menon, Manos Pitsidianakis, Erik Schilling,
	Alex Bennée, Joakim Bech, Rob Herring, Christoph Hellwig,
	Jason Gunthorpe, John Hubbard, linux-pm, rust-for-linux,
	linux-kernel

The bindings and a new maintenance entry together with the API changes
policy.

v1: https://lore.kernel.org/all/20250221205649.141305-1-yury.norov@gmail.com/T/
v2:
 - export alloc_cpumask_var() @ Viresh;
 - clarify that the maintenance rules apply to all bitmap interfaces,
   including those not mentioned explicitly in the helpers @ Miguel.

Viresh Kumar (1):
  rust: Add cpumask helpers

Yury Norov [NVIDIA] (1):
  MAINTAINERS: add rust bindings entry for bitmap API

 MAINTAINERS                     |  5 ++++
 rust/bindings/bindings_helper.h |  1 +
 rust/helpers/cpumask.c          | 45 +++++++++++++++++++++++++++++++++
 rust/helpers/helpers.c          |  1 +
 4 files changed, 52 insertions(+)
 create mode 100644 rust/helpers/cpumask.c

-- 
2.43.0


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

* [PATCH 1/2] rust: Add cpumask helpers
  2025-02-24 23:39 [PATCH v2 0/2] Bitmap bindings for rust Yury Norov
@ 2025-02-24 23:39 ` Yury Norov
  2025-02-25  9:24   ` Alice Ryhl
  2025-02-25  9:43   ` Daniel Almeida
  2025-02-24 23:39 ` [PATCH 2/2] MAINTAINERS: add rust bindings entry for bitmap API Yury Norov
  2025-02-28 18:42 ` [PATCH v2 0/2] Bitmap bindings for rust Yury Norov
  2 siblings, 2 replies; 13+ messages in thread
From: Yury Norov @ 2025-02-24 23:39 UTC (permalink / raw)
  To: Miguel Ojeda, Viresh Kumar, Danilo Krummrich
  Cc: Yury Norov, Rafael J. Wysocki, Alex Gaynor, Boqun Feng, Gary Guo,
	Björn Roy Baron, Benno Lossin, Andreas Hindborg, Alice Ryhl,
	Trevor Gross, Rasmus Villemoes, Vincent Guittot, Stephen Boyd,
	Nishanth Menon, Manos Pitsidianakis, Erik Schilling,
	Alex Bennée, Joakim Bech, Rob Herring, Christoph Hellwig,
	Jason Gunthorpe, John Hubbard, linux-pm, rust-for-linux,
	linux-kernel

From: Viresh Kumar <viresh.kumar@linaro.org>

In order to prepare for adding Rust abstractions for cpumask, add
the required helpers for inline cpumask functions that cannot be
called by rust code directly.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Yury Norov [NVIDIA] <yury.norov@gmail.com>
---
 rust/bindings/bindings_helper.h |  1 +
 rust/helpers/cpumask.c          | 45 +++++++++++++++++++++++++++++++++
 rust/helpers/helpers.c          |  1 +
 3 files changed, 47 insertions(+)
 create mode 100644 rust/helpers/cpumask.c

diff --git a/rust/bindings/bindings_helper.h b/rust/bindings/bindings_helper.h
index f46cf3bb7069..2396ca1cf8fb 100644
--- a/rust/bindings/bindings_helper.h
+++ b/rust/bindings/bindings_helper.h
@@ -10,6 +10,7 @@
 #include <linux/blk-mq.h>
 #include <linux/blk_types.h>
 #include <linux/blkdev.h>
+#include <linux/cpumask.h>
 #include <linux/cred.h>
 #include <linux/device/faux.h>
 #include <linux/errname.h>
diff --git a/rust/helpers/cpumask.c b/rust/helpers/cpumask.c
new file mode 100644
index 000000000000..2d380a86c34a
--- /dev/null
+++ b/rust/helpers/cpumask.c
@@ -0,0 +1,45 @@
+// SPDX-License-Identifier: GPL-2.0
+
+#include <linux/cpumask.h>
+
+void rust_helper_cpumask_set_cpu(unsigned int cpu, struct cpumask *dstp)
+{
+	cpumask_set_cpu(cpu, dstp);
+}
+
+void rust_helper_cpumask_clear_cpu(int cpu, struct cpumask *dstp)
+{
+	cpumask_clear_cpu(cpu, dstp);
+}
+
+void rust_helper_cpumask_setall(struct cpumask *dstp)
+{
+	cpumask_setall(dstp);
+}
+
+unsigned int rust_helper_cpumask_weight(struct cpumask *srcp)
+{
+	return cpumask_weight(srcp);
+}
+
+void rust_helper_cpumask_copy(struct cpumask *dstp, const struct cpumask *srcp)
+{
+	cpumask_copy(dstp, srcp);
+}
+
+bool rust_helper_alloc_cpumask_var(cpumask_var_t *mask, gfp_t flags)
+{
+	return alloc_cpumask_var(mask, flags);
+}
+
+bool rust_helper_zalloc_cpumask_var(cpumask_var_t *mask, gfp_t flags)
+{
+	return zalloc_cpumask_var(mask, flags);
+}
+
+#ifndef CONFIG_CPUMASK_OFFSTACK
+void rust_helper_free_cpumask_var(cpumask_var_t mask)
+{
+	free_cpumask_var(mask);
+}
+#endif
diff --git a/rust/helpers/helpers.c b/rust/helpers/helpers.c
index 0640b7e115be..de2341cfd917 100644
--- a/rust/helpers/helpers.c
+++ b/rust/helpers/helpers.c
@@ -11,6 +11,7 @@
 #include "bug.c"
 #include "build_assert.c"
 #include "build_bug.c"
+#include "cpumask.c"
 #include "cred.c"
 #include "device.c"
 #include "err.c"
-- 
2.43.0


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

* [PATCH 2/2] MAINTAINERS: add rust bindings entry for bitmap API
  2025-02-24 23:39 [PATCH v2 0/2] Bitmap bindings for rust Yury Norov
  2025-02-24 23:39 ` [PATCH 1/2] rust: Add cpumask helpers Yury Norov
@ 2025-02-24 23:39 ` Yury Norov
  2025-02-25  3:19   ` Viresh Kumar
  2025-02-28 18:42 ` [PATCH v2 0/2] Bitmap bindings for rust Yury Norov
  2 siblings, 1 reply; 13+ messages in thread
From: Yury Norov @ 2025-02-24 23:39 UTC (permalink / raw)
  To: Miguel Ojeda, Viresh Kumar, Danilo Krummrich
  Cc: Yury Norov, Rafael J. Wysocki, Alex Gaynor, Boqun Feng, Gary Guo,
	Björn Roy Baron, Benno Lossin, Andreas Hindborg, Alice Ryhl,
	Trevor Gross, Rasmus Villemoes, Vincent Guittot, Stephen Boyd,
	Nishanth Menon, Manos Pitsidianakis, Erik Schilling,
	Alex Bennée, Joakim Bech, Rob Herring, Christoph Hellwig,
	Jason Gunthorpe, John Hubbard, linux-pm, rust-for-linux,
	linux-kernel

From: "Yury Norov [NVIDIA]" <yury.norov@gmail.com>

This entry enumerates bitmap and related APIs listed in BITMAP API entry
that rust requires but cannot use directly (i.e. inlined functions and
macros).

The "Rust kernel policy" (https://rust-for-linux.com/rust-kernel-policy)
document describes the special status of rust support:

  "Exceptionally, for Rust, a subsystem may allow to temporarily
   break Rust code."

Accordingly, the following policy applies to all interfaces under the
BITMAP API entry that are used in rust codebase, including those not
listed explicitly here.

Bitmap developers do their best to keep the API stable. When API or
user-visible behavior needs to be changed such that it breaks rust,
bitmap and rust developers collaborate as follows:
 - bitmap developers don't consider rust bindings as a blocker for the
   API change;
 - bindings maintainer (me) makes sure that kernel build doesn't break
   with CONFIG_RUST=y. This implies fixes in the binding layer, but not
   in rust codebase;
 - rust developers adopt new version of API in their codebase and remove
   unused bindings timely.

CC: Danilo Krummrich <dakr@redhat.com>
CC: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
CC: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Yury Norov [NVIDIA] <yury.norov@gmail.com>
---
 MAINTAINERS | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/MAINTAINERS b/MAINTAINERS
index efee40ea589f..315cff76df29 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4021,6 +4021,11 @@ F:	tools/include/vdso/bits.h
 F:	tools/lib/bitmap.c
 F:	tools/lib/find_bit.c
 
+BITMAP API BINDINGS [RUST]
+M:	Yury Norov <yury.norov@gmail.com>
+S:	Maintained
+F:	rust/helpers/cpumask.c
+
 BITOPS API
 M:	Yury Norov <yury.norov@gmail.com>
 R:	Rasmus Villemoes <linux@rasmusvillemoes.dk>
-- 
2.43.0


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

* Re: [PATCH 2/2] MAINTAINERS: add rust bindings entry for bitmap API
  2025-02-24 23:39 ` [PATCH 2/2] MAINTAINERS: add rust bindings entry for bitmap API Yury Norov
@ 2025-02-25  3:19   ` Viresh Kumar
  0 siblings, 0 replies; 13+ messages in thread
From: Viresh Kumar @ 2025-02-25  3:19 UTC (permalink / raw)
  To: Yury Norov
  Cc: Miguel Ojeda, Danilo Krummrich, Rafael J. Wysocki, Alex Gaynor,
	Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
	Andreas Hindborg, Alice Ryhl, Trevor Gross, Rasmus Villemoes,
	Vincent Guittot, Stephen Boyd, Nishanth Menon,
	Manos Pitsidianakis, Erik Schilling, Alex Bennée,
	Joakim Bech, Rob Herring, Christoph Hellwig, Jason Gunthorpe,
	John Hubbard, linux-pm, rust-for-linux, linux-kernel

On 24-02-25, 18:39, Yury Norov wrote:
> From: "Yury Norov [NVIDIA]" <yury.norov@gmail.com>
> 
> This entry enumerates bitmap and related APIs listed in BITMAP API entry
> that rust requires but cannot use directly (i.e. inlined functions and
> macros).
> 
> The "Rust kernel policy" (https://rust-for-linux.com/rust-kernel-policy)
> document describes the special status of rust support:
> 
>   "Exceptionally, for Rust, a subsystem may allow to temporarily
>    break Rust code."
> 
> Accordingly, the following policy applies to all interfaces under the
> BITMAP API entry that are used in rust codebase, including those not
> listed explicitly here.
> 
> Bitmap developers do their best to keep the API stable. When API or
> user-visible behavior needs to be changed such that it breaks rust,
> bitmap and rust developers collaborate as follows:
>  - bitmap developers don't consider rust bindings as a blocker for the
>    API change;
>  - bindings maintainer (me) makes sure that kernel build doesn't break
>    with CONFIG_RUST=y. This implies fixes in the binding layer, but not
>    in rust codebase;
>  - rust developers adopt new version of API in their codebase and remove
>    unused bindings timely.
> 
> CC: Danilo Krummrich <dakr@redhat.com>
> CC: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
> CC: Viresh Kumar <viresh.kumar@linaro.org>
> Signed-off-by: Yury Norov [NVIDIA] <yury.norov@gmail.com>
> ---
>  MAINTAINERS | 5 +++++
>  1 file changed, 5 insertions(+)

Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh

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

* Re: [PATCH 1/2] rust: Add cpumask helpers
  2025-02-24 23:39 ` [PATCH 1/2] rust: Add cpumask helpers Yury Norov
@ 2025-02-25  9:24   ` Alice Ryhl
  2025-02-25  9:43   ` Daniel Almeida
  1 sibling, 0 replies; 13+ messages in thread
From: Alice Ryhl @ 2025-02-25  9:24 UTC (permalink / raw)
  To: Yury Norov
  Cc: Miguel Ojeda, Viresh Kumar, Danilo Krummrich, Rafael J. Wysocki,
	Alex Gaynor, Boqun Feng, Gary Guo, Björn Roy Baron,
	Benno Lossin, Andreas Hindborg, Trevor Gross, Rasmus Villemoes,
	Vincent Guittot, Stephen Boyd, Nishanth Menon,
	Manos Pitsidianakis, Erik Schilling, Alex Bennée,
	Joakim Bech, Rob Herring, Christoph Hellwig, Jason Gunthorpe,
	John Hubbard, linux-pm, rust-for-linux, linux-kernel

On Tue, Feb 25, 2025 at 12:39 AM Yury Norov <yury.norov@gmail.com> wrote:
>
> From: Viresh Kumar <viresh.kumar@linaro.org>
>
> In order to prepare for adding Rust abstractions for cpumask, add
> the required helpers for inline cpumask functions that cannot be
> called by rust code directly.
>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> Signed-off-by: Yury Norov [NVIDIA] <yury.norov@gmail.com>

Reviewed-by: Alice Ryhl <aliceryhl@google.com>

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

* Re: [PATCH 1/2] rust: Add cpumask helpers
  2025-02-24 23:39 ` [PATCH 1/2] rust: Add cpumask helpers Yury Norov
  2025-02-25  9:24   ` Alice Ryhl
@ 2025-02-25  9:43   ` Daniel Almeida
  2025-02-25  9:50     ` Viresh Kumar
  1 sibling, 1 reply; 13+ messages in thread
From: Daniel Almeida @ 2025-02-25  9:43 UTC (permalink / raw)
  To: Yury Norov
  Cc: Miguel Ojeda, Viresh Kumar, Danilo Krummrich, Rafael J. Wysocki,
	Alex Gaynor, Boqun Feng, Gary Guo, Björn Roy Baron,
	Benno Lossin, Andreas Hindborg, Alice Ryhl, Trevor Gross,
	Rasmus Villemoes, Vincent Guittot, Stephen Boyd, Nishanth Menon,
	Manos Pitsidianakis, Erik Schilling, Alex Bennée,
	Joakim Bech, Rob Herring, Christoph Hellwig, Jason Gunthorpe,
	John Hubbard, linux-pm, rust-for-linux, linux-kernel

Hi Yury,

> On 24 Feb 2025, at 20:39, Yury Norov <yury.norov@gmail.com> wrote:
> 
> From: Viresh Kumar <viresh.kumar@linaro.org>
> 
> In order to prepare for adding Rust abstractions for cpumask, add
> the required helpers for inline cpumask functions that cannot be
> called by rust code directly.

I don’t understand what is going on here. You apparently did not provide the
Rust code itself.

Usually, when I see a “in order to prepare for …” I expect the actual patch to
follow in the same series.

Right now - and correct me if I'm wrong - it seems like you’ve essentially added
dead code.

— Daniel

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

* Re: [PATCH 1/2] rust: Add cpumask helpers
  2025-02-25  9:43   ` Daniel Almeida
@ 2025-02-25  9:50     ` Viresh Kumar
  2025-02-26 16:17       ` Yury Norov
  0 siblings, 1 reply; 13+ messages in thread
From: Viresh Kumar @ 2025-02-25  9:50 UTC (permalink / raw)
  To: Daniel Almeida
  Cc: Yury Norov, Miguel Ojeda, Danilo Krummrich, Rafael J. Wysocki,
	Alex Gaynor, Boqun Feng, Gary Guo, Björn Roy Baron,
	Benno Lossin, Andreas Hindborg, Alice Ryhl, Trevor Gross,
	Rasmus Villemoes, Vincent Guittot, Stephen Boyd, Nishanth Menon,
	Manos Pitsidianakis, Erik Schilling, Alex Bennée,
	Joakim Bech, Rob Herring, Christoph Hellwig, Jason Gunthorpe,
	John Hubbard, linux-pm, rust-for-linux, linux-kernel

On 25-02-25, 06:43, Daniel Almeida wrote:
> I don’t understand what is going on here. You apparently did not provide the
> Rust code itself.
> 
> Usually, when I see a “in order to prepare for …” I expect the actual patch to
> follow in the same series.
> 
> Right now - and correct me if I'm wrong - it seems like you’ve essentially added
> dead code.

Rust abstractions:

https://lore.kernel.org/all/cover.1740475625.git.viresh.kumar@linaro.org/

-- 
viresh

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

* Re: [PATCH 1/2] rust: Add cpumask helpers
  2025-02-25  9:50     ` Viresh Kumar
@ 2025-02-26 16:17       ` Yury Norov
  0 siblings, 0 replies; 13+ messages in thread
From: Yury Norov @ 2025-02-26 16:17 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: Daniel Almeida, Miguel Ojeda, Danilo Krummrich, Rafael J. Wysocki,
	Alex Gaynor, Boqun Feng, Gary Guo, Björn Roy Baron,
	Benno Lossin, Andreas Hindborg, Alice Ryhl, Trevor Gross,
	Rasmus Villemoes, Vincent Guittot, Stephen Boyd, Nishanth Menon,
	Manos Pitsidianakis, Erik Schilling, Alex Bennée,
	Joakim Bech, Rob Herring, Christoph Hellwig, Jason Gunthorpe,
	John Hubbard, linux-pm, rust-for-linux, linux-kernel

On Tue, Feb 25, 2025 at 03:20:54PM +0530, Viresh Kumar wrote:
> On 25-02-25, 06:43, Daniel Almeida wrote:
> > I don’t understand what is going on here. You apparently did not provide the
> > Rust code itself.
> > 
> > Usually, when I see a “in order to prepare for …” I expect the actual patch to
> > follow in the same series.
> > 
> > Right now - and correct me if I'm wrong - it seems like you’ve essentially added
> > dead code.
> 
> Rust abstractions:
> 
> https://lore.kernel.org/all/cover.1740475625.git.viresh.kumar@linaro.org/

Yes, it's a dead code. 

Cpumasks is a library, and people sometimes submit library code separately
from their main projects, so it becomes unused for a while. GENMASK_U128()
is one recent example.

I'm not happy about it, but I understand why people do so - it's important
for them to have stable API, and their big project may take longer to get
upstreamed.

So, if nobody's strongly opposite, I will move it myself. Alternatively,
we can ask Viresh to take over the patches and move them together with
his series.

Thanks,
Yury

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

* Re: [PATCH v2 0/2] Bitmap bindings for rust
  2025-02-24 23:39 [PATCH v2 0/2] Bitmap bindings for rust Yury Norov
  2025-02-24 23:39 ` [PATCH 1/2] rust: Add cpumask helpers Yury Norov
  2025-02-24 23:39 ` [PATCH 2/2] MAINTAINERS: add rust bindings entry for bitmap API Yury Norov
@ 2025-02-28 18:42 ` Yury Norov
  2 siblings, 0 replies; 13+ messages in thread
From: Yury Norov @ 2025-02-28 18:42 UTC (permalink / raw)
  To: Miguel Ojeda, Viresh Kumar, Danilo Krummrich
  Cc: Rafael J. Wysocki, Alex Gaynor, Boqun Feng, Gary Guo,
	Björn Roy Baron, Benno Lossin, Andreas Hindborg, Alice Ryhl,
	Trevor Gross, Rasmus Villemoes, Vincent Guittot, Stephen Boyd,
	Nishanth Menon, Manos Pitsidianakis, Erik Schilling,
	Alex Bennée, Joakim Bech, Rob Herring, Christoph Hellwig,
	Jason Gunthorpe, John Hubbard, linux-pm, rust-for-linux,
	linux-kernel

On Mon, Feb 24, 2025 at 06:39:34PM -0500, Yury Norov wrote:
> The bindings and a new maintenance entry together with the API changes
> policy.
> 
> v1: https://lore.kernel.org/all/20250221205649.141305-1-yury.norov@gmail.com/T/
> v2:
>  - export alloc_cpumask_var() @ Viresh;
>  - clarify that the maintenance rules apply to all bitmap interfaces,
>    including those not mentioned explicitly in the helpers @ Miguel.

OK, adding in bitmap-for-next for testing.

Thanks,
Yury
 
> Viresh Kumar (1):
>   rust: Add cpumask helpers
> 
> Yury Norov [NVIDIA] (1):
>   MAINTAINERS: add rust bindings entry for bitmap API
> 
>  MAINTAINERS                     |  5 ++++
>  rust/bindings/bindings_helper.h |  1 +
>  rust/helpers/cpumask.c          | 45 +++++++++++++++++++++++++++++++++
>  rust/helpers/helpers.c          |  1 +
>  4 files changed, 52 insertions(+)
>  create mode 100644 rust/helpers/cpumask.c
> 
> -- 
> 2.43.0

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

end of thread, other threads:[~2025-02-28 18:42 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-24 23:39 [PATCH v2 0/2] Bitmap bindings for rust Yury Norov
2025-02-24 23:39 ` [PATCH 1/2] rust: Add cpumask helpers Yury Norov
2025-02-25  9:24   ` Alice Ryhl
2025-02-25  9:43   ` Daniel Almeida
2025-02-25  9:50     ` Viresh Kumar
2025-02-26 16:17       ` Yury Norov
2025-02-24 23:39 ` [PATCH 2/2] MAINTAINERS: add rust bindings entry for bitmap API Yury Norov
2025-02-25  3:19   ` Viresh Kumar
2025-02-28 18:42 ` [PATCH v2 0/2] Bitmap bindings for rust Yury Norov
  -- strict thread matches above, loose matches on Subject: below --
2025-02-21 20:56 [PATCH " Yury Norov
2025-02-21 20:56 ` [PATCH 2/2] MAINTAINERS: add rust bindings entry for bitmap API Yury Norov
2025-02-22 13:50   ` Miguel Ojeda
2025-02-22 23:34     ` Yury Norov
2025-02-24  5:14       ` Viresh Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).