[PATCH v3 4/6] reset: x86: Use cpu_hlt() in pch_sysreset_power_off()
dmukhin at ford.com
dmukhin at ford.com
Tue Jun 2 08:33:41 CEST 2026
On Mon, Jun 01, 2026 at 08:54:48AM -0600, Simon Glass wrote:
> 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.
I think I will move that efi_reset_system() fixup to a separate patch
with a proper description.
>
> Regards,
> Simon
More information about the U-Boot
mailing list