get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 1936191,
    "url": "http://patchwork.ozlabs.org/api/patches/1936191/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linux-aspeed/patch/20240516181907.3468796-18-eajames@linux.ibm.com/",
    "project": {
        "id": 57,
        "url": "http://patchwork.ozlabs.org/api/projects/57/?format=api",
        "name": "Linux ASPEED SoC development",
        "link_name": "linux-aspeed",
        "list_id": "linux-aspeed.lists.ozlabs.org",
        "list_email": "linux-aspeed@lists.ozlabs.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20240516181907.3468796-18-eajames@linux.ibm.com>",
    "list_archive_url": null,
    "date": "2024-05-16T18:18:44",
    "name": "[v3,17/40] fsi: aspeed: Refactor trace functions",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "8338c3120de7474c71c94bcce38031df5b0aae7e",
    "submitter": {
        "id": 74989,
        "url": "http://patchwork.ozlabs.org/api/people/74989/?format=api",
        "name": "Eddie James",
        "email": "eajames@linux.ibm.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linux-aspeed/patch/20240516181907.3468796-18-eajames@linux.ibm.com/mbox/",
    "series": [
        {
            "id": 407101,
            "url": "http://patchwork.ozlabs.org/api/series/407101/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linux-aspeed/list/?series=407101",
            "date": "2024-05-16T18:18:31",
            "name": "fsi: Add interrupt support",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/407101/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/1936191/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/1936191/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <linux-aspeed-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "linux-aspeed@lists.ozlabs.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@legolas.ozlabs.org",
            "linux-aspeed@lists.ozlabs.org"
        ],
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256\n header.s=pp1 header.b=PAX9103Z;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org\n (client-ip=2404:9400:2:0:216:3eff:fee1:b9f1; helo=lists.ozlabs.org;\n envelope-from=linux-aspeed-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org;\n receiver=patchwork.ozlabs.org)",
            "lists.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256\n header.s=pp1 header.b=PAX9103Z;\n\tdkim-atps=neutral",
            "lists.ozlabs.org;\n dmarc=pass (p=none dis=none) header.from=linux.ibm.com",
            "lists.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256\n header.s=pp1 header.b=PAX9103Z;\n\tdkim-atps=neutral",
            "lists.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=linux.ibm.com\n (client-ip=148.163.158.5; helo=mx0b-001b2d01.pphosted.com;\n envelope-from=eajames@linux.ibm.com; receiver=lists.ozlabs.org)"
        ],
        "Received": [
            "from lists.ozlabs.org (lists.ozlabs.org\n [IPv6:2404:9400:2:0:216:3eff:fee1:b9f1])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange X25519 server-signature ECDSA (secp384r1))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4VgJNt096cz1yfq\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 17 May 2024 04:22:54 +1000 (AEST)",
            "from boromir.ozlabs.org (localhost [IPv6:::1])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 4VgJNs55qFz3ft8\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 17 May 2024 04:22:53 +1000 (AEST)",
            "from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com\n [148.163.158.5])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 4VgJKW6Bnrz3ft1;\n\tFri, 17 May 2024 04:19:59 +1000 (AEST)",
            "from pps.filterd (m0353724.ppops.net [127.0.0.1])\n\tby mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id\n 44GHbvhI010836;\n\tThu, 16 May 2024 18:19:18 GMT",
            "from ppma23.wdc07v.mail.ibm.com\n (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93])\n\tby mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3y5pq5r368-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n\tThu, 16 May 2024 18:19:18 +0000",
            "from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1])\n\tby ppma23.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id\n 44GFQLsM005986;\n\tThu, 16 May 2024 18:19:17 GMT",
            "from smtprelay05.wdc07v.mail.ibm.com ([172.16.1.72])\n\tby ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3y2mgmud35-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);\n\tThu, 16 May 2024 18:19:17 +0000",
            "from smtpav05.dal12v.mail.ibm.com (smtpav05.dal12v.mail.ibm.com\n [10.241.53.104])\n\tby smtprelay05.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id\n 44GIJE8426411654\n\t(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);\n\tThu, 16 May 2024 18:19:17 GMT",
            "from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id AE6B95807A;\n\tThu, 16 May 2024 18:19:12 +0000 (GMT)",
            "from smtpav05.dal12v.mail.ibm.com (unknown [127.0.0.1])\n\tby IMSVA (Postfix) with ESMTP id 6FB245806B;\n\tThu, 16 May 2024 18:19:12 +0000 (GMT)",
            "from slate16.aus.stglabs.ibm.com (unknown [9.61.107.19])\n\tby smtpav05.dal12v.mail.ibm.com (Postfix) with ESMTP;\n\tThu, 16 May 2024 18:19:12 +0000 (GMT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com;\n h=from : to : cc : subject\n : date : message-id : in-reply-to : references : mime-version :\n content-transfer-encoding; s=pp1;\n bh=ZO87ym+vrHlW5NSObf7CjE5XoUUtGZQpDoF/ti0pRyg=;\n b=PAX9103ZEVgQp21y/Po8N3dK+qubCe3iljsXsgesvk1p8SKy0H//kOe8cjYkLtu1OFDx\n JOZBHoHdaXi2smmaUZc2vBWH0NkXntt49fXlZrcyy64ryPGgviEgxxZ16C6akmhdE00M\n Q+PnVdduJAf1s+uRkU/u7zr/V6tlCzVhD4O1YDv1sISNskMifJz9q4NyVq6XR5SjFVzb\n BO+2SvrxGDcmDt+2RPXhC0mYv6BatIfsGy4UUado5m4yzYce6YWcAC9RQttarfQadkey\n A5jsxgurq8CK11J939RDo+j5imMPC6f8VYVx9qNKc91Y9G2q/fbbp+lKrj7t+oSDU/cy Xg==",
        "From": "Eddie James <eajames@linux.ibm.com>",
        "To": "linux-fsi@lists.ozlabs.org",
        "Subject": "[PATCH v3 17/40] fsi: aspeed: Refactor trace functions",
        "Date": "Thu, 16 May 2024 13:18:44 -0500",
        "Message-Id": "<20240516181907.3468796-18-eajames@linux.ibm.com>",
        "X-Mailer": "git-send-email 2.39.3",
        "In-Reply-To": "<20240516181907.3468796-1-eajames@linux.ibm.com>",
        "References": "<20240516181907.3468796-1-eajames@linux.ibm.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "X-TM-AS-GCONF": "00",
        "X-Proofpoint-GUID": "SJUFraF2MmaFOkX6y36r_0vh4Mt_xvBo",
        "X-Proofpoint-ORIG-GUID": "SJUFraF2MmaFOkX6y36r_0vh4Mt_xvBo",
        "X-Proofpoint-Virus-Version": "vendor=baseguard\n engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.11.176.26\n definitions=2024-05-16_07,2024-05-15_01,2023-05-22_02",
        "X-Proofpoint-Spam-Details": "rule=outbound_notspam policy=outbound score=0\n lowpriorityscore=0\n suspectscore=0 bulkscore=0 spamscore=0 malwarescore=0 phishscore=0\n clxscore=1015 mlxlogscore=889 priorityscore=1501 adultscore=0\n impostorscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1\n engine=8.12.0-2405010000 definitions=main-2405160132",
        "X-BeenThere": "linux-aspeed@lists.ozlabs.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "Linux ASPEED SoC development <linux-aspeed.lists.ozlabs.org>",
        "List-Unsubscribe": "<https://lists.ozlabs.org/options/linux-aspeed>,\n <mailto:linux-aspeed-request@lists.ozlabs.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.ozlabs.org/pipermail/linux-aspeed/>",
        "List-Post": "<mailto:linux-aspeed@lists.ozlabs.org>",
        "List-Help": "<mailto:linux-aspeed-request@lists.ozlabs.org?subject=help>",
        "List-Subscribe": "<https://lists.ozlabs.org/listinfo/linux-aspeed>,\n <mailto:linux-aspeed-request@lists.ozlabs.org?subject=subscribe>",
        "Cc": "andi.shyti@kernel.org, linux-aspeed@lists.ozlabs.org, jk@ozlabs.org,\n alistair@popple.id.au, linux-kernel@vger.kernel.org,\n linux-spi@vger.kernel.org, broonie@kernel.org, andrew@codeconstruct.com.au,\n linux-i2c@vger.kernel.org",
        "Errors-To": "linux-aspeed-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org",
        "Sender": "\"Linux-aspeed\"\n <linux-aspeed-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>"
    },
    "content": "Remove the opb error trace, add a timeout trace, and combine the\nread/write traces.\n\nSigned-off-by: Eddie James <eajames@linux.ibm.com>\n---\n drivers/fsi/fsi-master-aspeed.c          | 29 +++------\n include/trace/events/fsi_master_aspeed.h | 80 ++++++++----------------\n 2 files changed, 34 insertions(+), 75 deletions(-)",
    "diff": "diff --git a/drivers/fsi/fsi-master-aspeed.c b/drivers/fsi/fsi-master-aspeed.c\nindex 29932037c9866..04aa5cb9b6fad 100644\n--- a/drivers/fsi/fsi-master-aspeed.c\n+++ b/drivers/fsi/fsi-master-aspeed.c\n@@ -122,16 +122,17 @@ static int __opb_write(struct fsi_master_aspeed *aspeed, u32 addr,\n \n \tstatus = readl(base + OPB0_STATUS);\n \n-\ttrace_fsi_master_aspeed_opb_write(addr, val, transfer_size, status, reg);\n-\n \t/* Return error when poll timed out */\n-\tif (ret)\n+\tif (ret) {\n+\t\ttrace_fsi_master_aspeed_timeout(reg, status, false);\n \t\treturn ret;\n+\t}\n \n \t/* Command failed, master will reset */\n \tif (status & STATUS_ERR_ACK)\n \t\treturn -EIO;\n \n+\ttrace_fsi_master_aspeed_opb_xfer(addr, transfer_size + 1, val, false);\n \treturn 0;\n }\n \n@@ -175,13 +176,11 @@ static int __opb_read(struct fsi_master_aspeed *aspeed, uint32_t addr,\n \n \tresult = readl(base + OPB0_FSI_DATA_R);\n \n-\ttrace_fsi_master_aspeed_opb_read(addr, transfer_size, result,\n-\t\t\treadl(base + OPB0_STATUS),\n-\t\t\treg);\n-\n \t/* Return error when poll timed out */\n-\tif (ret)\n+\tif (ret) {\n+\t\ttrace_fsi_master_aspeed_timeout(reg, status, true);\n \t\treturn ret;\n+\t}\n \n \t/* Command failed, master will reset */\n \tif (status & STATUS_ERR_ACK)\n@@ -204,6 +203,7 @@ static int __opb_read(struct fsi_master_aspeed *aspeed, uint32_t addr,\n \n \t}\n \n+\ttrace_fsi_master_aspeed_opb_xfer(addr, transfer_size + 1, result, true);\n \treturn 0;\n }\n \n@@ -226,19 +226,6 @@ static int check_errors(struct fsi_master_aspeed *aspeed, int err)\n {\n \tint ret;\n \n-\tif (trace_fsi_master_aspeed_opb_error_enabled()) {\n-\t\t__be32 mresp0, mstap0, mesrb0;\n-\n-\t\topb_readl(aspeed, ctrl_base + FSI_MRESP0, &mresp0);\n-\t\topb_readl(aspeed, ctrl_base + FSI_MSTAP0, &mstap0);\n-\t\topb_readl(aspeed, ctrl_base + FSI_MESRB0, &mesrb0);\n-\n-\t\ttrace_fsi_master_aspeed_opb_error(\n-\t\t\t\tbe32_to_cpu(mresp0),\n-\t\t\t\tbe32_to_cpu(mstap0),\n-\t\t\t\tbe32_to_cpu(mesrb0));\n-\t}\n-\n \tif (err == -EIO) {\n \t\t/* Check MAEB (0x70) ? */\n \ndiff --git a/include/trace/events/fsi_master_aspeed.h b/include/trace/events/fsi_master_aspeed.h\nindex 0fff873775f19..7eeecbfec7f09 100644\n--- a/include/trace/events/fsi_master_aspeed.h\n+++ b/include/trace/events/fsi_master_aspeed.h\n@@ -8,69 +8,41 @@\n \n #include <linux/tracepoint.h>\n \n-TRACE_EVENT(fsi_master_aspeed_opb_read,\n-\tTP_PROTO(uint32_t addr, size_t size, uint32_t result, uint32_t status, uint32_t irq_status),\n-\tTP_ARGS(addr, size, result, status, irq_status),\n+TRACE_EVENT(fsi_master_aspeed_opb_xfer,\n+\tTP_PROTO(uint32_t addr, uint32_t size, uint32_t data, bool read),\n+\tTP_ARGS(addr, size, data, read),\n \tTP_STRUCT__entry(\n-\t\t__field(uint32_t,  addr)\n-\t\t__field(size_t,    size)\n-\t\t__field(uint32_t,  result)\n-\t\t__field(uint32_t,  status)\n-\t\t__field(uint32_t,  irq_status)\n-\t\t),\n+\t\t__field(uint32_t, addr)\n+\t\t__field(uint32_t, size)\n+\t\t__field(uint32_t, data)\n+\t\t__field(bool, read)\n+\t),\n \tTP_fast_assign(\n \t\t__entry->addr = addr;\n \t\t__entry->size = size;\n-\t\t__entry->result = result;\n-\t\t__entry->status = status;\n-\t\t__entry->irq_status = irq_status;\n-\t\t),\n-\tTP_printk(\"addr %08x size %zu: result %08x sts: %08x irq_sts: %08x\",\n-\t\t__entry->addr, __entry->size, __entry->result,\n-\t\t__entry->status, __entry->irq_status\n-\t   )\n+\t\t__entry->data = data;\n+\t\t__entry->read = read;\n+\t),\n+\tTP_printk(\"%s addr %08x size %u data %08x\", __entry->read ? \"read\" : \"write\",\n+\t\t  __entry->addr, __entry->size, __entry->data)\n );\n \n-TRACE_EVENT(fsi_master_aspeed_opb_write,\n-\tTP_PROTO(uint32_t addr, uint32_t val, size_t size, uint32_t status, uint32_t irq_status),\n-\tTP_ARGS(addr, val, size, status, irq_status),\n+TRACE_EVENT(fsi_master_aspeed_timeout,\n+\tTP_PROTO(uint32_t irq, uint32_t status, bool read),\n+\tTP_ARGS(irq, status, read),\n \tTP_STRUCT__entry(\n-\t\t__field(uint32_t,    addr)\n-\t\t__field(uint32_t,    val)\n-\t\t__field(size_t,    size)\n-\t\t__field(uint32_t,  status)\n-\t\t__field(uint32_t,  irq_status)\n-\t\t),\n+\t\t__field(uint32_t, irq)\n+\t\t__field(uint32_t, status)\n+\t\t__field(bool, read)\n+\t),\n \tTP_fast_assign(\n-\t\t__entry->addr = addr;\n-\t\t__entry->val = val;\n-\t\t__entry->size = size;\n+\t\t__entry->irq = irq;\n \t\t__entry->status = status;\n-\t\t__entry->irq_status = irq_status;\n-\t\t),\n-\tTP_printk(\"addr %08x val %08x size %zu status: %08x irq_sts: %08x\",\n-\t\t__entry->addr, __entry->val, __entry->size,\n-\t\t__entry->status, __entry->irq_status\n-\t\t)\n-\t);\n-\n-TRACE_EVENT(fsi_master_aspeed_opb_error,\n-\tTP_PROTO(uint32_t mresp0, uint32_t mstap0, uint32_t mesrb0),\n-\tTP_ARGS(mresp0, mstap0, mesrb0),\n-\tTP_STRUCT__entry(\n-\t\t__field(uint32_t,  mresp0)\n-\t\t__field(uint32_t,  mstap0)\n-\t\t__field(uint32_t,  mesrb0)\n-\t\t),\n-\tTP_fast_assign(\n-\t\t__entry->mresp0 = mresp0;\n-\t\t__entry->mstap0 = mstap0;\n-\t\t__entry->mesrb0 = mesrb0;\n-\t\t),\n-\tTP_printk(\"mresp0 %08x mstap0 %08x mesrb0 %08x\",\n-\t\t__entry->mresp0, __entry->mstap0, __entry->mesrb0\n-\t\t)\n-\t);\n+\t\t__entry->read = read;\n+\t),\n+\tTP_printk(\"%s irq %08x status %08x\", __entry->read ? \"read\" : \"write\", __entry->irq,\n+\t\t  __entry->status)\n+);\n \n TRACE_EVENT(fsi_master_aspeed_cfam_reset,\n \tTP_PROTO(bool start),\n",
    "prefixes": [
        "v3",
        "17/40"
    ]
}