All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/2] reset: small cleanups for x86
@ 2026-07-29  8:38 Denis Mukhin via U-Boot
  2026-07-29  8:38 ` [PATCH v1 1/2] reset: x86: Use cpu_hlt() in pch_sysreset_power_off() Denis Mukhin via U-Boot
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Denis Mukhin via U-Boot @ 2026-07-29  8:38 UTC (permalink / raw)
  To: u-boot; +Cc: sjg, trini, dmukhin

This is small cleanup series for x86 reset device driver.

Patch 1 introduces a small fixup for the x86 reset driver.
Patch 2 introduces a small fixup for the x86 EFI reset driver.

Denis Mukhin (2):
  reset: x86: Use cpu_hlt() in pch_sysreset_power_off()
  reset: x86: Use cpu_hlt() in efi_reset_system()

 drivers/sysreset/sysreset_x86.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

-- 
2.54.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v1 1/2] reset: x86: Use cpu_hlt() in pch_sysreset_power_off()
  2026-07-29  8:38 [PATCH v1 0/2] reset: small cleanups for x86 Denis Mukhin via U-Boot
@ 2026-07-29  8:38 ` Denis Mukhin via U-Boot
  2026-07-29  8:38 ` [PATCH v1 2/2] reset: x86: Use cpu_hlt() in efi_reset_system() Denis Mukhin via U-Boot
  2026-08-18 20:05 ` [PATCH v1 0/2] reset: small cleanups for x86 dmukhin
  2 siblings, 0 replies; 4+ messages in thread
From: Denis Mukhin via U-Boot @ 2026-07-29  8:38 UTC (permalink / raw)
  To: u-boot; +Cc: sjg, trini, dmukhin

From: Denis Mukhin <dmukhin@ford.com> 

Use cpu_hlt() instead of open-coded "hlt" in pch_sysreset_power_off().

Signed-off-by: Denis Mukhin <dmukhin@ford.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
---
Original patch: https://lore.kernel.org/u-boot/20260603070743.1268544-5-dmukhin@ford.com/
---
 drivers/sysreset/sysreset_x86.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/sysreset/sysreset_x86.c b/drivers/sysreset/sysreset_x86.c
index c2f28c65280f..05a3ff9c8363 100644
--- a/drivers/sysreset/sysreset_x86.c
+++ b/drivers/sysreset/sysreset_x86.c
@@ -65,7 +65,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)
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v1 2/2] reset: x86: Use cpu_hlt() in efi_reset_system()
  2026-07-29  8:38 [PATCH v1 0/2] reset: small cleanups for x86 Denis Mukhin via U-Boot
  2026-07-29  8:38 ` [PATCH v1 1/2] reset: x86: Use cpu_hlt() in pch_sysreset_power_off() Denis Mukhin via U-Boot
@ 2026-07-29  8:38 ` Denis Mukhin via U-Boot
  2026-08-18 20:05 ` [PATCH v1 0/2] reset: small cleanups for x86 dmukhin
  2 siblings, 0 replies; 4+ messages in thread
From: Denis Mukhin via U-Boot @ 2026-07-29  8:38 UTC (permalink / raw)
  To: u-boot; +Cc: sjg, trini, dmukhin

From: Denis Mukhin <dmukhin@ford.com> 

Use cpu_hlt() in busy loop in efi_reset_system() similarly to
pch_sysreset_power_off().

Note, this is safe for __efi_runtime-annotated efi_reset_system(),
because cpu_hlt() expands to a bare "hlt".

Signed-off-by: Denis Mukhin <dmukhin@ford.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
---
Original patch: https://lore.kernel.org/u-boot/20260603070743.1268544-6-dmukhin@ford.com/ 
---
 drivers/sysreset/sysreset_x86.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/sysreset/sysreset_x86.c b/drivers/sysreset/sysreset_x86.c
index 05a3ff9c8363..afb77d9c5c21 100644
--- 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();
 }
 #endif
 
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v1 0/2] reset: small cleanups for x86
  2026-07-29  8:38 [PATCH v1 0/2] reset: small cleanups for x86 Denis Mukhin via U-Boot
  2026-07-29  8:38 ` [PATCH v1 1/2] reset: x86: Use cpu_hlt() in pch_sysreset_power_off() Denis Mukhin via U-Boot
  2026-07-29  8:38 ` [PATCH v1 2/2] reset: x86: Use cpu_hlt() in efi_reset_system() Denis Mukhin via U-Boot
@ 2026-08-18 20:05 ` dmukhin
  2 siblings, 0 replies; 4+ messages in thread
From: dmukhin @ 2026-08-18 20:05 UTC (permalink / raw)
  To: u-boot; +Cc: sjg, trini, dmukhin

On Wed, Jul 29, 2026 at 01:38:24AM -0700, Denis Mukhin via U-Boot wrote:
> This is small cleanup series for x86 reset device driver.
> 
> Patch 1 introduces a small fixup for the x86 reset driver.
> Patch 2 introduces a small fixup for the x86 EFI reset driver.
> 
> Denis Mukhin (2):
>   reset: x86: Use cpu_hlt() in pch_sysreset_power_off()
>   reset: x86: Use cpu_hlt() in efi_reset_system()
> 
>  drivers/sysreset/sysreset_x86.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)

Just following up on that mini-cleanup series.

This is re-submission of the reviewed patches originally posted here:

  https://lore.kernel.org/u-boot/20260603070743.1268544-5-dmukhin@ford.com/
  https://lore.kernel.org/u-boot/20260603070743.1268544-6-dmukhin@ford.com/

Thanks,
Denis

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-08-18 20:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-29  8:38 [PATCH v1 0/2] reset: small cleanups for x86 Denis Mukhin via U-Boot
2026-07-29  8:38 ` [PATCH v1 1/2] reset: x86: Use cpu_hlt() in pch_sysreset_power_off() Denis Mukhin via U-Boot
2026-07-29  8:38 ` [PATCH v1 2/2] reset: x86: Use cpu_hlt() in efi_reset_system() Denis Mukhin via U-Boot
2026-08-18 20:05 ` [PATCH v1 0/2] reset: small cleanups for x86 dmukhin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.