* [PATCH v2 10/27] rust: maple_tree: add __rust_helper to helpers
2026-01-05 12:42 [PATCH v2 00/27] Allow inlining C helpers into Rust when using LTO Alice Ryhl
@ 2026-01-05 12:42 ` Alice Ryhl
2026-01-05 15:09 ` Liam R. Howlett
2026-01-05 12:42 ` [PATCH v2 11/27] rust: mm: " Alice Ryhl
` (3 subsequent siblings)
4 siblings, 1 reply; 11+ messages in thread
From: Alice Ryhl @ 2026-01-05 12:42 UTC (permalink / raw)
To: rust-for-linux
Cc: linux-kernel, Alice Ryhl, Boqun Feng, Andrew Ballance, Gary Guo,
Andrew Morton, Liam R. Howlett, maple-tree, linux-mm
This is needed to inline these helpers into Rust code.
Reviewed-by: Boqun Feng <boqun.feng@gmail.com>
Acked-by: Andrew Ballance <andrewjballance@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: "Liam R. Howlett" <Liam.Howlett@oracle.com>
Cc: Andrew Ballance <andrewjballance@gmail.com>
Cc: maple-tree@lists.infradead.org
Cc: linux-mm@kvack.org
---
rust/helpers/maple_tree.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/rust/helpers/maple_tree.c b/rust/helpers/maple_tree.c
index 1dd9ac84a13feed53c0ed5eec6805517081d0673..5586486a76e0de60969af1510b4b0428392920e6 100644
--- a/rust/helpers/maple_tree.c
+++ b/rust/helpers/maple_tree.c
@@ -2,7 +2,8 @@
#include <linux/maple_tree.h>
-void rust_helper_mt_init_flags(struct maple_tree *mt, unsigned int flags)
+__rust_helper void rust_helper_mt_init_flags(struct maple_tree *mt,
+ unsigned int flags)
{
mt_init_flags(mt, flags);
}
--
2.52.0.351.gbe84eed79e-goog
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH v2 10/27] rust: maple_tree: add __rust_helper to helpers
2026-01-05 12:42 ` [PATCH v2 10/27] rust: maple_tree: add __rust_helper to helpers Alice Ryhl
@ 2026-01-05 15:09 ` Liam R. Howlett
0 siblings, 0 replies; 11+ messages in thread
From: Liam R. Howlett @ 2026-01-05 15:09 UTC (permalink / raw)
To: Alice Ryhl
Cc: rust-for-linux, linux-kernel, Boqun Feng, Andrew Ballance,
Gary Guo, Andrew Morton, maple-tree, linux-mm
* Alice Ryhl <aliceryhl@google.com> [260105 07:42]:
> This is needed to inline these helpers into Rust code.
>
> Reviewed-by: Boqun Feng <boqun.feng@gmail.com>
> Acked-by: Andrew Ballance <andrewjballance@gmail.com>
> Reviewed-by: Gary Guo <gary@garyguo.net>
> Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Acked-by: Liam R. Howlett <Liam.Howlett@oracle.com>
> ---
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: "Liam R. Howlett" <Liam.Howlett@oracle.com>
> Cc: Andrew Ballance <andrewjballance@gmail.com>
> Cc: maple-tree@lists.infradead.org
> Cc: linux-mm@kvack.org
> ---
> rust/helpers/maple_tree.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/rust/helpers/maple_tree.c b/rust/helpers/maple_tree.c
> index 1dd9ac84a13feed53c0ed5eec6805517081d0673..5586486a76e0de60969af1510b4b0428392920e6 100644
> --- a/rust/helpers/maple_tree.c
> +++ b/rust/helpers/maple_tree.c
> @@ -2,7 +2,8 @@
>
> #include <linux/maple_tree.h>
>
> -void rust_helper_mt_init_flags(struct maple_tree *mt, unsigned int flags)
> +__rust_helper void rust_helper_mt_init_flags(struct maple_tree *mt,
> + unsigned int flags)
> {
> mt_init_flags(mt, flags);
> }
>
> --
> 2.52.0.351.gbe84eed79e-goog
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v2 11/27] rust: mm: add __rust_helper to helpers
2026-01-05 12:42 [PATCH v2 00/27] Allow inlining C helpers into Rust when using LTO Alice Ryhl
2026-01-05 12:42 ` [PATCH v2 10/27] rust: maple_tree: add __rust_helper to helpers Alice Ryhl
@ 2026-01-05 12:42 ` Alice Ryhl
2026-01-05 15:10 ` Liam R. Howlett
2026-01-05 12:42 ` [PATCH v2 27/27] rust: xarray: " Alice Ryhl
` (2 subsequent siblings)
4 siblings, 1 reply; 11+ messages in thread
From: Alice Ryhl @ 2026-01-05 12:42 UTC (permalink / raw)
To: rust-for-linux
Cc: linux-kernel, Alice Ryhl, Boqun Feng, Gary Guo, Andrew Morton,
Lorenzo Stoakes, Liam R. Howlett, Uladzislau Rezki, Vitaly Wool,
linux-mm
This is needed to inline these helpers into Rust code.
Reviewed-by: Boqun Feng <boqun.feng@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: "Liam R. Howlett" <Liam.Howlett@oracle.com>
Cc: Uladzislau Rezki <urezki@gmail.com>
Cc: Vitaly Wool <vitaly.wool@konsulko.se>
Cc: linux-mm@kvack.org
---
rust/helpers/mm.c | 20 ++++++++++----------
rust/helpers/page.c | 9 +++++----
rust/helpers/vmalloc.c | 2 +-
3 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/rust/helpers/mm.c b/rust/helpers/mm.c
index 81b510c96fd2692dcb7ab4705f790bd3a41a630e..b5540997bd20d4398e2838956ed70b2fb61c5661 100644
--- a/rust/helpers/mm.c
+++ b/rust/helpers/mm.c
@@ -3,48 +3,48 @@
#include <linux/mm.h>
#include <linux/sched/mm.h>
-void rust_helper_mmgrab(struct mm_struct *mm)
+__rust_helper void rust_helper_mmgrab(struct mm_struct *mm)
{
mmgrab(mm);
}
-void rust_helper_mmdrop(struct mm_struct *mm)
+__rust_helper void rust_helper_mmdrop(struct mm_struct *mm)
{
mmdrop(mm);
}
-void rust_helper_mmget(struct mm_struct *mm)
+__rust_helper void rust_helper_mmget(struct mm_struct *mm)
{
mmget(mm);
}
-bool rust_helper_mmget_not_zero(struct mm_struct *mm)
+__rust_helper bool rust_helper_mmget_not_zero(struct mm_struct *mm)
{
return mmget_not_zero(mm);
}
-void rust_helper_mmap_read_lock(struct mm_struct *mm)
+__rust_helper void rust_helper_mmap_read_lock(struct mm_struct *mm)
{
mmap_read_lock(mm);
}
-bool rust_helper_mmap_read_trylock(struct mm_struct *mm)
+__rust_helper bool rust_helper_mmap_read_trylock(struct mm_struct *mm)
{
return mmap_read_trylock(mm);
}
-void rust_helper_mmap_read_unlock(struct mm_struct *mm)
+__rust_helper void rust_helper_mmap_read_unlock(struct mm_struct *mm)
{
mmap_read_unlock(mm);
}
-struct vm_area_struct *rust_helper_vma_lookup(struct mm_struct *mm,
- unsigned long addr)
+__rust_helper struct vm_area_struct *
+rust_helper_vma_lookup(struct mm_struct *mm, unsigned long addr)
{
return vma_lookup(mm, addr);
}
-void rust_helper_vma_end_read(struct vm_area_struct *vma)
+__rust_helper void rust_helper_vma_end_read(struct vm_area_struct *vma)
{
vma_end_read(vma);
}
diff --git a/rust/helpers/page.c b/rust/helpers/page.c
index 7144de5a61dbdb3006a668961cd1b09440e74908..f8463fbed2a2670ddfd4c23dc922b46b0913c3a2 100644
--- a/rust/helpers/page.c
+++ b/rust/helpers/page.c
@@ -4,23 +4,24 @@
#include <linux/highmem.h>
#include <linux/mm.h>
-struct page *rust_helper_alloc_pages(gfp_t gfp_mask, unsigned int order)
+__rust_helper struct page *rust_helper_alloc_pages(gfp_t gfp_mask,
+ unsigned int order)
{
return alloc_pages(gfp_mask, order);
}
-void *rust_helper_kmap_local_page(struct page *page)
+__rust_helper void *rust_helper_kmap_local_page(struct page *page)
{
return kmap_local_page(page);
}
-void rust_helper_kunmap_local(const void *addr)
+__rust_helper void rust_helper_kunmap_local(const void *addr)
{
kunmap_local(addr);
}
#ifndef NODE_NOT_IN_PAGE_FLAGS
-int rust_helper_page_to_nid(const struct page *page)
+__rust_helper int rust_helper_page_to_nid(const struct page *page)
{
return page_to_nid(page);
}
diff --git a/rust/helpers/vmalloc.c b/rust/helpers/vmalloc.c
index 7d7f7336b3d2f5a32e6a2b6cf8407da37775cfd9..326b030487a2b2199283b64b3b427e57cf5fb14a 100644
--- a/rust/helpers/vmalloc.c
+++ b/rust/helpers/vmalloc.c
@@ -2,7 +2,7 @@
#include <linux/vmalloc.h>
-void * __must_check __realloc_size(2)
+__rust_helper void *__must_check __realloc_size(2)
rust_helper_vrealloc_node_align(const void *p, size_t size, unsigned long align,
gfp_t flags, int node)
{
--
2.52.0.351.gbe84eed79e-goog
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH v2 11/27] rust: mm: add __rust_helper to helpers
2026-01-05 12:42 ` [PATCH v2 11/27] rust: mm: " Alice Ryhl
@ 2026-01-05 15:10 ` Liam R. Howlett
2026-01-05 15:22 ` Lorenzo Stoakes
0 siblings, 1 reply; 11+ messages in thread
From: Liam R. Howlett @ 2026-01-05 15:10 UTC (permalink / raw)
To: Alice Ryhl
Cc: rust-for-linux, linux-kernel, Boqun Feng, Gary Guo,
Andrew Morton, Lorenzo Stoakes, Uladzislau Rezki, Vitaly Wool,
linux-mm
* Alice Ryhl <aliceryhl@google.com> [260105 07:42]:
> This is needed to inline these helpers into Rust code.
>
> Reviewed-by: Boqun Feng <boqun.feng@gmail.com>
> Reviewed-by: Gary Guo <gary@garyguo.net>
> Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Acked-by: Liam R. Howlett <Liam.Howlett@oracle.com>
> ---
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
> Cc: "Liam R. Howlett" <Liam.Howlett@oracle.com>
> Cc: Uladzislau Rezki <urezki@gmail.com>
> Cc: Vitaly Wool <vitaly.wool@konsulko.se>
> Cc: linux-mm@kvack.org
> ---
> rust/helpers/mm.c | 20 ++++++++++----------
> rust/helpers/page.c | 9 +++++----
> rust/helpers/vmalloc.c | 2 +-
> 3 files changed, 16 insertions(+), 15 deletions(-)
>
> diff --git a/rust/helpers/mm.c b/rust/helpers/mm.c
> index 81b510c96fd2692dcb7ab4705f790bd3a41a630e..b5540997bd20d4398e2838956ed70b2fb61c5661 100644
> --- a/rust/helpers/mm.c
> +++ b/rust/helpers/mm.c
> @@ -3,48 +3,48 @@
> #include <linux/mm.h>
> #include <linux/sched/mm.h>
>
> -void rust_helper_mmgrab(struct mm_struct *mm)
> +__rust_helper void rust_helper_mmgrab(struct mm_struct *mm)
> {
> mmgrab(mm);
> }
>
> -void rust_helper_mmdrop(struct mm_struct *mm)
> +__rust_helper void rust_helper_mmdrop(struct mm_struct *mm)
> {
> mmdrop(mm);
> }
>
> -void rust_helper_mmget(struct mm_struct *mm)
> +__rust_helper void rust_helper_mmget(struct mm_struct *mm)
> {
> mmget(mm);
> }
>
> -bool rust_helper_mmget_not_zero(struct mm_struct *mm)
> +__rust_helper bool rust_helper_mmget_not_zero(struct mm_struct *mm)
> {
> return mmget_not_zero(mm);
> }
>
> -void rust_helper_mmap_read_lock(struct mm_struct *mm)
> +__rust_helper void rust_helper_mmap_read_lock(struct mm_struct *mm)
> {
> mmap_read_lock(mm);
> }
>
> -bool rust_helper_mmap_read_trylock(struct mm_struct *mm)
> +__rust_helper bool rust_helper_mmap_read_trylock(struct mm_struct *mm)
> {
> return mmap_read_trylock(mm);
> }
>
> -void rust_helper_mmap_read_unlock(struct mm_struct *mm)
> +__rust_helper void rust_helper_mmap_read_unlock(struct mm_struct *mm)
> {
> mmap_read_unlock(mm);
> }
>
> -struct vm_area_struct *rust_helper_vma_lookup(struct mm_struct *mm,
> - unsigned long addr)
> +__rust_helper struct vm_area_struct *
> +rust_helper_vma_lookup(struct mm_struct *mm, unsigned long addr)
> {
> return vma_lookup(mm, addr);
> }
>
> -void rust_helper_vma_end_read(struct vm_area_struct *vma)
> +__rust_helper void rust_helper_vma_end_read(struct vm_area_struct *vma)
> {
> vma_end_read(vma);
> }
> diff --git a/rust/helpers/page.c b/rust/helpers/page.c
> index 7144de5a61dbdb3006a668961cd1b09440e74908..f8463fbed2a2670ddfd4c23dc922b46b0913c3a2 100644
> --- a/rust/helpers/page.c
> +++ b/rust/helpers/page.c
> @@ -4,23 +4,24 @@
> #include <linux/highmem.h>
> #include <linux/mm.h>
>
> -struct page *rust_helper_alloc_pages(gfp_t gfp_mask, unsigned int order)
> +__rust_helper struct page *rust_helper_alloc_pages(gfp_t gfp_mask,
> + unsigned int order)
> {
> return alloc_pages(gfp_mask, order);
> }
>
> -void *rust_helper_kmap_local_page(struct page *page)
> +__rust_helper void *rust_helper_kmap_local_page(struct page *page)
> {
> return kmap_local_page(page);
> }
>
> -void rust_helper_kunmap_local(const void *addr)
> +__rust_helper void rust_helper_kunmap_local(const void *addr)
> {
> kunmap_local(addr);
> }
>
> #ifndef NODE_NOT_IN_PAGE_FLAGS
> -int rust_helper_page_to_nid(const struct page *page)
> +__rust_helper int rust_helper_page_to_nid(const struct page *page)
> {
> return page_to_nid(page);
> }
> diff --git a/rust/helpers/vmalloc.c b/rust/helpers/vmalloc.c
> index 7d7f7336b3d2f5a32e6a2b6cf8407da37775cfd9..326b030487a2b2199283b64b3b427e57cf5fb14a 100644
> --- a/rust/helpers/vmalloc.c
> +++ b/rust/helpers/vmalloc.c
> @@ -2,7 +2,7 @@
>
> #include <linux/vmalloc.h>
>
> -void * __must_check __realloc_size(2)
> +__rust_helper void *__must_check __realloc_size(2)
> rust_helper_vrealloc_node_align(const void *p, size_t size, unsigned long align,
> gfp_t flags, int node)
> {
>
> --
> 2.52.0.351.gbe84eed79e-goog
>
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH v2 11/27] rust: mm: add __rust_helper to helpers
2026-01-05 15:10 ` Liam R. Howlett
@ 2026-01-05 15:22 ` Lorenzo Stoakes
0 siblings, 0 replies; 11+ messages in thread
From: Lorenzo Stoakes @ 2026-01-05 15:22 UTC (permalink / raw)
To: Liam R. Howlett, Alice Ryhl, rust-for-linux, linux-kernel,
Boqun Feng, Gary Guo, Andrew Morton, Uladzislau Rezki,
Vitaly Wool, linux-mm
On Mon, Jan 05, 2026 at 10:10:03AM -0500, Liam R. Howlett wrote:
> * Alice Ryhl <aliceryhl@google.com> [260105 07:42]:
> > This is needed to inline these helpers into Rust code.
> >
> > Reviewed-by: Boqun Feng <boqun.feng@gmail.com>
> > Reviewed-by: Gary Guo <gary@garyguo.net>
> > Signed-off-by: Alice Ryhl <aliceryhl@google.com>
>
> Acked-by: Liam R. Howlett <Liam.Howlett@oracle.com>
Seems straightforward enough so:
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
>
> > ---
> > Cc: Andrew Morton <akpm@linux-foundation.org>
> > Cc: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
> > Cc: "Liam R. Howlett" <Liam.Howlett@oracle.com>
> > Cc: Uladzislau Rezki <urezki@gmail.com>
> > Cc: Vitaly Wool <vitaly.wool@konsulko.se>
> > Cc: linux-mm@kvack.org
> > ---
> > rust/helpers/mm.c | 20 ++++++++++----------
> > rust/helpers/page.c | 9 +++++----
> > rust/helpers/vmalloc.c | 2 +-
> > 3 files changed, 16 insertions(+), 15 deletions(-)
> >
> > diff --git a/rust/helpers/mm.c b/rust/helpers/mm.c
> > index 81b510c96fd2692dcb7ab4705f790bd3a41a630e..b5540997bd20d4398e2838956ed70b2fb61c5661 100644
> > --- a/rust/helpers/mm.c
> > +++ b/rust/helpers/mm.c
> > @@ -3,48 +3,48 @@
> > #include <linux/mm.h>
> > #include <linux/sched/mm.h>
> >
> > -void rust_helper_mmgrab(struct mm_struct *mm)
> > +__rust_helper void rust_helper_mmgrab(struct mm_struct *mm)
> > {
> > mmgrab(mm);
> > }
> >
> > -void rust_helper_mmdrop(struct mm_struct *mm)
> > +__rust_helper void rust_helper_mmdrop(struct mm_struct *mm)
> > {
> > mmdrop(mm);
> > }
> >
> > -void rust_helper_mmget(struct mm_struct *mm)
> > +__rust_helper void rust_helper_mmget(struct mm_struct *mm)
> > {
> > mmget(mm);
> > }
> >
> > -bool rust_helper_mmget_not_zero(struct mm_struct *mm)
> > +__rust_helper bool rust_helper_mmget_not_zero(struct mm_struct *mm)
> > {
> > return mmget_not_zero(mm);
> > }
> >
> > -void rust_helper_mmap_read_lock(struct mm_struct *mm)
> > +__rust_helper void rust_helper_mmap_read_lock(struct mm_struct *mm)
> > {
> > mmap_read_lock(mm);
> > }
> >
> > -bool rust_helper_mmap_read_trylock(struct mm_struct *mm)
> > +__rust_helper bool rust_helper_mmap_read_trylock(struct mm_struct *mm)
> > {
> > return mmap_read_trylock(mm);
> > }
> >
> > -void rust_helper_mmap_read_unlock(struct mm_struct *mm)
> > +__rust_helper void rust_helper_mmap_read_unlock(struct mm_struct *mm)
> > {
> > mmap_read_unlock(mm);
> > }
> >
> > -struct vm_area_struct *rust_helper_vma_lookup(struct mm_struct *mm,
> > - unsigned long addr)
> > +__rust_helper struct vm_area_struct *
> > +rust_helper_vma_lookup(struct mm_struct *mm, unsigned long addr)
> > {
> > return vma_lookup(mm, addr);
> > }
> >
> > -void rust_helper_vma_end_read(struct vm_area_struct *vma)
> > +__rust_helper void rust_helper_vma_end_read(struct vm_area_struct *vma)
> > {
> > vma_end_read(vma);
> > }
> > diff --git a/rust/helpers/page.c b/rust/helpers/page.c
> > index 7144de5a61dbdb3006a668961cd1b09440e74908..f8463fbed2a2670ddfd4c23dc922b46b0913c3a2 100644
> > --- a/rust/helpers/page.c
> > +++ b/rust/helpers/page.c
> > @@ -4,23 +4,24 @@
> > #include <linux/highmem.h>
> > #include <linux/mm.h>
> >
> > -struct page *rust_helper_alloc_pages(gfp_t gfp_mask, unsigned int order)
> > +__rust_helper struct page *rust_helper_alloc_pages(gfp_t gfp_mask,
> > + unsigned int order)
> > {
> > return alloc_pages(gfp_mask, order);
> > }
> >
> > -void *rust_helper_kmap_local_page(struct page *page)
> > +__rust_helper void *rust_helper_kmap_local_page(struct page *page)
> > {
> > return kmap_local_page(page);
> > }
> >
> > -void rust_helper_kunmap_local(const void *addr)
> > +__rust_helper void rust_helper_kunmap_local(const void *addr)
> > {
> > kunmap_local(addr);
> > }
> >
> > #ifndef NODE_NOT_IN_PAGE_FLAGS
> > -int rust_helper_page_to_nid(const struct page *page)
> > +__rust_helper int rust_helper_page_to_nid(const struct page *page)
> > {
> > return page_to_nid(page);
> > }
> > diff --git a/rust/helpers/vmalloc.c b/rust/helpers/vmalloc.c
> > index 7d7f7336b3d2f5a32e6a2b6cf8407da37775cfd9..326b030487a2b2199283b64b3b427e57cf5fb14a 100644
> > --- a/rust/helpers/vmalloc.c
> > +++ b/rust/helpers/vmalloc.c
> > @@ -2,7 +2,7 @@
> >
> > #include <linux/vmalloc.h>
> >
> > -void * __must_check __realloc_size(2)
> > +__rust_helper void *__must_check __realloc_size(2)
> > rust_helper_vrealloc_node_align(const void *p, size_t size, unsigned long align,
> > gfp_t flags, int node)
> > {
> >
> > --
> > 2.52.0.351.gbe84eed79e-goog
> >
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v2 27/27] rust: xarray: add __rust_helper to helpers
2026-01-05 12:42 [PATCH v2 00/27] Allow inlining C helpers into Rust when using LTO Alice Ryhl
2026-01-05 12:42 ` [PATCH v2 10/27] rust: maple_tree: add __rust_helper to helpers Alice Ryhl
2026-01-05 12:42 ` [PATCH v2 11/27] rust: mm: " Alice Ryhl
@ 2026-01-05 12:42 ` Alice Ryhl
2026-01-05 15:26 ` Tamir Duberstein
2026-01-15 9:02 ` Andreas Hindborg
2026-01-05 15:41 ` [PATCH v2 00/27] Allow inlining C helpers into Rust when using LTO Boqun Feng
2026-01-26 5:08 ` Miguel Ojeda
4 siblings, 2 replies; 11+ messages in thread
From: Alice Ryhl @ 2026-01-05 12:42 UTC (permalink / raw)
To: rust-for-linux
Cc: linux-kernel, Alice Ryhl, Boqun Feng, Gary Guo, Andrew Morton,
Matthew Wilcox, Tamir Duberstein, Andreas Hindborg,
linux-fsdevel, linux-mm
This is needed to inline these helpers into Rust code.
Reviewed-by: Boqun Feng <boqun.feng@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Tamir Duberstein <tamird@gmail.com>
Cc: Andreas Hindborg <a.hindborg@kernel.org>
Cc: linux-fsdevel@vger.kernel.org
Cc: linux-mm@kvack.org
---
rust/helpers/xarray.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/rust/helpers/xarray.c b/rust/helpers/xarray.c
index 60b299f11451d2c4a75e50e25dec4dac13f143f4..08979b3043410ff89d2adc0b2597825115c5100f 100644
--- a/rust/helpers/xarray.c
+++ b/rust/helpers/xarray.c
@@ -2,27 +2,27 @@
#include <linux/xarray.h>
-int rust_helper_xa_err(void *entry)
+__rust_helper int rust_helper_xa_err(void *entry)
{
return xa_err(entry);
}
-void rust_helper_xa_init_flags(struct xarray *xa, gfp_t flags)
+__rust_helper void rust_helper_xa_init_flags(struct xarray *xa, gfp_t flags)
{
return xa_init_flags(xa, flags);
}
-int rust_helper_xa_trylock(struct xarray *xa)
+__rust_helper int rust_helper_xa_trylock(struct xarray *xa)
{
return xa_trylock(xa);
}
-void rust_helper_xa_lock(struct xarray *xa)
+__rust_helper void rust_helper_xa_lock(struct xarray *xa)
{
return xa_lock(xa);
}
-void rust_helper_xa_unlock(struct xarray *xa)
+__rust_helper void rust_helper_xa_unlock(struct xarray *xa)
{
return xa_unlock(xa);
}
--
2.52.0.351.gbe84eed79e-goog
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH v2 27/27] rust: xarray: add __rust_helper to helpers
2026-01-05 12:42 ` [PATCH v2 27/27] rust: xarray: " Alice Ryhl
@ 2026-01-05 15:26 ` Tamir Duberstein
2026-01-15 9:02 ` Andreas Hindborg
1 sibling, 0 replies; 11+ messages in thread
From: Tamir Duberstein @ 2026-01-05 15:26 UTC (permalink / raw)
To: Alice Ryhl
Cc: rust-for-linux, linux-kernel, Boqun Feng, Gary Guo,
Andrew Morton, Matthew Wilcox, Andreas Hindborg, linux-fsdevel,
linux-mm
On Mon, Jan 5, 2026 at 7:43 AM Alice Ryhl <aliceryhl@google.com> wrote:
>
> This is needed to inline these helpers into Rust code.
>
> Reviewed-by: Boqun Feng <boqun.feng@gmail.com>
> Reviewed-by: Gary Guo <gary@garyguo.net>
> Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Acked-by: Tamir Duberstein <tamird@gmail.com>
> ---
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Matthew Wilcox <willy@infradead.org>
> Cc: Tamir Duberstein <tamird@gmail.com>
> Cc: Andreas Hindborg <a.hindborg@kernel.org>
> Cc: linux-fsdevel@vger.kernel.org
> Cc: linux-mm@kvack.org
> ---
> rust/helpers/xarray.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/rust/helpers/xarray.c b/rust/helpers/xarray.c
> index 60b299f11451d2c4a75e50e25dec4dac13f143f4..08979b3043410ff89d2adc0b2597825115c5100f 100644
> --- a/rust/helpers/xarray.c
> +++ b/rust/helpers/xarray.c
> @@ -2,27 +2,27 @@
>
> #include <linux/xarray.h>
>
> -int rust_helper_xa_err(void *entry)
> +__rust_helper int rust_helper_xa_err(void *entry)
> {
> return xa_err(entry);
> }
>
> -void rust_helper_xa_init_flags(struct xarray *xa, gfp_t flags)
> +__rust_helper void rust_helper_xa_init_flags(struct xarray *xa, gfp_t flags)
> {
> return xa_init_flags(xa, flags);
> }
>
> -int rust_helper_xa_trylock(struct xarray *xa)
> +__rust_helper int rust_helper_xa_trylock(struct xarray *xa)
> {
> return xa_trylock(xa);
> }
>
> -void rust_helper_xa_lock(struct xarray *xa)
> +__rust_helper void rust_helper_xa_lock(struct xarray *xa)
> {
> return xa_lock(xa);
> }
>
> -void rust_helper_xa_unlock(struct xarray *xa)
> +__rust_helper void rust_helper_xa_unlock(struct xarray *xa)
> {
> return xa_unlock(xa);
> }
>
> --
> 2.52.0.351.gbe84eed79e-goog
>
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH v2 27/27] rust: xarray: add __rust_helper to helpers
2026-01-05 12:42 ` [PATCH v2 27/27] rust: xarray: " Alice Ryhl
2026-01-05 15:26 ` Tamir Duberstein
@ 2026-01-15 9:02 ` Andreas Hindborg
1 sibling, 0 replies; 11+ messages in thread
From: Andreas Hindborg @ 2026-01-15 9:02 UTC (permalink / raw)
To: rust-for-linux, Alice Ryhl
Cc: linux-kernel, Boqun Feng, Gary Guo, Andrew Morton,
Matthew Wilcox, Tamir Duberstein, linux-fsdevel, linux-mm
On Mon, 05 Jan 2026 12:42:40 +0000, Alice Ryhl wrote:
> This is needed to inline these helpers into Rust code.
>
>
Applied, thanks!
[27/27] rust: xarray: add __rust_helper to helpers
commit: c455f19bbe6104debd980bb15515faf716bd81b8
Best regards,
--
Andreas Hindborg <a.hindborg@kernel.org>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2 00/27] Allow inlining C helpers into Rust when using LTO
2026-01-05 12:42 [PATCH v2 00/27] Allow inlining C helpers into Rust when using LTO Alice Ryhl
` (2 preceding siblings ...)
2026-01-05 12:42 ` [PATCH v2 27/27] rust: xarray: " Alice Ryhl
@ 2026-01-05 15:41 ` Boqun Feng
2026-01-26 5:08 ` Miguel Ojeda
4 siblings, 0 replies; 11+ messages in thread
From: Boqun Feng @ 2026-01-05 15:41 UTC (permalink / raw)
To: Alice Ryhl
Cc: rust-for-linux, linux-kernel, Gary Guo, Peter Zijlstra,
Elle Rhumsaa, Andreas Hindborg, linux-block, FUJITA Tomonori,
Miguel Ojeda, Michael Turquette, Stephen Boyd, linux-clk,
Benno Lossin, Danilo Krummrich, Thomas Gleixner, Paul Moore,
Serge Hallyn, linux-security-module, Josh Poimboeuf, Jason Baron,
Steven Rostedt, Ard Biesheuvel, Andrew Ballance, Andrew Morton,
Liam R. Howlett, maple-tree, linux-mm, Lorenzo Stoakes,
Uladzislau Rezki, Vitaly Wool, Rob Herring, devicetree,
Daniel Almeida, Michal Wilczynski, linux-pwm, Paul E. McKenney,
rcu, Will Deacon, Fiona Behrens, Greg Kroah-Hartman,
Vlastimil Babka, Christoph Lameter, David Rientjes, Ingo Molnar,
Waiman Long, Mitchell Levy, Frederic Weisbecker, Lyude Paul,
Anna-Maria Behnsen, John Stultz, linux-usb, Tejun Heo,
Lai Jiangshan, Matthew Wilcox, Tamir Duberstein, linux-fsdevel
On Mon, Jan 05, 2026 at 12:42:13PM +0000, Alice Ryhl wrote:
> This patch series adds __rust_helper to every single rust helper. The
> patches do not depend on each other, so maintainers please go ahead and
> pick up any patches relevant to your subsystem! Or provide your Acked-by
> so that Miguel can pick them up.
>
I queued the following into rust-sync:
rust: barrier: add __rust_helper to helpers
rust: blk: add __rust_helper to helpers
rust: completion: add __rust_helper to helpers
rust: cpu: add __rust_helper to helpers
rust: processor: add __rust_helper to helpers
rust: rcu: add __rust_helper to helpers
rust: refcount: add __rust_helper to helpers
rust: sync: add __rust_helper to helpers
rust: task: add __rust_helper to helpers
rust: time: add __rust_helper to helpers
rust: wait: add __rust_helper to helpers
Thanks!
Regards,
Boqun
> These changes were generated by adding __rust_helper and running
> ClangFormat. Unrelated formatting changes were removed manually.
>
[...]
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: [PATCH v2 00/27] Allow inlining C helpers into Rust when using LTO
2026-01-05 12:42 [PATCH v2 00/27] Allow inlining C helpers into Rust when using LTO Alice Ryhl
` (3 preceding siblings ...)
2026-01-05 15:41 ` [PATCH v2 00/27] Allow inlining C helpers into Rust when using LTO Boqun Feng
@ 2026-01-26 5:08 ` Miguel Ojeda
4 siblings, 0 replies; 11+ messages in thread
From: Miguel Ojeda @ 2026-01-26 5:08 UTC (permalink / raw)
To: Alice Ryhl
Cc: rust-for-linux, linux-kernel, Boqun Feng, Gary Guo,
Peter Zijlstra, Elle Rhumsaa, Andreas Hindborg, linux-block,
FUJITA Tomonori, Miguel Ojeda, Michael Turquette, Stephen Boyd,
linux-clk, Benno Lossin, Danilo Krummrich, Thomas Gleixner,
Paul Moore, Serge Hallyn, linux-security-module, Josh Poimboeuf,
Jason Baron, Steven Rostedt, Ard Biesheuvel, Andrew Ballance,
Andrew Morton, Liam R. Howlett, maple-tree, linux-mm,
Lorenzo Stoakes, Uladzislau Rezki, Vitaly Wool, Rob Herring,
devicetree, Daniel Almeida, Michal Wilczynski, linux-pwm,
Paul E. McKenney, rcu, Will Deacon, Fiona Behrens,
Greg Kroah-Hartman, Vlastimil Babka, Christoph Lameter,
David Rientjes, Ingo Molnar, Waiman Long, Mitchell Levy,
Frederic Weisbecker, Lyude Paul, Anna-Maria Behnsen, John Stultz,
linux-usb, Tejun Heo, Lai Jiangshan, Matthew Wilcox,
Tamir Duberstein, linux-fsdevel
On Mon, Jan 5, 2026 at 1:42 PM Alice Ryhl <aliceryhl@google.com> wrote:
>
> rust: bug: add __rust_helper to helpers
> rust: err: add __rust_helper to helpers
> rust: maple_tree: add __rust_helper to helpers
> rust: mm: add __rust_helper to helpers
> rust: of: add __rust_helper to helpers
> rust: rbtree: add __rust_helper to helpers
> rust: slab: add __rust_helper to helpers
> rust: uaccess: add __rust_helper to helpers
> rust: workqueue: add __rust_helper to helpers
Applied these to `rust-next` -- thanks everyone!
If someone did not intend for me to take it even if the Acked-by is
there (e.g. perhaps Andrew wanted to pick those nevertheless?), then
please shout.
With this, and if I didn't miss any message (plus looking at
linux-next where I see Greg picked usb), then only clk and jump_label
remain (plus any new incoming one).
Let's see if we can get them done next cycle then.
Cheers,
Miguel
^ permalink raw reply [flat|nested] 11+ messages in thread