* [PATCH] ACPI: add acpi_get_cpu_uid() stub helper
@ 2026-04-13 7:01 Arnd Bergmann
2026-04-13 11:41 ` fengchengwen
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2026-04-13 7:01 UTC (permalink / raw)
To: Rafael J. Wysocki, Jonathan Cameron, Chengwen Feng
Cc: Arnd Bergmann, Len Brown, Catalin Marinas, Gavin Shan,
Shaopeng Tan, James Morse, Marc Zyngier, Kees Cook, Ben Horgan,
Dave Jiang, Sakari Ailus, linux-acpi, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
When ACPI is disabled, x86 Xen support fails to build:
arch/x86/xen/enlighten_hvm.c: In function 'xen_cpu_up_prepare_hvm':
arch/x86/xen/enlighten_hvm.c:165:13: error: implicit declaration of function 'acpi_get_cpu_uid' [-Wimplicit-function-declaration]
165 | if (acpi_get_cpu_uid(cpu, &cpu_uid) == 0)
| ^~~~~~~~~~~~~~~~
Add a trivial stub that can be used in place of the real function.
Fixes: f652d0a4e13c ("ACPI: Centralize acpi_get_cpu_uid() declaration in include/linux/acpi.h")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
include/linux/acpi.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 0afab1a2ad8e..4e5e0ff4c887 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -964,6 +964,12 @@ static inline int acpi_table_parse(char *id,
return -ENODEV;
}
+static inline int acpi_get_cpu_uid(unsigned int cpu, u32 *uid)
+{
+ *uid = cpu;
+ return 0;
+}
+
static inline int acpi_nvs_register(__u64 start, __u64 size)
{
return 0;
--
2.39.5
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] ACPI: add acpi_get_cpu_uid() stub helper
2026-04-13 7:01 [PATCH] ACPI: add acpi_get_cpu_uid() stub helper Arnd Bergmann
@ 2026-04-13 11:41 ` fengchengwen
0 siblings, 0 replies; 2+ messages in thread
From: fengchengwen @ 2026-04-13 11:41 UTC (permalink / raw)
To: Arnd Bergmann, Rafael J. Wysocki, Jonathan Cameron
Cc: Arnd Bergmann, Len Brown, Catalin Marinas, Gavin Shan,
Shaopeng Tan, James Morse, Marc Zyngier, Kees Cook, Ben Horgan,
Dave Jiang, Sakari Ailus, linux-acpi, linux-kernel
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
Thanks
On 4/13/2026 3:01 PM, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> When ACPI is disabled, x86 Xen support fails to build:
>
> arch/x86/xen/enlighten_hvm.c: In function 'xen_cpu_up_prepare_hvm':
> arch/x86/xen/enlighten_hvm.c:165:13: error: implicit declaration of function 'acpi_get_cpu_uid' [-Wimplicit-function-declaration]
> 165 | if (acpi_get_cpu_uid(cpu, &cpu_uid) == 0)
> | ^~~~~~~~~~~~~~~~
>
> Add a trivial stub that can be used in place of the real function.
>
> Fixes: f652d0a4e13c ("ACPI: Centralize acpi_get_cpu_uid() declaration in include/linux/acpi.h")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
...
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-04-13 11:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-13 7:01 [PATCH] ACPI: add acpi_get_cpu_uid() stub helper Arnd Bergmann
2026-04-13 11:41 ` fengchengwen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox