diff options
| author | Mark Brown <broonie@kernel.org> | 2025-10-13 13:32:13 +0100 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2025-10-13 13:32:13 +0100 |
| commit | 4f38da1f027ea2c9f01bb71daa7a299c191b6940 (patch) | |
| tree | 701d1096f1a3df53ecf2a0231d2ed9a868c9b4b3 /rust/kernel/processor.rs | |
| parent | 18a5f1af596e6ba22cd40ada449063041f3ce6d4 (diff) | |
| parent | 3a8660878839faadb4f1a6dd72c3179c1df56787 (diff) | |
| download | linux-4f38da1f027ea2c9f01bb71daa7a299c191b6940.tar.gz linux-4f38da1f027ea2c9f01bb71daa7a299c191b6940.zip | |
spi: Merge up v6.18-rc1
Ensure my CI has a sensible baseline.
Diffstat (limited to 'rust/kernel/processor.rs')
| -rw-r--r-- | rust/kernel/processor.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/rust/kernel/processor.rs b/rust/kernel/processor.rs new file mode 100644 index 000000000000..85b49b3614dd --- /dev/null +++ b/rust/kernel/processor.rs @@ -0,0 +1,14 @@ +// SPDX-License-Identifier: GPL-2.0 + +//! Processor related primitives. +//! +//! C header: [`include/linux/processor.h`](srctree/include/linux/processor.h) + +/// Lower CPU power consumption or yield to a hyperthreaded twin processor. +/// +/// It also happens to serve as a compiler barrier. +#[inline] +pub fn cpu_relax() { + // SAFETY: Always safe to call. + unsafe { bindings::cpu_relax() } +} |
