[PATCH v3 4/6] reset: x86: Use cpu_hlt() in pch_sysreset_power_off()
Simon Glass
sjg at chromium.org
Mon Jun 1 16:54:48 CEST 2026
Hi Denis,
On 2026-05-29T03:48:33, None <dmukhin at ford.com> wrote:
> reset: x86: Use cpu_hlt() in pch_sysreset_power_off()
>
> Use cpu_hlt() instead of open-coded 'hlt' in pch_sysreset_power_off().
>
> Also, replace the open-coded busy loop in efi_reset_system() and use
> cpu_hlt().
>
> Signed-off-by: Denis Mukhin <dmukhin at ford.com>
>
> drivers/sysreset/sysreset_x86.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
Reviewed-by: Simon Glass <sjg at chromium.org>
> diff --git a/drivers/sysreset/sysreset_x86.c b/drivers/sysreset/sysreset_x86.c
> @@ -120,7 +120,8 @@ void __efi_runtime EFIAPI efi_reset_system(
>
> /* TODO EFI_RESET_SHUTDOWN */
>
> - while (1) { }
> + for (;;)
> + cpu_hlt();
> }
Just to check - this is an __efi_runtime function, so the body must
not call outside the runtime section after SetVirtualAddressMap().
cpu_hlt() is static inline __always_inline in asm/processor.h so it
expands to a bare hlt here, which is fine. Worth mentioning in the
commit message so the runtime-safety is explicit.
Regards,
Simon
More information about the U-Boot
mailing list