From 2440a9d67b0785132e303ed6f12dff8e80baa547 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Wed, 14 Feb 2024 18:26:47 -0500 Subject: kernel: cpu: Add hint_spinwait() This commit introduces a macro that must exist per architecture (even if it does nothing) to ensure it is machine independent. Signed-off-by: Ian Moffett --- share/man/man9/arch.9 | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'share') diff --git a/share/man/man9/arch.9 b/share/man/man9/arch.9 index 3285208..adbc437 100644 --- a/share/man/man9/arch.9 +++ b/share/man/man9/arch.9 @@ -95,6 +95,13 @@ The macro calls an internal function that fetches the cpu_info structure for the BSP. +The macro +.Ft hint_spinwait() +hints the processor that it is currently +in a spin-wait loop. This greatly reduces the +processor’s power consumption and improves +the performance of the spin-wait loop. + The function these macros call must return a pointer to a .Ft cpu_info -- cgit v1.2.3