[PATCH v1 4/4] reset: x86: Use cpu_hlt() in pch_sysreset_power_off()
dmukhin at ford.com
dmukhin at ford.com
Fri May 22 03:23:12 CEST 2026
From: Denis Mukhin <dmukhin at ford.com>
Use cpu_hlt() instead of open-coded "hlt".
Also, use cpu_hlt() in reset path (including EFI) too.
Signed-off-by: Denis Mukhin <dmukhin at ford.com>
---
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
More information about the U-Boot
mailing list