From nobody Mon Mar 23 21:26:19 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=quarantine dis=none) header.from=huawei.com ARC-Seal: i=1; a=rsa-sha256; t=1773903507; cv=none; d=zohomail.com; s=zohoarc; b=hfnc93RfuZFSXLM00aJKaktS+wCQk0OG7wCPXGrQ2sGKxjKxSiQ0rh97jEV5gNOWZB+gsWdK0joUEx3MchdTA661VWKKu6eq8XA4Uuho9l5YU5Remt+w/zfiJXwi0lLY+D9qSjLGIsYTbQEB9Qq6/BvFWIEMeB7RIUGV8pTF8CY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773903507; h=Content-Type:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=oewhn2IMbmtF3+gd2nTsD3HCqK7a08k6f+Tu2Cay+iU=; b=QLp22MKiQJ3ilTVhZHWCB1VOz5gvzLwN/Qv/Wwz9MbWAfSOU241oCur03u+xfZwqFbyKufIzYloR6ducURDqFrmiaBXgWVWsnVcD/QZp06jZDmiXkI7wNGNlbbGC6oK0VeISCpjsSqtI/eWCfV/0j/lsJb80Ax4covPoI1mVGqo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1773903507189546.7194564827184; Wed, 18 Mar 2026 23:58:27 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.1256663.1551190 (Exim 4.92) (envelope-from ) id 1w37KS-0004Rr-90; Thu, 19 Mar 2026 06:58:00 +0000 Received: by outflank-mailman (output) from mailman id 1256663.1551190; Thu, 19 Mar 2026 06:58:00 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1w37KS-0004Rf-5M; Thu, 19 Mar 2026 06:58:00 +0000 Received: by outflank-mailman (input) for mailman id 1256663; Thu, 19 Mar 2026 06:57:59 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1w37KR-0003zM-0b for xen-devel@lists.xenproject.org; Thu, 19 Mar 2026 06:57:59 +0000 Received: from canpmsgout06.his.huawei.com (canpmsgout06.his.huawei.com [113.46.200.221]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id f43612db-2360-11f1-b164-2bf370ae4941; Thu, 19 Mar 2026 07:57:57 +0100 (CET) Received: from mail.maildlp.com (unknown [172.19.162.197]) by canpmsgout06.his.huawei.com (SkyGuard) with ESMTPS id 4fbxGZ3YfYzRhVC; Thu, 19 Mar 2026 14:52:54 +0800 (CST) Received: from kwepemk500009.china.huawei.com (unknown [7.202.194.94]) by mail.maildlp.com (Postfix) with ESMTPS id BB35540363; Thu, 19 Mar 2026 14:57:53 +0800 (CST) Received: from localhost.localdomain (10.50.163.32) by kwepemk500009.china.huawei.com (7.202.194.94) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Thu, 19 Mar 2026 14:57:51 +0800 X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: f43612db-2360-11f1-b164-2bf370ae4941 dkim-signature: v=1; a=rsa-sha256; d=huawei.com; s=dkim; c=relaxed/relaxed; q=dns/txt; h=From; bh=oewhn2IMbmtF3+gd2nTsD3HCqK7a08k6f+Tu2Cay+iU=; b=oFXndCwr5vh34n8gkLHTXEqaV/0hW8+wBcd4nv9xiy4HlW6wnZujLWAqw5SOSdiBqNavOPkDN 9/+jlDZPPrN8NNsh9km26BRhYie1bdqp34HdjgLcKvnwuGrBr4N5KNZvnUcjwwYV3Sn8Jltg1CS eKmjnoNFW6S+6Hh8gKOwc+M= From: Chengwen Feng To: Bjorn Helgaas , Catalin Marinas , Will Deacon , "Rafael J . Wysocki" CC: Jonathan Corbet , Shuah Khan , Huacai Chen , WANG Xuerui , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , , "H . Peter Anvin" , Juergen Gross , Boris Ostrovsky , Len Brown , Sunil V L , Mark Rutland , Jonathan Cameron , Kees Cook , Yanteng Si , Sean Christopherson , Kai Huang , Tom Lendacky , Thomas Huth , Thorsten Blum , Kevin Loughlin , Zheyun Shen , Peter Zijlstra , Pawan Gupta , Xin Li , "Ahmed S . Darwish" , Sohil Mehta , Ilkka Koskinen , Robin Murphy , James Clark , Besar Wicaksono , Ma Ke , Wei Huang , Andy Gospodarek , Somnath Kotur , , , , , , , , , , , , , , , , , , , , , , , , Subject: [PATCH v9 5/7] ACPI: Centralize acpi_get_cpu_uid() declaration in include/linux/acpi.h Date: Thu, 19 Mar 2026 14:57:33 +0800 Message-ID: <20260319065735.45954-6-fengchengwen@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20260319065735.45954-1-fengchengwen@huawei.com> References: <20260319065735.45954-1-fengchengwen@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.50.163.32] X-ClientProxiedBy: kwepems100001.china.huawei.com (7.221.188.238) To kwepemk500009.china.huawei.com (7.202.194.94) X-ZohoMail-DKIM: pass (identity @huawei.com) X-ZM-MESSAGEID: 1773903507784158500 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" - Add acpi_get_cpu_uid() prototype to include/linux/acpi.h (global scope) - Remove arch-specific acpi_get_cpu_uid() declarations from arm64/loongarch/riscv/x86 asm/acpi.h This centralizes the interface declaration for consistency, avoiding duplicate prototypes across architectures and simplifying future maintenance. Cc: stable@vger.kernel.org Signed-off-by: Chengwen Feng Reviewed-by: Jonathan Cameron --- arch/arm64/include/asm/acpi.h | 1 - arch/loongarch/include/asm/acpi.h | 1 - arch/riscv/include/asm/acpi.h | 1 - arch/x86/include/asm/acpi.h | 2 -- include/linux/acpi.h | 11 +++++++++++ 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h index 2219a3301e72..bdb0ecf95b5c 100644 --- a/arch/arm64/include/asm/acpi.h +++ b/arch/arm64/include/asm/acpi.h @@ -118,7 +118,6 @@ static inline u32 get_acpi_id_for_cpu(unsigned int cpu) { return acpi_cpu_get_madt_gicc(cpu)->uid; } -int acpi_get_cpu_uid(unsigned int cpu, u32 *uid); int get_cpu_for_acpi_id(u32 uid); =20 static inline void arch_fix_phys_package_id(int num, u32 slot) { } diff --git a/arch/loongarch/include/asm/acpi.h b/arch/loongarch/include/asm= /acpi.h index 8bb101b4557e..7376840fa9f7 100644 --- a/arch/loongarch/include/asm/acpi.h +++ b/arch/loongarch/include/asm/acpi.h @@ -44,7 +44,6 @@ static inline u32 get_acpi_id_for_cpu(unsigned int cpu) { return acpi_core_pic[cpu_logical_map(cpu)].processor_id; } -int acpi_get_cpu_uid(unsigned int cpu, u32 *uid); =20 #endif /* !CONFIG_ACPI */ =20 diff --git a/arch/riscv/include/asm/acpi.h b/arch/riscv/include/asm/acpi.h index f3520cc85af3..6e13695120bc 100644 --- a/arch/riscv/include/asm/acpi.h +++ b/arch/riscv/include/asm/acpi.h @@ -65,7 +65,6 @@ static inline u32 get_acpi_id_for_cpu(int cpu) { return acpi_cpu_get_madt_rintc(cpu)->uid; } -int acpi_get_cpu_uid(unsigned int cpu, u32 *uid); =20 int acpi_get_riscv_isa(struct acpi_table_header *table, unsigned int cpu, const char **isa); diff --git a/arch/x86/include/asm/acpi.h b/arch/x86/include/asm/acpi.h index 92b5c27c4fea..a03aa6f999d1 100644 --- a/arch/x86/include/asm/acpi.h +++ b/arch/x86/include/asm/acpi.h @@ -157,8 +157,6 @@ static inline bool acpi_has_cpu_in_madt(void) return !!acpi_lapic; } =20 -int acpi_get_cpu_uid(unsigned int cpu, u32 *uid); - #define ACPI_HAVE_ARCH_SET_ROOT_POINTER static __always_inline void acpi_arch_set_root_pointer(u64 addr) { diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 4d2f0bed7a06..74a73f0e5944 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -324,6 +324,17 @@ int acpi_unmap_cpu(int cpu); =20 acpi_handle acpi_get_processor_handle(int cpu); =20 +/** + * acpi_get_cpu_uid() - Get ACPI Processor UID of from MADT table + * @cpu: Logical CPU number (0-based) + * @uid: Pointer to store ACPI Processor UID + * + * Return: 0 on success (ACPI Processor ID stored in *uid); + * -EINVAL if CPU number is invalid or out of range; + * -ENODEV if ACPI Processor UID for the CPU is not found. + */ +int acpi_get_cpu_uid(unsigned int cpu, u32 *uid); + #ifdef CONFIG_ACPI_HOTPLUG_IOAPIC int acpi_get_ioapic_id(acpi_handle handle, u32 gsi_base, u64 *phys_addr); #endif --=20 2.17.1