get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2218438,
    "url": "http://patchwork.ozlabs.org/api/patches/2218438/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260401081640.26875-9-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-9-fengchengwen@huawei.com>",
    "list_archive_url": null,
    "date": "2026-04-01T08:16:40",
    "name": "[RESEND,v10,8/8] PCI/TPH: Pass ACPI Processor UID to Cache Locality _DSM",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "a6b93e7ee8557f79721b10b5f437f286b5a65089",
    "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-9-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/2218438/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2218438/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-pci+bounces-51658-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=qLgUdTXy;\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-51658-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=\"qLgUdTXy\"",
            "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 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 4flybg3zQvz1yCp\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 01 Apr 2026 19:20:31 +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 017FC30E7EF5\n\tfor <incoming@patchwork.ozlabs.org>; Wed,  1 Apr 2026 08:17:52 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id D5C923B388D;\n\tWed,  1 Apr 2026 08:17:05 +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 791163AA4F6;\n\tWed,  1 Apr 2026 08:17:03 +0000 (UTC)",
            "from mail.maildlp.com (unknown [172.19.163.0])\n\tby canpmsgout05.his.huawei.com (SkyGuard) with ESMTPS id 4flyPP34Mzz12LG4;\n\tWed,  1 Apr 2026 16:11:37 +0800 (CST)",
            "from kwepemk500009.china.huawei.com (unknown [7.202.194.94])\n\tby mail.maildlp.com (Postfix) with ESMTPS id B64C540537;\n\tWed,  1 Apr 2026 16:17:00 +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:58 +0800"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1775031425; cv=none;\n b=qEYKxrbjtTvSzDynQqWdn3olOMFjV5aTYlP5inX4boEWScChfADnciG2J3RytxFzt/7eoxsceBdC6tBtgrtaRpiUCkx4G5GB8QYPGt6W2nGCDKic3nw/BGSIG6Iygc1mNSTAHJizcB6cuH5HxK2OvyqgGikkGxjWeTm8o7c9bLA=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1775031425; c=relaxed/simple;\n\tbh=EKUkpbq7JSTnCQVDsQ7Bo7f2ZKWsZtAK12DNKf/nJlk=;\n\th=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version:Content-Type;\n b=CYpHRzXWOMVXI9pAjYHpZJU18u4gwvr2FmZ1EfO98vQUibGNMJ9Tm8MZEXvMjyh43tiVvBk5NiFIRgHMlvXQoifZj5uAMKRUiqD9KYSdrhMeb5dgVFttLIGiDFQqaBdgH5KLvLqwRSAtJMX/RAc/wZmnNUnRx7WJO1hvqXdlrYA=",
        "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=qLgUdTXy; 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=hE9w7JoPF7q5rCf6KhhEJWJqCptovuDZd/Iy/+tLfKo=;\n\tb=qLgUdTXyB2huFMYWwsBs6yJ/F+9lt0zGJ2NBn+WC66I23Xw4lD/MYLZdp/AaESL9MDwbvh4PG\n\t4g/cCYoR/67GmTbgs1X5afshxewzUwAWGLnOlgBOHKQjEtF2bK4P57/PDC46EmJDfRwKl3h1FiZ\n\tk+9EKAAKSPQbPzHjYnS4Cu4=",
        "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 8/8] PCI/TPH: Pass ACPI Processor UID to Cache\n Locality _DSM",
        "Date": "Wed, 1 Apr 2026 16:16:40 +0800",
        "Message-ID": "<20260401081640.26875-9-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": "pcie_tph_get_cpu_st() uses the Query Cache Locality Features _DSM [1]\nto retrieve the TPH Steering Tag for memory associated with the CPU\nidentified by its \"cpu_uid\" parameter, a Linux logical CPU ID.\n\nThe _DSM requires an ACPI Processor UID, which pcie_tph_get_cpu_st()\npreviously assumed was the same as the Linux logical CPU ID. This is\ntrue on x86 but not on arm64, so pcie_tph_get_cpu_st() returned the\nwrong Steering Tag, resulting in incorrect TPH functionality on arm64.\n\nConvert the Linux logical CPU ID to the ACPI Processor UID with\nacpi_get_cpu_uid() before passing it to the _DSM. Additionally, rename\nthe pcie_tph_get_cpu_st() parameter from \"cpu_uid\" to \"cpu\" to reflect\nthat it represents a logical CPU ID (not an ACPI Processor UID).\n\n[1] According to ECN_TPH-ST_Revision_20200924\n    (https://members.pcisig.com/wg/PCI-SIG/document/15470), the input\n    is defined as: \"If the target is a processor, then this field\n    represents the ACPI Processor UID of the processor as specified in\n    the MADT. If the target is a processor container, then this field\n    represents the ACPI Processor UID of the processor container as\n    specified in the PPTT.\"\n\nFixes: d2e8a34876ce (\"PCI/TPH: Add Steering Tag support\")\nCc: stable@vger.kernel.org\nSigned-off-by: Chengwen Feng <fengchengwen@huawei.com>\nReviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>\nReviewed-by: Bjorn Helgaas <bhelgaas@google.com>\n---\n Documentation/PCI/tph.rst |  4 ++--\n drivers/pci/tph.c         | 16 +++++++++++-----\n include/linux/pci-tph.h   |  4 ++--\n 3 files changed, 15 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/Documentation/PCI/tph.rst b/Documentation/PCI/tph.rst\nindex e8993be64fd6..b6cf22b9bd90 100644\n--- a/Documentation/PCI/tph.rst\n+++ b/Documentation/PCI/tph.rst\n@@ -79,10 +79,10 @@ To retrieve a Steering Tag for a target memory associated with a specific\n CPU, use the following function::\n \n   int pcie_tph_get_cpu_st(struct pci_dev *pdev, enum tph_mem_type type,\n-                          unsigned int cpu_uid, u16 *tag);\n+                          unsigned int cpu, u16 *tag);\n \n The `type` argument is used to specify the memory type, either volatile\n-or persistent, of the target memory. The `cpu_uid` argument specifies the\n+or persistent, of the target memory. The `cpu` argument specifies the\n CPU where the memory is associated to.\n \n After the ST value is retrieved, the device driver can use the following\ndiff --git a/drivers/pci/tph.c b/drivers/pci/tph.c\nindex ca4f97be7538..b67c9ad14bda 100644\n--- a/drivers/pci/tph.c\n+++ b/drivers/pci/tph.c\n@@ -236,21 +236,27 @@ static int write_tag_to_st_table(struct pci_dev *pdev, int index, u16 tag)\n  * with a specific CPU\n  * @pdev: PCI device\n  * @mem_type: target memory type (volatile or persistent RAM)\n- * @cpu_uid: associated CPU id\n+ * @cpu: associated CPU id\n  * @tag: Steering Tag to be returned\n  *\n  * Return the Steering Tag for a target memory that is associated with a\n- * specific CPU as indicated by cpu_uid.\n+ * specific CPU as indicated by cpu.\n  *\n  * Return: 0 if success, otherwise negative value (-errno)\n  */\n int pcie_tph_get_cpu_st(struct pci_dev *pdev, enum tph_mem_type mem_type,\n-\t\t\tunsigned int cpu_uid, u16 *tag)\n+\t\t\tunsigned int cpu, u16 *tag)\n {\n #ifdef CONFIG_ACPI\n \tstruct pci_dev *rp;\n \tacpi_handle rp_acpi_handle;\n \tunion st_info info;\n+\tu32 cpu_uid;\n+\tint ret;\n+\n+\tret = acpi_get_cpu_uid(cpu, &cpu_uid);\n+\tif (ret != 0)\n+\t\treturn ret;\n \n \trp = pcie_find_root_port(pdev);\n \tif (!rp || !rp->bus || !rp->bus->bridge)\n@@ -265,9 +271,9 @@ int pcie_tph_get_cpu_st(struct pci_dev *pdev, enum tph_mem_type mem_type,\n \n \t*tag = tph_extract_tag(mem_type, pdev->tph_req_type, &info);\n \n-\tpci_dbg(pdev, \"get steering tag: mem_type=%s, cpu_uid=%d, tag=%#04x\\n\",\n+\tpci_dbg(pdev, \"get steering tag: mem_type=%s, cpu=%d, tag=%#04x\\n\",\n \t\t(mem_type == TPH_MEM_TYPE_VM) ? \"volatile\" : \"persistent\",\n-\t\tcpu_uid, *tag);\n+\t\tcpu, *tag);\n \n \treturn 0;\n #else\ndiff --git a/include/linux/pci-tph.h b/include/linux/pci-tph.h\nindex ba28140ce670..be68cd17f2f8 100644\n--- a/include/linux/pci-tph.h\n+++ b/include/linux/pci-tph.h\n@@ -25,7 +25,7 @@ int pcie_tph_set_st_entry(struct pci_dev *pdev,\n \t\t\t  unsigned int index, u16 tag);\n int pcie_tph_get_cpu_st(struct pci_dev *dev,\n \t\t\tenum tph_mem_type mem_type,\n-\t\t\tunsigned int cpu_uid, u16 *tag);\n+\t\t\tunsigned int cpu, u16 *tag);\n void pcie_disable_tph(struct pci_dev *pdev);\n int pcie_enable_tph(struct pci_dev *pdev, int mode);\n u16 pcie_tph_get_st_table_size(struct pci_dev *pdev);\n@@ -36,7 +36,7 @@ static inline int pcie_tph_set_st_entry(struct pci_dev *pdev,\n { return -EINVAL; }\n static inline int pcie_tph_get_cpu_st(struct pci_dev *dev,\n \t\t\t\t      enum tph_mem_type mem_type,\n-\t\t\t\t      unsigned int cpu_uid, u16 *tag)\n+\t\t\t\t      unsigned int cpu, u16 *tag)\n { return -EINVAL; }\n static inline void pcie_disable_tph(struct pci_dev *pdev) { }\n static inline int pcie_enable_tph(struct pci_dev *pdev, int mode)\n",
    "prefixes": [
        "RESEND",
        "v10",
        "8/8"
    ]
}