Re: [PATCH v4 02/10] x86/acpi: Move acpi_wakeup_cpu() and helpers to smpwakeup.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 04, 2025 at 11:12:53AM +0200, Rafael J. Wysocki wrote:
> On Wed, Jun 4, 2025 at 2:18 AM Ricardo Neri
> <ricardo.neri-calderon@xxxxxxxxxxxxxxx> wrote:
> >
> > The bootstrap processor uses acpi_wakeup_cpu() to indicate to firmware that
> > it wants to boot a secondary CPU using a mailbox as described in the
> > Multiprocessor Wakeup Structure of the ACPI specification.
> >
> > The platform firmware may implement the mailbox as described in the ACPI
> > specification but enumerate it using a DeviceTree graph. An example of
> > this is OpenHCL paravisor.
> >
> > Move the code used to setup and use the mailbox for CPU wakeup out of the
> > ACPI directory into a new smpwakeup.c file that both ACPI and DeviceTree
> > can use.
> >
> > No functional changes are intended.
> >
> > Co-developed-by: Yunhong Jiang <yunhong.jiang@xxxxxxxxxxxxxxx>
> > Signed-off-by: Yunhong Jiang <yunhong.jiang@xxxxxxxxxxxxxxx>
> > Signed-off-by: Ricardo Neri <ricardo.neri-calderon@xxxxxxxxxxxxxxx>
> > ---
> > Changes since v3:
> >  - Create a new file smpwakeup.c instead of relocating it to smpboot.c.
> >    (Rafael)
> >
> > Changes since v2:
> >  - Only move to smpboot.c the portions of the code that configure and
> >    use the mailbox. This also resolved the compile warnings about unused
> >    functions that Michael Kelley reported.
> >  - Edited the commit message for clarity.
> >
> > Changes since v1:
> >  - None.
> > ---
> >  arch/x86/Kconfig                   |  7 ++++
> >  arch/x86/kernel/Makefile           |  1 +
> >  arch/x86/kernel/acpi/madt_wakeup.c | 76 ----------------------------------
> >  arch/x86/kernel/smpwakeup.c        | 83 ++++++++++++++++++++++++++++++++++++++
> >  4 files changed, 91 insertions(+), 76 deletions(-)
> >
> > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> > index cb0f4af31789..82147edb355a 100644
> > --- a/arch/x86/Kconfig
> > +++ b/arch/x86/Kconfig
> > @@ -1113,6 +1113,13 @@ config X86_LOCAL_APIC
> >         depends on X86_64 || SMP || X86_UP_APIC || PCI_MSI
> >         select IRQ_DOMAIN_HIERARCHY
> >
> > +config X86_MAILBOX_WAKEUP
> > +       def_bool y
> > +       depends on OF || ACPI_MADT_WAKEUP
> 
> At this point the dependency on OF is premature.  IMV it should be
> added in a later patch.

I see your point. Sure, I will the dependency in a later patch.




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux