Hi Denis,

On 2026-05-22T01:23:09, None <[email protected]> wrote:
> reset: x86: Use cpu_hlt() in pch_sysreset_power_off()
>
> Use cpu_hlt() instead of open-coded 'hlt'.
> Also, use cpu_hlt() in reset path (including EFI) too.
>
> Signed-off-by: Denis Mukhin <[email protected]>
>
> drivers/sysreset/sysreset_x86.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)

> diff --git a/drivers/sysreset/sysreset_x86.c b/drivers/sysreset/sysreset_x86.c
> @@ -10,6 +10,7 @@
>  #include <pch.h>
>  #include <sysreset.h>
>  #include <acpi/acpi_s3.h>
> +#include <asm/cpu.h>
>  #include <asm/io.h>
>  #include <asm/processor.h>
>  #include <asm/sysreset.h>

cpu_hlt() is defined in <asm/processor.h>, so do you need this new include?

> diff --git a/drivers/sysreset/sysreset_x86.c b/drivers/sysreset/sysreset_x86.c
> @@ -65,7 +66,7 @@ int pch_sysreset_power_off(struct udevice *dev)
>       outl(reg32, pm.base + pm.pm1_cnt_ofs);
>
>       for (;;)
> -             asm('hlt');
> +             cpu_hlt();
>  }

The commit message says "use cpu_hlt() in reset path (including EFI)
too", but x86_sysreset_request() is untouched - only the EFI path.
Please reword, e.g. "also replace the open-coded busy loop in
efi_reset_system()".

Regards,
Simon

Reply via email to