[PATCH 27/36] rust: cpu: Add __rust_helper to helpers

From: Boqun Feng

Date: Sun Jan 11 2026 - 07:03:25 EST


From: Alice Ryhl <aliceryhl@xxxxxxxxxx>

This is needed to inline these helpers into Rust code.

Reviewed-by: Boqun Feng <boqun.feng@xxxxxxxxx>
Reviewed-by: Gary Guo <gary@xxxxxxxxxxx>
Signed-off-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>
Signed-off-by: Boqun Feng <boqun.feng@xxxxxxxxx>
Link: https://patch.msgid.link/20260105-define-rust-helper-v2-6-51da5f454a67@xxxxxxxxxx
---
rust/helpers/cpu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/helpers/cpu.c b/rust/helpers/cpu.c
index 824e0adb19d4..5759349b2c88 100644
--- a/rust/helpers/cpu.c
+++ b/rust/helpers/cpu.c
@@ -2,7 +2,7 @@

#include <linux/smp.h>

-unsigned int rust_helper_raw_smp_processor_id(void)
+__rust_helper unsigned int rust_helper_raw_smp_processor_id(void)
{
return raw_smp_processor_id();
}
--
2.51.0