Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2218436/?format=api
{ "id": 2218436, "url": "http://patchwork.ozlabs.org/api/patches/2218436/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260401081640.26875-4-fengchengwen@huawei.com/", "project": { "id": 28, "url": "http://patchwork.ozlabs.org/api/projects/28/?format=api", "name": "Linux PCI development", "link_name": "linux-pci", "list_id": "linux-pci.vger.kernel.org", "list_email": "linux-pci@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260401081640.26875-4-fengchengwen@huawei.com>", "list_archive_url": null, "date": "2026-04-01T08:16:35", "name": "[RESEND,v10,3/8] RISC-V: ACPI: Add acpi_get_cpu_uid() for unified ACPI CPU UID retrieval", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "ab7faf8249d27bae984fc45c313aa5ca2a87d1fe", "submitter": { "id": 92756, "url": "http://patchwork.ozlabs.org/api/people/92756/?format=api", "name": "fengchengwen", "email": "fengchengwen@huawei.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260401081640.26875-4-fengchengwen@huawei.com/mbox/", "series": [ { "id": 498292, "url": "http://patchwork.ozlabs.org/api/series/498292/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/list/?series=498292", "date": "2026-04-01T08:16:32", "name": "ACPI: Unify CPU UID interface and fix ARM64 TPH steer-tag issue", "version": 10, "mbox": "http://patchwork.ozlabs.org/series/498292/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2218436/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2218436/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "\n <linux-pci+bounces-51656-incoming=patchwork.ozlabs.org@vger.kernel.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "linux-pci@vger.kernel.org" ], "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=huawei.com header.i=@huawei.com header.a=rsa-sha256\n header.s=dkim header.b=l/7oJpMq;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c04:e001:36c::12fc:5321; helo=tor.lore.kernel.org;\n envelope-from=linux-pci+bounces-51656-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com\n header.b=\"l/7oJpMq\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=113.46.200.226", "smtp.subspace.kernel.org;\n dmarc=pass (p=quarantine dis=none) header.from=huawei.com", "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=huawei.com" ], "Received": [ "from tor.lore.kernel.org (tor.lore.kernel.org\n [IPv6:2600:3c04:e001:36c::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4flyZP6QR8z1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 01 Apr 2026 19:19:25 +1100 (AEDT)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id 22E8930CAE23\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 1 Apr 2026 08:17:39 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 2B0F23B19BE;\n\tWed, 1 Apr 2026 08:17:04 +0000 (UTC)", "from canpmsgout11.his.huawei.com (canpmsgout11.his.huawei.com\n [113.46.200.226])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 95A583B0ADB;\n\tWed, 1 Apr 2026 08:17:01 +0000 (UTC)", "from mail.maildlp.com (unknown [172.19.163.163])\n\tby canpmsgout11.his.huawei.com (SkyGuard) with ESMTPS id 4flyNJ5zjPzKm91;\n\tWed, 1 Apr 2026 16:10:40 +0800 (CST)", "from kwepemk500009.china.huawei.com (unknown [7.202.194.94])\n\tby mail.maildlp.com (Postfix) with ESMTPS id 743394048B;\n\tWed, 1 Apr 2026 16:16:52 +0800 (CST)", "from localhost.localdomain (10.50.163.32) by\n kwepemk500009.china.huawei.com (7.202.194.94) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.2.1544.11; Wed, 1 Apr 2026 16:16:50 +0800" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1775031424; cv=none;\n b=dejEePuOQpemKUioDcSFXcj6P+52hrLxHmsDqMC4E5zQuntk+k2hbRtW2nJd8Mnq3z+3ia+U52bx5NPq6+6drgK1Crqygf2ymJrALX+2iac6v1dKKjA/eGgwszTBMHvfwK/DqwRjmoC7HLUI1z9iOL0y/emTCnRwJhjQf68LtMc=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1775031424; c=relaxed/simple;\n\tbh=xnGg7URF6SJUcVBsYgX8twXUnvnGOuIUA9tK8uf3WvE=;\n\th=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version:Content-Type;\n b=DSTrPCWcOyhe1+TQs7oRrTMCjFpEbAXJEXWwnJc+Cc4PelOW2QcMnPQszAf1pW6jtKmTUpaPMagwealwOJL3TMuzXGWoTsMpTGaNqOjryNSSvCEyAOmurwX94WNXxHOyaARoZR8fJiMIAU3IYlP9AHFEIZTleCPWXIEPlJZesZc=", "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=quarantine dis=none) header.from=huawei.com;\n spf=pass smtp.mailfrom=huawei.com;\n dkim=pass (1024-bit key) header.d=huawei.com header.i=@huawei.com\n header.b=l/7oJpMq; arc=none smtp.client-ip=113.46.200.226", "dkim-signature": "v=1; a=rsa-sha256; d=huawei.com; s=dkim;\n\tc=relaxed/relaxed; q=dns/txt;\n\th=From;\n\tbh=BMMryEb1CdnOx2gMiVv+9iHKONhR3XK5c+5CZUibkPo=;\n\tb=l/7oJpMqJuYSGHZyOqLiw5LD07h+45LWAipYVAvEt9pYxSp4UxJSqwXgX66M8/EZ74aeSBY3M\n\tqLpVsSs+rpKpxDOoVmFTloYQFQ4DUIG80JTpBOmlHJ7rSI3KUDZxGFyGCXDxs8sVu0UH3BlI+It\n\tfJwAj4fQtMaqP5gUwirfIBk=", "From": "Chengwen Feng <fengchengwen@huawei.com>", "To": "Bjorn Helgaas <bhelgaas@google.com>, Catalin Marinas\n\t<catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, \"Rafael J .\n Wysocki\" <rafael@kernel.org>", "CC": "Jonathan Corbet <corbet@lwn.net>, WANG Xuerui <kernel@xen0n.name>, Thomas\n Gleixner <tglx@kernel.org>, Dave Hansen <dave.hansen@linux.intel.com>, \"H .\n Peter Anvin\" <hpa@zytor.com>, Juergen Gross <jgross@suse.com>, Boris\n Ostrovsky <boris.ostrovsky@oracle.com>, Len Brown <lenb@kernel.org>, Sunil V\n L <sunilvl@ventanamicro.com>, Mark Rutland <mark.rutland@arm.com>, Jonathan\n Cameron <jonathan.cameron@huawei.com>, Kees Cook <kees@kernel.org>, Yanteng\n Si <si.yanteng@linux.dev>, Sean Christopherson <seanjc@google.com>, Kai Huang\n\t<kai.huang@intel.com>, Tom Lendacky <thomas.lendacky@amd.com>, Thomas Huth\n\t<thuth@redhat.com>, Thorsten Blum <thorsten.blum@linux.dev>, Kevin Loughlin\n\t<kevinloughlin@google.com>, Zheyun Shen <szy0127@sjtu.edu.cn>, Peter Zijlstra\n\t<peterz@infradead.org>, Pawan Gupta <pawan.kumar.gupta@linux.intel.com>, Xin\n Li <xin@zytor.com>, \"Ahmed S . Darwish\" <darwi@linutronix.de>, Sohil Mehta\n\t<sohil.mehta@intel.com>, Ilkka Koskinen <ilkka@os.amperecomputing.com>, Robin\n Murphy <robin.murphy@arm.com>, James Clark <james.clark@linaro.org>, Besar\n Wicaksono <bwicaksono@nvidia.com>, Ma Ke <make24@iscas.ac.cn>, Wei Huang\n\t<wei.huang2@amd.com>, Andy Gospodarek <andrew.gospodarek@broadcom.com>,\n\tSomnath Kotur <somnath.kotur@broadcom.com>, <punit.agrawal@oss.qualcomm.com>,\n\t<guohanjun@huawei.com>, <suzuki.poulose@arm.com>, <ryan.roberts@arm.com>,\n\t<chenl311@chinatelecom.cn>, <masahiroy@kernel.org>,\n\t<wangyuquan1236@phytium.com.cn>, <anshuman.khandual@arm.com>,\n\t<heinrich.schuchardt@canonical.com>, <Eric.VanTassell@amd.com>,\n\t<wangzhou1@hisilicon.com>, <wanghuiqiang@huawei.com>,\n\t<liuyonglong@huawei.com>, <fengchengwen@huawei.com>,\n\t<linux-pci@vger.kernel.org>, <linux-doc@vger.kernel.org>,\n\t<linux-kernel@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>,\n\t<loongarch@lists.linux.dev>, <linux-riscv@lists.infradead.org>,\n\t<xen-devel@lists.xenproject.org>, <linux-acpi@vger.kernel.org>,\n\t<linux-perf-users@vger.kernel.org>, <stable@vger.kernel.org>,\n\t<x86@kernel.org>", "Subject": "[PATCH RESEND v10 3/8] RISC-V: ACPI: Add acpi_get_cpu_uid() for\n unified ACPI CPU UID retrieval", "Date": "Wed, 1 Apr 2026 16:16:35 +0800", "Message-ID": "<20260401081640.26875-4-fengchengwen@huawei.com>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20260401081640.26875-1-fengchengwen@huawei.com>", "References": "<20260401081640.26875-1-fengchengwen@huawei.com>", "Precedence": "bulk", "X-Mailing-List": "linux-pci@vger.kernel.org", "List-Id": "<linux-pci.vger.kernel.org>", "List-Subscribe": "<mailto:linux-pci+subscribe@vger.kernel.org>", "List-Unsubscribe": "<mailto:linux-pci+unsubscribe@vger.kernel.org>", "MIME-Version": "1.0", "Content-Type": "text/plain", "X-ClientProxiedBy": "kwepems200001.china.huawei.com (7.221.188.67) To\n kwepemk500009.china.huawei.com (7.202.194.94)" }, "content": "As a step towards unifying the interface for retrieving ACPI CPU UID\nacross architectures, introduce a new function acpi_get_cpu_uid() for\nriscv. While at it, add input validation to make the code more robust.\n\nAnd also update acpi_numa.c and rhct.c to use the new interface instead\nof the legacy get_acpi_id_for_cpu().\n\nCc: stable@vger.kernel.org\nSigned-off-by: Chengwen Feng <fengchengwen@huawei.com>\nReviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>\n---\n arch/riscv/include/asm/acpi.h | 1 +\n arch/riscv/kernel/acpi.c | 16 ++++++++++++++++\n arch/riscv/kernel/acpi_numa.c | 9 ++++++---\n drivers/acpi/riscv/rhct.c | 7 ++++++-\n 4 files changed, 29 insertions(+), 4 deletions(-)", "diff": "diff --git a/arch/riscv/include/asm/acpi.h b/arch/riscv/include/asm/acpi.h\nindex 6e13695120bc..f3520cc85af3 100644\n--- a/arch/riscv/include/asm/acpi.h\n+++ b/arch/riscv/include/asm/acpi.h\n@@ -65,6 +65,7 @@ static inline u32 get_acpi_id_for_cpu(int cpu)\n {\n \treturn acpi_cpu_get_madt_rintc(cpu)->uid;\n }\n+int acpi_get_cpu_uid(unsigned int cpu, u32 *uid);\n \n int acpi_get_riscv_isa(struct acpi_table_header *table,\n \t\t unsigned int cpu, const char **isa);\ndiff --git a/arch/riscv/kernel/acpi.c b/arch/riscv/kernel/acpi.c\nindex 71698ee11621..322ea92aa39f 100644\n--- a/arch/riscv/kernel/acpi.c\n+++ b/arch/riscv/kernel/acpi.c\n@@ -337,3 +337,19 @@ int raw_pci_write(unsigned int domain, unsigned int bus,\n }\n \n #endif\t/* CONFIG_PCI */\n+\n+int acpi_get_cpu_uid(unsigned int cpu, u32 *uid)\n+{\n+\tstruct acpi_madt_rintc *rintc;\n+\n+\tif (cpu >= nr_cpu_ids)\n+\t\treturn -EINVAL;\n+\n+\trintc = acpi_cpu_get_madt_rintc(cpu);\n+\tif (!rintc)\n+\t\treturn -ENODEV;\n+\n+\t*uid = rintc->uid;\n+\treturn 0;\n+}\n+EXPORT_SYMBOL_GPL(acpi_get_cpu_uid);\ndiff --git a/arch/riscv/kernel/acpi_numa.c b/arch/riscv/kernel/acpi_numa.c\nindex 130769e3a99c..6a2d4289f806 100644\n--- a/arch/riscv/kernel/acpi_numa.c\n+++ b/arch/riscv/kernel/acpi_numa.c\n@@ -37,11 +37,14 @@ static int __init acpi_numa_get_nid(unsigned int cpu)\n \n static inline int get_cpu_for_acpi_id(u32 uid)\n {\n-\tint cpu;\n+\tu32 cpu_uid;\n+\tint ret;\n \n-\tfor (cpu = 0; cpu < nr_cpu_ids; cpu++)\n-\t\tif (uid == get_acpi_id_for_cpu(cpu))\n+\tfor (int cpu = 0; cpu < nr_cpu_ids; cpu++) {\n+\t\tret = acpi_get_cpu_uid(cpu, &cpu_uid);\n+\t\tif (ret == 0 && uid == cpu_uid)\n \t\t\treturn cpu;\n+\t}\n \n \treturn -EINVAL;\n }\ndiff --git a/drivers/acpi/riscv/rhct.c b/drivers/acpi/riscv/rhct.c\nindex caa2c16e1697..8f3f38c64a88 100644\n--- a/drivers/acpi/riscv/rhct.c\n+++ b/drivers/acpi/riscv/rhct.c\n@@ -44,10 +44,15 @@ int acpi_get_riscv_isa(struct acpi_table_header *table, unsigned int cpu, const\n \tstruct acpi_rhct_isa_string *isa_node;\n \tstruct acpi_table_rhct *rhct;\n \tu32 *hart_info_node_offset;\n-\tu32 acpi_cpu_id = get_acpi_id_for_cpu(cpu);\n+\tu32 acpi_cpu_id;\n+\tint ret;\n \n \tBUG_ON(acpi_disabled);\n \n+\tret = acpi_get_cpu_uid(cpu, &acpi_cpu_id);\n+\tif (ret != 0)\n+\t\treturn ret;\n+\n \tif (!table) {\n \t\trhct = acpi_get_rhct();\n \t\tif (!rhct)\n", "prefixes": [ "RESEND", "v10", "3/8" ] }