summaryrefslogtreecommitdiff
path: root/rust/helpers/cpu.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2025-06-12 14:23:56 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2025-06-12 14:23:56 +0300
commit332d6a94ce80efae2e6b38e01a46e92230577354 (patch)
treeca697ecc8168ed4d9ca9315ac08ed530ac204c61 /rust/helpers/cpu.c
parent19272b37aa4f83ca52bdf9c16d5d81bdd1354494 (diff)
parentc7f005f70d22cd5613cac30bf6d34867189e36a9 (diff)
downloadlinux-332d6a94ce80efae2e6b38e01a46e92230577354.tar.xz
Merge tag 'cpufreq-arm-fixes-6.16-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm
Merge CPUFreq fixes for 6.16-rc from Viresh Kumar: "- Implement CpuId rust abstraction and use it to fix doctest failure (Viresh Kumar). - Minor cleanups in the `# Safety` sections for cpufreq abstractions (Viresh Kumar)." * tag 'cpufreq-arm-fixes-6.16-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm: rust: cpu: Add CpuId::current() to retrieve current CPU ID rust: Use CpuId in place of raw CPU numbers rust: cpu: Introduce CpuId abstraction cpufreq: Convert `/// SAFETY` lines to `# Safety` sections
Diffstat (limited to 'rust/helpers/cpu.c')
-rw-r--r--rust/helpers/cpu.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/rust/helpers/cpu.c b/rust/helpers/cpu.c
new file mode 100644
index 000000000000..824e0adb19d4
--- /dev/null
+++ b/rust/helpers/cpu.c
@@ -0,0 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0
+
+#include <linux/smp.h>
+
+unsigned int rust_helper_raw_smp_processor_id(void)
+{
+ return raw_smp_processor_id();
+}