[PATCH 2/2] ACPI, x86/boot: Remove {set|get}_root_pointer() ACPI callbacks

From: Hou Wenlong

Date: Sun Mar 01 2026 - 00:05:40 EST


After removing pvh_get_root_pointer(), the only get_root_pointer() ACPI
callback is x86_default_get_root_pointer(). Move the implementation
directly into 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.

Signed-off-by: Hou Wenlong <houwenlong.hwl@xxxxxxxxxxxx>
---
arch/x86/include/asm/acpi.h | 15 +++------------
arch/x86/include/asm/x86_init.h | 4 ----
arch/x86/kernel/acpi/boot.c | 10 ----------
arch/x86/kernel/x86_init.c | 2 --
4 files changed, 3 insertions(+), 28 deletions(-)

diff --git a/arch/x86/include/asm/acpi.h b/arch/x86/include/asm/acpi.h
index a03aa6f999d1..1286e044c623 100644
--- a/arch/x86/include/asm/acpi.h
+++ b/arch/x86/include/asm/acpi.h
@@ -17,6 +17,7 @@
#include <asm/cpufeature.h>
#include <asm/irq_vectors.h>
#include <asm/xen/hypervisor.h>
+#include <asm/setup.h>

#include <xen/xen.h>

@@ -160,20 +161,17 @@ static inline bool acpi_has_cpu_in_madt(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);
+ boot_params.acpi_rsdp_addr = 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 boot_params.acpi_rsdp_addr;
}

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 +191,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/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index a3f2fb1fea1b..6365a75d9e1c 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -1828,16 +1828,6 @@ void __init arch_reserve_mem_area(acpi_physical_address addr, size_t size)
e820__update_table_print();
}

-void x86_default_set_root_pointer(u64 addr)
-{
- boot_params.acpi_rsdp_addr = addr;
-}
-
-u64 x86_default_get_root_pointer(void)
-{
- return boot_params.acpi_rsdp_addr;
-}
-
#ifdef CONFIG_XEN_PV
void __iomem *x86_acpi_os_ioremap(acpi_physical_address phys, acpi_size size)
{
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,
},
};
--
2.31.1