From: Denis Mukhin <[email protected]> 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 index c2f28c65280f..c4e34cdc78af 100644 --- 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> @@ -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(); } static int x86_sysreset_request(struct udevice *dev, enum sysreset_t type) @@ -120,7 +121,8 @@ void __efi_runtime EFIAPI efi_reset_system( /* TODO EFI_RESET_SHUTDOWN */ - while (1) { } + for (;;) + cpu_hlt(); } #endif -- 2.54.0

