From nobody Thu Apr 9 19:00:50 2026 Received: from out198-28.us.a.mail.aliyun.com (out198-28.us.a.mail.aliyun.com [47.90.198.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 85AF7366073 for ; Fri, 6 Mar 2026 03:41:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=47.90.198.28 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772768503; cv=none; b=Ip2ZKkZDjqcEz4CH74cRBn8h59Nsl6FCJd2miO2UEpoC3PqkjCVJE4LtnabgkMyEf1rwUyq8Xv9FD26pN1vmFGerPgNFZ6sqbPYdYKKTHFE2DmHTIzajwEDYqtgYnzAT4+VqzTvIy3S8Fz3lr+0t+PV640YFFx/irWDt0h8AKB8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772768503; c=relaxed/simple; bh=F+SUBAjAyt5vbQEyHssh6HmDB6EAGwd3eq6Q4KiCtiA=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=gR3wcTkqj5vnY3Yp5dQn3QkGEin0fE7ZAJW+MPox5COBf5cjLZH7KSYTRtwg3DwvCQiNRdCyxufpqukRM6t7S18Kju5jSZVEptq42hcfjLD4sJ4osryt6UMG0vZlGEWV3i/5Z3jI8jeEVQMDQMf0bTWHRhwf4S4Y1RxHUGP1KhU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com; spf=pass smtp.mailfrom=antgroup.com; dkim=pass (1024-bit key) header.d=antgroup.com header.i=@antgroup.com header.b=pbltJR4I; arc=none smtp.client-ip=47.90.198.28 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=antgroup.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=antgroup.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=antgroup.com header.i=@antgroup.com header.b="pbltJR4I" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=antgroup.com; s=default; t=1772768489; h=From:To:Subject:Date:Message-Id:MIME-Version; bh=reFaM1BhxMjQLewoc7Ex5KbSn4wZaL1OA0GV27UK5hc=; b=pbltJR4IW4nLVBVNZMBYfbXGfeWUFodVC7/p5Mi8Hn+zoWBZBiIJXLuBcBXKpbrYVJrjkR908w+NhuGaXKcV3+PjC+gaaA2Ax5La07PDrFfm55b3DRMV6+fdKy97Fo5OTC9jccqKQOt49/HnDxmbhMncsm3l2zLkZ84/BifETq4= Received: from localhost(mailfrom:houwenlong.hwl@antgroup.com fp:SMTPD_---.gmDDB5t_1772767555 cluster:ay29) by smtp.aliyun-inc.com; Fri, 06 Mar 2026 11:25:55 +0800 From: Hou Wenlong To: linux-kernel@vger.kernel.org Cc: Juergen Gross , Hou Wenlong , "Rafael J . Wysocki" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Kees Cook , Nikolay Borisov , "Peter Zijlstra (Intel)" , Sohil Mehta , Randy Dunlap Subject: [PATCH v2] ACPI, x86/boot: Remove {set|get}_root_pointer() ACPI callbacks Date: Fri, 6 Mar 2026 11:25:30 +0800 Message-Id: <67ac041bd29a95adc542523d20316f00f01c585e.1772767337.git.houwenlong.hwl@antgroup.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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) Signed-off-by: Hou Wenlong --- 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; } =20 +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); } =20 #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(); } =20 void acpi_generic_reduced_hw_init(void); =20 -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) { } =20 static inline void acpi_generic_reduced_hw_init(void) { } =20 -static inline void x86_default_set_root_pointer(u64 addr) { } - -static inline u64 x86_default_get_root_pointer(void) -{ - return 0; -} - #endif /* !CONFIG_ACPI */ =20 #define ARCH_HAS_POWER_INIT 1 diff --git a/arch/x86/include/asm/x86_init.h b/arch/x86/include/asm/x86_ini= t.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 { =20 /** * 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); }; =20 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 =3D { }, =20 .acpi =3D { - .set_root_pointer =3D x86_default_set_root_pointer, - .get_root_pointer =3D x86_default_get_root_pointer, .reduced_hw_early_init =3D acpi_generic_reduced_hw_init, }, }; base-commit: 01420de66faaa5b9b031d9fa2c58ab4cae8f35bc prerequisite-patch-id: 5490aaedd3761b7a9ddc57b4990384f0b144d665 --=20 2.31.1