lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJZ5v0gd_6b6s4aEpSvdfb4-+AULTWkqQqM3OE1eg5XzYaxQFQ@mail.gmail.com>
Date: Mon, 24 Nov 2025 17:01:11 +0100
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: Ricardo Neri <ricardo.neri-calderon@...ux.intel.com>
Cc: x86@...nel.org, Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, 
	Rob Herring <robh@...nel.org>, "K. Y. Srinivasan" <kys@...rosoft.com>, 
	Haiyang Zhang <haiyangz@...rosoft.com>, Wei Liu <wei.liu@...nel.org>, 
	Dexuan Cui <decui@...rosoft.com>, Michael Kelley <mhklinux@...look.com>, 
	"Rafael J. Wysocki" <rafael@...nel.org>, Saurabh Sengar <ssengar@...ux.microsoft.com>, 
	Chris Oo <cho@...rosoft.com>, "Kirill A. Shutemov" <kas@...nel.org>, linux-hyperv@...r.kernel.org, 
	devicetree@...r.kernel.org, linux-acpi@...r.kernel.org, 
	linux-kernel@...r.kernel.org, Ricardo Neri <ricardo.neri@...el.com>
Subject: Re: [PATCH v7 1/9] x86/acpi: Add functions to setup and access the
 wakeup mailbox

On Mon, Nov 17, 2025 at 6:04 PM Ricardo Neri
<ricardo.neri-calderon@...ux.intel.com> wrote:
>
> Systems that describe hardware using DeviceTree graphs may enumerate and
> implement the wakeup mailbox as defined in the ACPI specification but do
> not otherwise depend on ACPI. Expose functions to setup and access the
> location of the wakeup mailbox from outside ACPI code.
>
> The function acpi_setup_mp_wakeup_mailbox() stores the physical address of
> the mailbox and updates the wakeup_secondary_cpu_64() APIC callback.
>
> The function acpi_madt_multiproc_wakeup_mailbox() returns a pointer to the
> mailbox.
>
> Signed-off-by: Ricardo Neri <ricardo.neri-calderon@...ux.intel.com>

Acked-by: Rafael J. Wysocki (Intel) <rafael@...nel.org>

> ---
> Changes in v7:
>  - Moved function declarations to arch/x86/include/asm/acpi.h
>  - Added stubs for !CONFIG_ACPI.
>  - Do not use these new functions in madt_wakeup.c.
>  - Dropped Acked-by and Reviewed-by tags from Rafael and Dexuan as this
>    patch changed.
>
> Changes in v6:
>  - Fixed grammar error in the subject of the patch. (Rafael)
>  - Added Acked-by tag from Rafael. Thanks!
>  - Added Reviewed-by tag from Dexuan. Thanks!
>
> Changes in v5:
>  - None
>
> Changes in v4:
>  - Squashed the two first patches of the series into one, both introduce
>    helper functions. (Rafael)
>  - Renamed setup_mp_wakeup_mailbox() as acpi_setup_mp_wakeup_mailbox().
>    (Rafael)
>  - Dropped the function prototype for !CONFIG_X86_64. (Rafael)
>
> Changes in v3:
>  - Introduced this patch.
>
> Changes in v2:
>  - N/A
> ---
>  arch/x86/include/asm/acpi.h        | 10 ++++++++++
>  arch/x86/kernel/acpi/madt_wakeup.c | 11 +++++++++++
>  2 files changed, 21 insertions(+)
>
> diff --git a/arch/x86/include/asm/acpi.h b/arch/x86/include/asm/acpi.h
> index a03aa6f999d1..820df375df79 100644
> --- a/arch/x86/include/asm/acpi.h
> +++ b/arch/x86/include/asm/acpi.h
> @@ -182,6 +182,9 @@ void __iomem *x86_acpi_os_ioremap(acpi_physical_address phys, acpi_size size);
>  #define acpi_os_ioremap acpi_os_ioremap
>  #endif
>
> +void acpi_setup_mp_wakeup_mailbox(u64 addr);
> +struct acpi_madt_multiproc_wakeup_mailbox *acpi_get_mp_wakeup_mailbox(void);
> +
>  #else /* !CONFIG_ACPI */
>
>  #define acpi_lapic 0
> @@ -200,6 +203,13 @@ static inline u64 x86_default_get_root_pointer(void)
>         return 0;
>  }
>
> +static inline void acpi_setup_mp_wakeup_mailbox(u64 addr) { }
> +
> +static inline struct acpi_madt_multiproc_wakeup_mailbox *acpi_get_mp_wakeup_mailbox(void)
> +{
> +       return NULL;
> +}
> +
>  #endif /* !CONFIG_ACPI */
>
>  #define ARCH_HAS_POWER_INIT    1
> diff --git a/arch/x86/kernel/acpi/madt_wakeup.c b/arch/x86/kernel/acpi/madt_wakeup.c
> index 6d7603511f52..82caf44b45e3 100644
> --- a/arch/x86/kernel/acpi/madt_wakeup.c
> +++ b/arch/x86/kernel/acpi/madt_wakeup.c
> @@ -247,3 +247,14 @@ int __init acpi_parse_mp_wake(union acpi_subtable_headers *header,
>
>         return 0;
>  }
> +
> +void __init acpi_setup_mp_wakeup_mailbox(u64 mailbox_paddr)
> +{
> +       acpi_mp_wake_mailbox_paddr = mailbox_paddr;
> +       apic_update_callback(wakeup_secondary_cpu_64, acpi_wakeup_cpu);
> +}
> +
> +struct acpi_madt_multiproc_wakeup_mailbox *acpi_get_mp_wakeup_mailbox(void)
> +{
> +       return acpi_mp_wake_mailbox;
> +}
>
> --
> 2.43.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ