ACPI: Unify CPU UID interface and fix ARM64 TPH steer-tag issue
| From: | Chengwen Feng <fengchengwen-AT-huawei.com> | |
| To: | Bjorn Helgaas <bhelgaas-AT-google.com>, Catalin Marinas <catalin.marinas-AT-arm.com>, Will Deacon <will-AT-kernel.org>, "Rafael J . Wysocki" <rafael-AT-kernel.org> | |
| Subject: | [PATCH RESEND v10 0/8] ACPI: Unify CPU UID interface and fix ARM64 TPH steer-tag issue | |
| Date: | Wed, 01 Apr 2026 16:16:32 +0800 | |
| Message-ID: | <20260401081640.26875-1-fengchengwen@huawei.com> | |
| Cc: | Jonathan Corbet <corbet-AT-lwn.net>, WANG Xuerui <kernel-AT-xen0n.name>, Thomas Gleixner <tglx-AT-kernel.org>, Dave Hansen <dave.hansen-AT-linux.intel.com>, "H . Peter Anvin" <hpa-AT-zytor.com>, Juergen Gross <jgross-AT-suse.com>, Boris Ostrovsky <boris.ostrovsky-AT-oracle.com>, Len Brown <lenb-AT-kernel.org>, Sunil V L <sunilvl-AT-ventanamicro.com>, Mark Rutland <mark.rutland-AT-arm.com>, Jonathan Cameron <jonathan.cameron-AT-huawei.com>, Kees Cook <kees-AT-kernel.org>, Yanteng Si <si.yanteng-AT-linux.dev>, Sean Christopherson <seanjc-AT-google.com>, Kai Huang <kai.huang-AT-intel.com>, Tom Lendacky <thomas.lendacky-AT-amd.com>, Thomas Huth <thuth-AT-redhat.com>, Thorsten Blum <thorsten.blum-AT-linux.dev>, Kevin Loughlin <kevinloughlin-AT-google.com>, Zheyun Shen <szy0127-AT-sjtu.edu.cn>, Peter Zijlstra <peterz-AT-infradead.org>, Pawan Gupta <pawan.kumar.gupta-AT-linux.intel.com>, Xin Li <xin-AT-zytor.com>, "Ahmed S . Darwish" <darwi-AT-linutronix.de>, Sohil Mehta <sohil.mehta-AT-intel.com>, Ilkka Koskinen <ilkka-AT-os.amperecomputing.com>, Robin Murphy <robin.murphy-AT-arm.com>, James Clark <james.clark-AT-linaro.org>, Besar Wicaksono <bwicaksono-AT-nvidia.com>, Ma Ke <make24-AT-iscas.ac.cn>, Wei Huang <wei.huang2-AT-amd.com>, Andy Gospodarek <andrew.gospodarek-AT-broadcom.com>, Somnath Kotur <somnath.kotur-AT-broadcom.com>, <punit.agrawal-AT-oss.qualcomm.com>, <guohanjun-AT-huawei.com>, <suzuki.poulose-AT-arm.com>, <ryan.roberts-AT-arm.com>, <chenl311-AT-chinatelecom.cn>, <masahiroy-AT-kernel.org>, <wangyuquan1236-AT-phytium.com.cn>, <anshuman.khandual-AT-arm.com>, <heinrich.schuchardt-AT-canonical.com>, <Eric.VanTassell-AT-amd.com>, <wangzhou1-AT-hisilicon.com>, <wanghuiqiang-AT-huawei.com>, <liuyonglong-AT-huawei.com>, <fengchengwen-AT-huawei.com>, <linux-pci-AT-vger.kernel.org>, <linux-doc-AT-vger.kernel.org>, <linux-kernel-AT-vger.kernel.org>, <linux-arm-kernel-AT-lists.infradead.org>, <loongarch-AT-lists.linux.dev>, <linux-riscv-AT-lists.infradead.org>, <xen-devel-AT-lists.xenproject.org>, <linux-acpi-AT-vger.kernel.org>, <linux-perf-users-AT-vger.kernel.org>, <stable-AT-vger.kernel.org>, <x86-AT-kernel.org> | |
| Archive-link: | Article |
This patchset unifies ACPI Processor UID retrieval across
arm64/loongarch/riscv/x86 via acpi_get_cpu_uid() (with input validation)
and fixes ARM64 CPU steer-tag retrieval failure in PCI/TPH:
1-4: Add acpi_get_cpu_uid() for arm64/loongarch/riscv/x86 (update
respective users)
5: Centralize acpi_get_cpu_uid() declaration in include/linux/acpi.h
6: Clean up perf/arm_cspmu
7: Clean up ACPI/PPTT and remove unused get_acpi_id_for_cpu()
8: Pass ACPI Processor UID to Cache Locality _DSM
The interface refactor ensures consistent CPU UID retrieval across
architectures (no functional changes for valid inputs) and provides the
unified interface required for the ARM64 TPH fix
---
Changes in v10-resend:
- Add Catalin's ack-by for arm64 commit
- Add CC to x86@kernel.org
Changes in v10:
- Refine commit header&log according to Punit's and Bjorn's review
- Split perf/arm_cspmu as a separate commit which address Punit's
review
Changes in v9:
- Address Bjorn's review: split commits to each platform so that make
them easy to review
Changes in v8:
- Moving arm64's get_cpu_for_acpi_id() to kernel/acpi.c which address
Jeremy's review
Chengwen Feng (8):
arm64: acpi: Add acpi_get_cpu_uid() for unified ACPI CPU UID retrieval
LoongArch: Add acpi_get_cpu_uid() for unified ACPI CPU UID retrieval
RISC-V: ACPI: Add acpi_get_cpu_uid() for unified ACPI CPU UID
retrieval
x86/acpi: Add acpi_get_cpu_uid() for unified ACPI CPU UID retrieval
ACPI: Centralize acpi_get_cpu_uid() declaration in
include/linux/acpi.h
perf: arm_cspmu: Switch to acpi_get_cpu_uid() from
get_acpi_id_for_cpu()
ACPI: PPTT: Use acpi_get_cpu_uid() and remove get_acpi_id_for_cpu()
PCI/TPH: Pass ACPI Processor UID to Cache Locality _DSM
Documentation/PCI/tph.rst | 4 +--
arch/arm64/include/asm/acpi.h | 17 +---------
arch/arm64/kernel/acpi.c | 30 ++++++++++++++++++
arch/loongarch/include/asm/acpi.h | 5 ---
arch/loongarch/kernel/acpi.c | 9 ++++++
arch/riscv/include/asm/acpi.h | 4 ---
arch/riscv/kernel/acpi.c | 16 ++++++++++
arch/riscv/kernel/acpi_numa.c | 9 ++++--
arch/x86/include/asm/cpu.h | 1 -
arch/x86/include/asm/smp.h | 1 -
arch/x86/kernel/acpi/boot.c | 20 ++++++++++++
arch/x86/xen/enlighten_hvm.c | 5 +--
drivers/acpi/pptt.c | 50 ++++++++++++++++++++++--------
drivers/acpi/riscv/rhct.c | 7 ++++-
drivers/pci/tph.c | 16 +++++++---
drivers/perf/arm_cspmu/arm_cspmu.c | 6 ++--
include/linux/acpi.h | 11 +++++++
include/linux/pci-tph.h | 4 +--
18 files changed, 158 insertions(+), 57 deletions(-)
--
2.17.1
