get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2218442/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2218442,
    "url": "http://patchwork.ozlabs.org/api/patches/2218442/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260401081640.26875-5-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-5-fengchengwen@huawei.com>",
    "list_archive_url": null,
    "date": "2026-04-01T08:16:36",
    "name": "[RESEND,v10,4/8] x86/acpi: Add acpi_get_cpu_uid() for unified ACPI CPU UID retrieval",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "499c8049e17cd793e90549314b9c65c7481f485f",
    "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-5-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/2218442/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2218442/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-pci+bounces-51653-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=I76d5Qkg;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c15:e001:75::12fc:5321; helo=sin.lore.kernel.org;\n envelope-from=linux-pci+bounces-51653-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=\"I76d5Qkg\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=113.46.200.220",
            "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 sin.lore.kernel.org (sin.lore.kernel.org\n [IPv6:2600:3c15:e001:75::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4flynF0x8hz1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 01 Apr 2026 19:28:49 +1100 (AEDT)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sin.lore.kernel.org (Postfix) with ESMTP id B5F0B3057AC8\n\tfor <incoming@patchwork.ozlabs.org>; Wed,  1 Apr 2026 08:17:07 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id A2F173ACEE3;\n\tWed,  1 Apr 2026 08:16:58 +0000 (UTC)",
            "from canpmsgout05.his.huawei.com (canpmsgout05.his.huawei.com\n [113.46.200.220])\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 946683A3E9A;\n\tWed,  1 Apr 2026 08:16:56 +0000 (UTC)",
            "from mail.maildlp.com (unknown [172.19.162.144])\n\tby canpmsgout05.his.huawei.com (SkyGuard) with ESMTPS id 4flyPG5v0Lz12LJb;\n\tWed,  1 Apr 2026 16:11:30 +0800 (CST)",
            "from kwepemk500009.china.huawei.com (unknown [7.202.194.94])\n\tby mail.maildlp.com (Postfix) with ESMTPS id 225C340538;\n\tWed,  1 Apr 2026 16:16:54 +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:52 +0800"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1775031418; cv=none;\n b=XE3CeDo0Q+L18OV6L/v6mS7akROfvTSinqEC6ipFa4CZC9zR1OQDUKzWQAxGyE+sbEugjJcKYydswO9t6NRURTC2tbEXNplzhjFFoizHirdVaGm/HIzKv15ymyxBNcTRCldKtOXUD+MxJy/GCIug2D5QKwI56/4Uv0XRunOFPWU=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1775031418; c=relaxed/simple;\n\tbh=9PXgtATdM0hsyiohw3KRQdbtl/M0iHcE3pB9laQWxPE=;\n\th=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version:Content-Type;\n b=B7s6N1OhJxMUihhwEfcYvwpAlolwlzs+Nro4GlGBO0UY8+yPQbnUWhhgiAg2WKIQzkypdBN9GXODwASPfmgutsXS6rAPCH6zkR68UhIRPZG/oCKicuZmbRpTlh+ZXZLXcKxW7IOmLPlPFSzjeahGRrVimjRWfPl4Ulaofqk8SMQ=",
        "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=I76d5Qkg; arc=none smtp.client-ip=113.46.200.220",
        "dkim-signature": "v=1; a=rsa-sha256; d=huawei.com; s=dkim;\n\tc=relaxed/relaxed; q=dns/txt;\n\th=From;\n\tbh=/bDHT0vostLWviBcH0LGnrUXN/7+wtQhJKC8xvlaZ1w=;\n\tb=I76d5QkgB06G/X/wos41vVtgRQepXQMzc5bCmZUjG61rsMvqBqMxjyiWV13dSj/N0vARfMR+I\n\tTIpo+e0ZZ/G2PYTKyAK+od5BAX4GJxZnIIHvWHRL80Tl9ySzHsM4ReaK/m6QcwIZU7CfdK4/sr4\n\thK45B5FTc4PW95z2AIDDxVc=",
        "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 4/8] x86/acpi: Add acpi_get_cpu_uid() for unified\n ACPI CPU UID retrieval",
        "Date": "Wed, 1 Apr 2026 16:16:36 +0800",
        "Message-ID": "<20260401081640.26875-5-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\nx86. While at it, add input validation to make the code more robust.\n\nUpdate Xen-related code to use acpi_get_cpu_uid() instead of the legacy\ncpu_acpi_id() function, and remove the now-unused cpu_acpi_id() to clean\nup redundant code.\n\nCc: stable@vger.kernel.org\nSigned-off-by: Chengwen Feng <fengchengwen@huawei.com>\nReviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>\nReviewed-by: Juergen Gross <jgross@suse.com>\n---\n arch/x86/include/asm/acpi.h  |  2 ++\n arch/x86/include/asm/cpu.h   |  1 -\n arch/x86/include/asm/smp.h   |  1 -\n arch/x86/kernel/acpi/boot.c  | 20 ++++++++++++++++++++\n arch/x86/xen/enlighten_hvm.c |  5 +++--\n 5 files changed, 25 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/arch/x86/include/asm/acpi.h b/arch/x86/include/asm/acpi.h\nindex a03aa6f999d1..92b5c27c4fea 100644\n--- a/arch/x86/include/asm/acpi.h\n+++ b/arch/x86/include/asm/acpi.h\n@@ -157,6 +157,8 @@ static inline bool acpi_has_cpu_in_madt(void)\n \treturn !!acpi_lapic;\n }\n \n+int acpi_get_cpu_uid(unsigned int cpu, u32 *uid);\n+\n #define ACPI_HAVE_ARCH_SET_ROOT_POINTER\n static __always_inline void acpi_arch_set_root_pointer(u64 addr)\n {\ndiff --git a/arch/x86/include/asm/cpu.h b/arch/x86/include/asm/cpu.h\nindex ad235dda1ded..57a0786dfd75 100644\n--- a/arch/x86/include/asm/cpu.h\n+++ b/arch/x86/include/asm/cpu.h\n@@ -11,7 +11,6 @@\n \n #ifndef CONFIG_SMP\n #define cpu_physical_id(cpu)\t\t\tboot_cpu_physical_apicid\n-#define cpu_acpi_id(cpu)\t\t\t0\n #endif /* CONFIG_SMP */\n \n #ifdef CONFIG_HOTPLUG_CPU\ndiff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h\nindex 84951572ab81..05d1d479b4cf 100644\n--- a/arch/x86/include/asm/smp.h\n+++ b/arch/x86/include/asm/smp.h\n@@ -130,7 +130,6 @@ __visible void smp_call_function_interrupt(struct pt_regs *regs);\n __visible void smp_call_function_single_interrupt(struct pt_regs *r);\n \n #define cpu_physical_id(cpu)\tper_cpu(x86_cpu_to_apicid, cpu)\n-#define cpu_acpi_id(cpu)\tper_cpu(x86_cpu_to_acpiid, cpu)\n \n /*\n  * This function is needed by all SMP systems. It must _always_ be valid\ndiff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c\nindex a3f2fb1fea1b..ceba24f65ae3 100644\n--- a/arch/x86/kernel/acpi/boot.c\n+++ b/arch/x86/kernel/acpi/boot.c\n@@ -1848,3 +1848,23 @@ void __iomem * (*acpi_os_ioremap)(acpi_physical_address phys, acpi_size size) =\n \tx86_acpi_os_ioremap;\n EXPORT_SYMBOL_GPL(acpi_os_ioremap);\n #endif\n+\n+int acpi_get_cpu_uid(unsigned int cpu, u32 *uid)\n+{\n+\tu32 acpi_id;\n+\n+\tif (cpu >= nr_cpu_ids)\n+\t\treturn -EINVAL;\n+\n+#ifdef CONFIG_SMP\n+\tacpi_id = per_cpu(x86_cpu_to_acpiid, cpu);\n+\tif (acpi_id == CPU_ACPIID_INVALID)\n+\t\treturn -ENODEV;\n+#else\n+\tacpi_id = 0;\n+#endif\n+\n+\t*uid = acpi_id;\n+\treturn 0;\n+}\n+EXPORT_SYMBOL_GPL(acpi_get_cpu_uid);\ndiff --git a/arch/x86/xen/enlighten_hvm.c b/arch/x86/xen/enlighten_hvm.c\nindex fe57ff85d004..2f9fa27e5a3c 100644\n--- a/arch/x86/xen/enlighten_hvm.c\n+++ b/arch/x86/xen/enlighten_hvm.c\n@@ -151,6 +151,7 @@ static void xen_hvm_crash_shutdown(struct pt_regs *regs)\n \n static int xen_cpu_up_prepare_hvm(unsigned int cpu)\n {\n+\tu32 cpu_uid;\n \tint rc = 0;\n \n \t/*\n@@ -161,8 +162,8 @@ static int xen_cpu_up_prepare_hvm(unsigned int cpu)\n \t */\n \txen_uninit_lock_cpu(cpu);\n \n-\tif (cpu_acpi_id(cpu) != CPU_ACPIID_INVALID)\n-\t\tper_cpu(xen_vcpu_id, cpu) = cpu_acpi_id(cpu);\n+\tif (acpi_get_cpu_uid(cpu, &cpu_uid) == 0)\n+\t\tper_cpu(xen_vcpu_id, cpu) = cpu_uid;\n \telse\n \t\tper_cpu(xen_vcpu_id, cpu) = cpu;\n \txen_vcpu_setup(cpu);\n",
    "prefixes": [
        "RESEND",
        "v10",
        "4/8"
    ]
}