Skip to contentSkip to conversation

ACPI: add acpi_get_cpu_uid() stub helper

PATCH Applied Arnd Bergmann 3 participants 3 messages Apr 13 – Apr 15 ACPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ACPI: add acpi_get_cpu_uid() stub helper

From: Arnd Bergmann <[email protected]>

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")
---
 include/linux/acpi.h | 6 ++++++
 1 file changed, 6 insertions(+)
include/linux/acpi.h +6 -0
index 0afab1a2ad8e..4e5e0ff4c887 100644
@@ -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;
Signature · 1 line
2.39.5
Acked-by on v1 1/1
#1 lore raw

Thanks

Quoted 13 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

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")

...

maintainer Applied
#2 lore raw
Quoted 14 lines · fengchengwen

Thanks

Quoted 9 lines · Arnd Bergmann

From: Arnd Bergmann <[email protected]>

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)

      |             ^~~~~~~~~~~~~~~~
Quoted 6 lines
Quoted 4 lines

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")

...

Applied as 7.1-rc material, thanks!