[PATCH 10/10] x86: Add cleanup_before_linux()
Simon Glass
sjg at chromium.org
Wed Jan 7 20:02:09 CET 2026
On Tue, 6 Jan 2026 at 19:37, Peter Robinson <pbrobinson at gmail.com> wrote:
>
> On Wed, 7 Jan 2026 at 00:40, Simon Glass <sjg at chromium.org> wrote:
> >
> > From: Simon Glass <sjg at chromium.org>
> >
> > This function is not present on x86, but there is an x86-specific
> > version which is never called. Add the former, making it call the
> > latter.
>
> If the later is never called up until now why is it actually needed,
> if it's not been missed until now why not just drop it? Please
> describe why in the commit.
I'll add it to the commit message for v2. The code is:
int __weak x86_cleanup_before_linux(void)
{
int ret;
ret = mp_park_aps();
if (ret)
return log_msg_ret("park", ret);
bootstage_stash_default();
return 0;
}
It seems important to park the APs before booting. I think it was just
an oversight.
>
> > Signed-off-by: Simon Glass <sjg at chromium.org>
> > Signed-off-by: Simon Glass <simon.glass at canonical.com>
> > ---
> >
> > arch/x86/cpu/cpu.c | 5 +++++
> > 1 file changed, 5 insertions(+)
> >
> > diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c
> > index c373b14df30..f756a9ebf09 100644
> > --- a/arch/x86/cpu/cpu.c
> > +++ b/arch/x86/cpu/cpu.c
> > @@ -80,6 +80,11 @@ int __weak x86_cleanup_before_linux(void)
> > return 0;
> > }
> >
> > +int cleanup_before_linux(void)
> > +{
> > + return x86_cleanup_before_linux();
> > +}
> > +
> > int x86_init_cache(void)
> > {
> > enable_caches();
> > --
> > 2.43.0
> >
More information about the U-Boot
mailing list