Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2221933/?format=api
{ "id": 2221933, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2221933/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260410-sdxi-base-v1-19-1d184cb5c60a@amd.com/", "project": { "id": 28, "url": "http://patchwork.ozlabs.org/api/1.1/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 }, "msgid": "<20260410-sdxi-base-v1-19-1d184cb5c60a@amd.com>", "date": "2026-04-10T13:07:29", "name": "[19/23] dmaengine: sdxi: Provide context start and stop APIs", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "463508c975f4a4d48b78a47977d70f2fbdba9d89", "submitter": { "id": 91626, "url": "http://patchwork.ozlabs.org/api/1.1/people/91626/?format=api", "name": "Nathan Lynch via B4 Relay", "email": "devnull+nathan.lynch.amd.com@kernel.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linux-pci/patch/20260410-sdxi-base-v1-19-1d184cb5c60a@amd.com/mbox/", "series": [ { "id": 499458, "url": "http://patchwork.ozlabs.org/api/1.1/series/499458/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linux-pci/list/?series=499458", "date": "2026-04-10T13:07:10", "name": "dmaengine: Smart Data Accelerator Interface (SDXI) basic support", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/499458/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2221933/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2221933/checks/", "tags": {}, "headers": { "Return-Path": "\n <linux-pci+bounces-52330-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 (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=N761tDkd;\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-52330-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)", "smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=\"N761tDkd\"", "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=10.30.226.201" ], "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 4fscYn66JRz1yGb\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 10 Apr 2026 23:08:29 +1000 (AEST)", "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id A45163039FC4\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 10 Apr 2026 13:08:03 +0000 (UTC)", "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 23F903C13F5;\n\tFri, 10 Apr 2026 13:07:51 +0000 (UTC)", "from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org\n [10.30.226.201])\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 D86F73BE155;\n\tFri, 10 Apr 2026 13:07:50 +0000 (UTC)", "by smtp.kernel.org (Postfix) with ESMTPS id BDCAEC2BC9E;\n\tFri, 10 Apr 2026 13:07:50 +0000 (UTC)", "from aws-us-west-2-korg-lkml-1.web.codeaurora.org\n (localhost.localdomain [127.0.0.1])\n\tby smtp.lore.kernel.org (Postfix) with ESMTP id B88DCF44861;\n\tFri, 10 Apr 2026 13:07:50 +0000 (UTC)" ], "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1775826470; cv=none;\n b=pCPU9XJ787xvb0wWXaL53WVZXEF27wpDf+7IBVCOMp++6rcGPEPN3TLYBCrADL82rx9/5KMiiw6Ia/04lAywyC1af8qV5WEOphxKXaL2D80QS7ITmXOVpUbUyBOo/lVE4yqFOZcxWGg8Tn2s9oFuBN/L/qrFR95APCqwDw/8YXY=", "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1775826470; c=relaxed/simple;\n\tbh=xG8Iwv1Nl33t4t+lIDgFbvyfyQc9By7ouunA94mD9NE=;\n\th=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References:\n\t In-Reply-To:To:Cc;\n b=SnAlf9qNWjRqvXdJ3RoUJq51uBAS+IMPYpPnTJZFrApHj/y0jsAt87cFFYzPjDLDOBUk2j6K1OLibgZ/36SWQ3sMH2KZjA1O+29KYaUEIYbyLqJYNU2B9+3tbyw3/g7kWVWDWxAaQe0BH8NdUnkbd92yv4jVCQO8bRqXqtpPv4o=", "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org\n header.b=N761tDkd; arc=none smtp.client-ip=10.30.226.201", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1775826470;\n\tbh=xG8Iwv1Nl33t4t+lIDgFbvyfyQc9By7ouunA94mD9NE=;\n\th=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From;\n\tb=N761tDkdyVErhk92yIkp+sA5sUvuLoW7+xcsiVFhxUnaHFX7sZLZRWducLoJrw/P6\n\t wO8q+/+iX32TyLym0lIN6Gtz+DZj2YODD6+mz+f9xSq9bYDfAUoCWIgPULTjjoJu1e\n\t vIPsUiYfEan/FUU2CAAwjKIsWDpEu3dmxiET9u/IMNPFvbyqJFHIIwGGW9ltVCc3su\n\t skx0sN7FGmu5qcgv56QLq2x155EvQ3COqOQoLdQOOihVUgeEpPCKKUKUUGXgOPUqAQ\n\t jC5M//umVDqNdxpUXTAcxi5l0Ad4t2bb8cVepvF/7vOZExvYwRa3Rr1mI7KEXZdbPI\n\t mv0EgSv8EFKMA==", "From": "Nathan Lynch via B4 Relay <devnull+nathan.lynch.amd.com@kernel.org>", "Date": "Fri, 10 Apr 2026 08:07:29 -0500", "Subject": "[PATCH 19/23] dmaengine: sdxi: Provide context start and stop APIs", "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; charset=\"utf-8\"", "Content-Transfer-Encoding": "7bit", "Message-Id": "<20260410-sdxi-base-v1-19-1d184cb5c60a@amd.com>", "References": "<20260410-sdxi-base-v1-0-1d184cb5c60a@amd.com>", "In-Reply-To": "<20260410-sdxi-base-v1-0-1d184cb5c60a@amd.com>", "To": "Vinod Koul <vkoul@kernel.org>", "Cc": "Wei Huang <wei.huang2@amd.com>,\n Mario Limonciello <mario.limonciello@amd.com>,\n Bjorn Helgaas <bhelgaas@google.com>,\n Jonathan Cameron <jonathan.cameron@huawei.com>,\n Stephen Bates <Stephen.Bates@amd.com>, PradeepVineshReddy.Kodamati@amd.com,\n John.Kariuki@amd.com, linux-pci@vger.kernel.org,\n linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org,\n Nathan Lynch <nathan.lynch@amd.com>", "X-Mailer": "b4 0.15.2", "X-Developer-Signature": "v=1; a=ed25519-sha256; t=1775826467; l=3798;\n i=nathan.lynch@amd.com; s=20260410; h=from:subject:message-id;\n bh=NeYLcmQw7HQppd+LlGj+2pU9LWwFhUvZx4tcjqsRFVc=;\n b=iJxM3l1UrL7p8blwG8tjlRGafKFKuhh34SWyhSQPNXnZNlzsrC8HfmeXIHSfiaX3hD3oR7wH+\n fcrcbMH0lPfALdsnzRJaGfk0HXAy+BmN8S3ZimAp1aaVo3koAnETkVx", "X-Developer-Key": "i=nathan.lynch@amd.com; a=ed25519;\n pk=PK4ozhq+/z9/2Jl5rgDmvHa9raVomv79qM8p1RAFpEw=", "X-Endpoint-Received": "by B4 Relay for nathan.lynch@amd.com/20260410 with\n auth_id=728", "X-Original-From": "Nathan Lynch <nathan.lynch@amd.com>", "Reply-To": "nathan.lynch@amd.com" }, "content": "From: Nathan Lynch <nathan.lynch@amd.com>\n\nStarting and stopping SDXI client contexts is implemented by submitting\nspecial-purpose descriptors to a function's admin context.\n\nIntroduce high-level context start and stop APIs that operate on\nstruct sdxi_cxt objects, encapsulating the administrative descriptor\nsubmission and completion signaling. These are intended for use by\nclients such as the DMA engine provider to come.\n\nCo-developed-by: Wei Huang <wei.huang2@amd.com>\nSigned-off-by: Wei Huang <wei.huang2@amd.com>\nSigned-off-by: Nathan Lynch <nathan.lynch@amd.com>\n---\n drivers/dma/sdxi/context.c | 77 ++++++++++++++++++++++++++++++++++++++++++++++\n drivers/dma/sdxi/context.h | 3 ++\n 2 files changed, 80 insertions(+)", "diff": "diff --git a/drivers/dma/sdxi/context.c b/drivers/dma/sdxi/context.c\nindex 04e0d3e6a337..fc6291f12ffe 100644\n--- a/drivers/dma/sdxi/context.c\n+++ b/drivers/dma/sdxi/context.c\n@@ -23,7 +23,9 @@\n #include <asm/barrier.h>\n #include <asm/rwonce.h>\n \n+#include \"completion.h\"\n #include \"context.h\"\n+#include \"descriptor.h\"\n #include \"hw.h\"\n #include \"ring.h\"\n #include \"sdxi.h\"\n@@ -394,6 +396,81 @@ int sdxi_admin_cxt_init(struct sdxi_dev *sdxi)\n \treturn devm_add_action_or_reset(sdxi_to_dev(sdxi), free_admin_cxt, sdxi);\n }\n \n+int sdxi_start_cxt(struct sdxi_cxt *cxt)\n+{\n+\tstruct sdxi_cxt *adm = to_admin_cxt(cxt);\n+\tstruct sdxi_desc *desc;\n+\tstruct sdxi_ring_resv resv;\n+\tint err;\n+\n+\tmight_sleep();\n+\n+\tstruct sdxi_completion *sc __free(sdxi_completion) =\n+\t\tsdxi_completion_alloc(cxt->sdxi);\n+\n+\tif (!sc)\n+\t\treturn -ENOMEM;\n+\n+\t/* This is not how to start the admin context. */\n+\tif (WARN_ON(adm == cxt))\n+\t\treturn -EINVAL;\n+\n+\terr = sdxi_ring_reserve(adm->ring_state, 1, &resv);\n+\tif (err)\n+\t\treturn err;\n+\n+\tdesc = sdxi_ring_resv_next(&resv);\n+\tsdxi_encode_cxt_start(desc, &(const struct sdxi_cxt_start) {\n+\t\t\t.range = sdxi_cxt_range_single(cxt->id),\n+\t\t});\n+\tsdxi_completion_attach(desc, sc);\n+\tsdxi_desc_make_valid(desc);\n+\tsdxi_cxt_push_doorbell(adm, sdxi_ring_resv_dbval(&resv));\n+\tsdxi_completion_poll(sc);\n+\n+\treturn 0;\n+}\n+\n+void sdxi_stop_cxt(struct sdxi_cxt *cxt)\n+{\n+\tstruct sdxi_cxt *adm = to_admin_cxt(cxt);\n+\tstruct sdxi_desc *stop, *sync;\n+\tstruct sdxi_ring_resv resv;\n+\tint err;\n+\n+\tmight_sleep();\n+\n+\tstruct sdxi_completion *sc __free(sdxi_completion) =\n+\t\tsdxi_completion_alloc(cxt->sdxi);\n+\n+\tif (!sc)\n+\t\treturn;\n+\n+\t/* This is not how to stop the admin context. */\n+\tif (WARN_ON(adm == cxt))\n+\t\treturn;\n+\n+\terr = sdxi_ring_reserve(adm->ring_state, 2, &resv);\n+\tif (WARN_ON_ONCE(err))\n+\t\treturn;\n+\n+\tstop = sdxi_ring_resv_next(&resv);\n+\tsync = sdxi_ring_resv_next(&resv);\n+\n+\tsdxi_encode_cxt_stop(stop, &(const struct sdxi_cxt_stop) {\n+\t\t\t.range = sdxi_cxt_range_single(cxt->id),\n+\t\t});\n+\tsdxi_encode_sync(sync, &(const struct sdxi_sync) {\n+\t\t\t.filter = SDXI_SYNC_FLT_STOP,\n+\t\t\t.range = sdxi_cxt_range_single(cxt->id),\n+\t\t});\n+\tsdxi_completion_attach(sync, sc);\n+\tsdxi_desc_make_valid(stop);\n+\tsdxi_desc_make_valid(sync);\n+\tsdxi_cxt_push_doorbell(adm, sdxi_ring_resv_dbval(&resv));\n+\tsdxi_completion_poll(sc);\n+}\n+\n /*\n * Allocate a context for in-kernel use. Starting the context is the\n * caller's responsibility.\ndiff --git a/drivers/dma/sdxi/context.h b/drivers/dma/sdxi/context.h\nindex 5310e51a668c..9061221e86cb 100644\n--- a/drivers/dma/sdxi/context.h\n+++ b/drivers/dma/sdxi/context.h\n@@ -67,6 +67,9 @@ int sdxi_admin_cxt_init(struct sdxi_dev *sdxi);\n struct sdxi_cxt *sdxi_cxt_new(struct sdxi_dev *sdxi);\n void sdxi_cxt_exit(struct sdxi_cxt *cxt);\n \n+int sdxi_start_cxt(struct sdxi_cxt *cxt);\n+void sdxi_stop_cxt(struct sdxi_cxt *cxt);\n+\n static inline struct sdxi_cxt *to_admin_cxt(const struct sdxi_cxt *cxt)\n {\n \treturn cxt->sdxi->admin_cxt;\n", "prefixes": [ "19/23" ] }