[PATCH v2] ACPI, x86/boot: Remove {set|get}_root_pointer() ACPI callbacks
From: Hou Wenlong
Date: Thu Mar 05 2026 - 22:50:01 EST
After removing pvh_get_root_pointer(), the only get_root_pointer() ACPI
callback is x86_default_get_root_pointer(). So call it directly in
acpi_arch_get_root_pointer() and remove the get_root_pointer() ACPI
callback. Since the set_root_pointer() ACPI callback is also only
x86_default_set_root_pointer(), remove it as well.
Note that x86_default_get_root_pointer() cannot be directly folded into
acpi_arch_get_root_pointer() for now, as it references 'boot_params',
which requires including asm/bootparams.h. This header file, in turn,
includes linux/screen_info.h, which declares pixel_format as a struct,
while amdgpu defines it as an enum, leading to namespace clashes.
Acked-by: Rafael J. Wysocki (Intel) <rafael@xxxxxxxxxx>
Signed-off-by: Hou Wenlong <houwenlong.hwl@xxxxxxxxxxxx>
---
arch/x86/include/asm/acpi.h | 17 +++++------------
arch/x86/include/asm/x86_init.h | 4 ----
arch/x86/kernel/x86_init.c | 2 --
3 files changed, 5 insertions(+), 18 deletions(-)
diff --git a/arch/x86/include/asm/acpi.h b/arch/x86/include/asm/acpi.h
index a03aa6f999d1..66ca6badb3e5 100644
--- a/arch/x86/include/asm/acpi.h
+++ b/arch/x86/include/asm/acpi.h
@@ -157,23 +157,23 @@ static inline bool acpi_has_cpu_in_madt(void)
return !!acpi_lapic;
}
+void x86_default_set_root_pointer(u64 addr);
+u64 x86_default_get_root_pointer(void);
+
#define ACPI_HAVE_ARCH_SET_ROOT_POINTER
static __always_inline void acpi_arch_set_root_pointer(u64 addr)
{
- x86_init.acpi.set_root_pointer(addr);
+ x86_default_set_root_pointer(addr);
}
#define ACPI_HAVE_ARCH_GET_ROOT_POINTER
static __always_inline u64 acpi_arch_get_root_pointer(void)
{
- return x86_init.acpi.get_root_pointer();
+ return x86_default_get_root_pointer();
}
void acpi_generic_reduced_hw_init(void);
-void x86_default_set_root_pointer(u64 addr);
-u64 x86_default_get_root_pointer(void);
-
#ifdef CONFIG_XEN_PV
/* A Xen PV domain needs a special acpi_os_ioremap() handling. */
extern void __iomem * (*acpi_os_ioremap)(acpi_physical_address phys,
@@ -193,13 +193,6 @@ static inline void disable_acpi(void) { }
static inline void acpi_generic_reduced_hw_init(void) { }
-static inline void x86_default_set_root_pointer(u64 addr) { }
-
-static inline u64 x86_default_get_root_pointer(void)
-{
- return 0;
-}
-
#endif /* !CONFIG_ACPI */
#define ARCH_HAS_POWER_INIT 1
diff --git a/arch/x86/include/asm/x86_init.h b/arch/x86/include/asm/x86_init.h
index 6c8a6ead84f6..254221eec395 100644
--- a/arch/x86/include/asm/x86_init.h
+++ b/arch/x86/include/asm/x86_init.h
@@ -132,13 +132,9 @@ struct x86_hyper_init {
/**
* struct x86_init_acpi - x86 ACPI init functions
- * @set_root_pointer: set RSDP address
- * @get_root_pointer: get RSDP address
* @reduced_hw_early_init: hardware reduced platform early init
*/
struct x86_init_acpi {
- void (*set_root_pointer)(u64 addr);
- u64 (*get_root_pointer)(void);
void (*reduced_hw_early_init)(void);
};
diff --git a/arch/x86/kernel/x86_init.c b/arch/x86/kernel/x86_init.c
index ebefb77c37bb..4a1a70366b71 100644
--- a/arch/x86/kernel/x86_init.c
+++ b/arch/x86/kernel/x86_init.c
@@ -121,8 +121,6 @@ struct x86_init_ops x86_init __initdata = {
},
.acpi = {
- .set_root_pointer = x86_default_set_root_pointer,
- .get_root_pointer = x86_default_get_root_pointer,
.reduced_hw_early_init = acpi_generic_reduced_hw_init,
},
};
base-commit: 01420de66faaa5b9b031d9fa2c58ab4cae8f35bc
prerequisite-patch-id: 5490aaedd3761b7a9ddc57b4990384f0b144d665
--
2.31.1