From: dmukhin@ford.com
To: Simon Glass <sjg@chromium.org>
Cc: dmukhin@ford.com, u-boot@lists.denx.de, trini@konsulko.com
Subject: Re: [PATCH v3 4/6] reset: x86: Use cpu_hlt() in pch_sysreset_power_off()
Date: Mon, 1 Jun 2026 23:33:41 -0700 [thread overview]
Message-ID: <ah55RWb/w2VGwH55@kraken> (raw)
In-Reply-To: <CAFLszTgub5tR06FAO01gbdD7mnUADGWyVZrLOgkpz+hXnDnKAg@mail.gmail.com>
On Mon, Jun 01, 2026 at 08:54:48AM -0600, Simon Glass wrote:
> Hi Denis,
>
> On 2026-05-29T03:48:33, None <dmukhin@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@ford.com>
> >
> > drivers/sysreset/sysreset_x86.c | 5 +++--
> > 1 file changed, 3 insertions(+), 2 deletions(-)
>
> Reviewed-by: Simon Glass <sjg@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
next prev parent reply other threads:[~2026-06-02 6:33 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-29 3:48 [PATCH v3 0/6] reset: add board reset type dmukhin
2026-05-29 3:48 ` [PATCH v3 1/6] reset: Allow per-board " dmukhin
2026-06-01 14:54 ` Simon Glass
2026-06-02 6:29 ` dmukhin
2026-05-29 3:48 ` [PATCH v3 2/6] reset: Add explicit cold reset support dmukhin
2026-06-01 14:54 ` Simon Glass
2026-06-02 6:31 ` dmukhin
2026-05-29 3:48 ` [PATCH v3 3/6] reset: Print reset type on diagnostic console dmukhin
2026-06-01 14:54 ` Simon Glass
2026-05-29 3:48 ` [PATCH v3 4/6] reset: x86: Use cpu_hlt() in pch_sysreset_power_off() dmukhin
2026-06-01 14:54 ` Simon Glass
2026-06-02 6:33 ` dmukhin [this message]
2026-05-29 3:48 ` [PATCH v3 5/6] docs: reset: document cold reset option dmukhin
2026-06-01 14:54 ` Simon Glass
2026-05-29 3:48 ` [PATCH v3 6/6] tests: reset: add cold/warm reset types dmukhin
2026-06-01 14:55 ` Simon Glass
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ah55RWb/w2VGwH55@kraken \
--to=dmukhin@ford.com \
--cc=sjg@chromium.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox