From patchwork Wed Aug 18 15:13:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Thompson X-Patchwork-Id: 498911 Delivered-To: patches@linaro.org Received: by 2002:a02:6f15:0:0:0:0:0 with SMTP id x21csp767264jab; Wed, 18 Aug 2021 08:13:53 -0700 (PDT) X-Received: by 2002:a05:600c:4fc6:: with SMTP id o6mr8261418wmq.122.1629299633023; Wed, 18 Aug 2021 08:13:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629299632; cv=none; d=google.com; s=arc-20160816; b=VfmsUDzINdqF2wR4y1iW5jiJot2w5W6QRgHtGUioRsfu14D9jy+hRnj1npRoVbio2g oCVOwtA+qbbH53dwCRjm5pfWiPs+8aeXmpTP1ZR+LRkJDryNp6TumXSiG2xViFVOFIgV A1swl3THV8WTbsegJ228m+NYG46X8AIbUui9p2l9H8Qi7/vJaenBios74wAC1vWwn5PW 2xRNiBG2p6imvioGxixAZfDtnhMysCn4LPdL7a0S9Xb+IwA6/t6CMscZflGINEh5davN 2yoFTaEym8QQNlEA0OIn44xooWi0/aACy+XWUQ0/MZE2CIbNgjnqu2/opbdX6g/VJRH4 n56A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=nbMWlithtc3sWWU5KtkiCkqIKx2WyKuGJ2d75kfkDHg=; b=g3xyPczgjOLVOI33XvI/F6lsB/HFGo3jiW8kvgUumtpvCGusXi5HOIjm9Jkfy5+nTP cM2/RvE795ANhU8j5sI68rlWpVM6yDT4tPS15LY/WYZxFM0ej1JjF0grkHHNfohF1WV4 YIYBMep8FxRjICTdQ+dZQ09SyUsqxdY22gEDY01tYJcx7aWHGgf5R2k1W/ji0t81HZUl uZ7DeWarWkBsRlUpxknQ4VB0nZhoyq+Meexp+Js9cfhYNtE71xhT47+RQtU/NIwZiVxI W9rID9Jh6vUMmjlXPaVPQgRJNAL4e8hpNCYd/ym6YUXH5+3pe/I8YtedFvfTK7qxfJ3U i3jQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="iPW/OHiA"; spf=pass (google.com: domain of daniel.thompson@linaro.org designates 209.85.220.41 as permitted sender) smtp.mailfrom=daniel.thompson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id e8sor131845wmk.23.2021.08.18.08.13.52 for (Google Transport Security); Wed, 18 Aug 2021 08:13:52 -0700 (PDT) Received-SPF: pass (google.com: domain of daniel.thompson@linaro.org designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="iPW/OHiA"; spf=pass (google.com: domain of daniel.thompson@linaro.org designates 209.85.220.41 as permitted sender) smtp.mailfrom=daniel.thompson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nbMWlithtc3sWWU5KtkiCkqIKx2WyKuGJ2d75kfkDHg=; b=iPW/OHiA0R+DD07D59x4R67evSpX775MqwnnwhDmKH0Rj8MGJtnYtqbDAat2iQ5Pg0 ufww3qxEhh1jfOzdSFlExrha/KqIGiZusIW18AwTyBve+4z6NC11esVI3oJrNckU4/yH 2PtwdmvPqM2YoglDRtnwoTnxJEzyuMuCGhukjqVZKVq8n9n9wHCdVyi/IF4TVedfaKC1 KeGet4oNy+Cb3Obp+DCj+fp2pWSbZ7SmfMtVU8VYZIJGk8nK/a4XRW/ugpifwDwOeYZE M9dlgnyAwJL/xlfm3TaaGWBIBSExvF7Nyi/hbXxi/GoqvecFfrGU2Je/RStaPw16JLAR Er1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nbMWlithtc3sWWU5KtkiCkqIKx2WyKuGJ2d75kfkDHg=; b=krMUBarM04hNeLEuPsEQXGVCDsinVQi+vI8yiwTcu2KzaB2L6gba0q/I09BAdb18mV fY4gSAYjOc9f7KnQdRulqsjX4GliXCnnZv5Y4fRnoUCFftlJLSprAlMwWZdu/w45Po9V ln441mrQM3RHdjqSuYKwTAVshtHJWRtmrQ++STckreFbSHOzWLOx59mZTZUP2JTnQdpg P2dR0rFrw+ai+L+oGTXfrxOY92JLPRsoixIUL1uL/YiG8HXPFn3G8+jkVeRspb0SixgG TlFJySymflBajmK/x8klgtvk64Ffm9CbjOcF18TtREUZVUYxGPu7ojd9SgsVuOSLziPr utPw== X-Gm-Message-State: AOAM530uzfUej9WgAX625kKwMbGQqOq+WNF36LNLscW4+5sJgamaBxyj pKSpEcS7g97zZZ1e09o1MKKrb7Mk X-Google-Smtp-Source: ABdhPJyk4XXcjDZ7LTzwBAp9AanY2gQP1Y3AVdN1Mqr48CV2jUlsxvWKpvaznk2oTpBnBwmdzw9MXw== X-Received: by 2002:a05:600c:b51:: with SMTP id k17mr9039289wmr.149.1629299632593; Wed, 18 Aug 2021 08:13:52 -0700 (PDT) Return-Path: Received: from maple.lan (cpc141216-aztw34-2-0-cust174.18-1.cable.virginm.net. [80.7.220.175]) by smtp.gmail.com with ESMTPSA id l21sm101829wmh.31.2021.08.18.08.13.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Aug 2021 08:13:52 -0700 (PDT) From: Daniel Thompson To: Vinod Koul , Jonathan Corbet Cc: Daniel Thompson , dmaengine@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, patches@linaro.org, Haavard Skinnemoen Subject: [PATCH 1/2] Documentation: dmaengine: Add a description of what dmatest does Date: Wed, 18 Aug 2021 16:13:14 +0100 Message-Id: <20210818151315.9505-2-daniel.thompson@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210818151315.9505-1-daniel.thompson@linaro.org> References: <20210818151315.9505-1-daniel.thompson@linaro.org> MIME-Version: 1.0 Currently it can difficult to determine what dmatest does without reading the source code. Let's add a description. The description is taken mostly from the patch header of commit 4a776f0aa922 ("dmatest: Simple DMA memcpy test client") although it has been edited and updated slightly. Signed-off-by: Haavard Skinnemoen Signed-off-by: Daniel Thompson Reviewed-by: Andy Shevchenko --- Documentation/driver-api/dmaengine/dmatest.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) -- 2.30.2 diff --git a/Documentation/driver-api/dmaengine/dmatest.rst b/Documentation/driver-api/dmaengine/dmatest.rst index ee268d445d38..529cc2cbbb1b 100644 --- a/Documentation/driver-api/dmaengine/dmatest.rst +++ b/Documentation/driver-api/dmaengine/dmatest.rst @@ -6,6 +6,16 @@ Andy Shevchenko This small document introduces how to test DMA drivers using dmatest module. +The dmatest module tests DMA memcpy, memset, XOR and RAID6 P+Q operations using +various lengths and various offsets into the source and destination buffers. It +will initialize both buffers with a repeatable pattern and verify that the DMA +engine copies the requested region and nothing more. It will also verify that +the bytes aren't swapped around, and that the source buffer isn't modified. + +The dmatest module can be configured to test a specific channel. It can also +test multiple channels at the same time, and it can start multiple threads +competing for the same channel. + .. note:: The test suite works only on the channels that have at least one capability of the following: DMA_MEMCPY (memory-to-memory), DMA_MEMSET From patchwork Wed Aug 18 15:13:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Thompson X-Patchwork-Id: 498912 Delivered-To: patches@linaro.org Received: by 2002:a02:6f15:0:0:0:0:0 with SMTP id x21csp767514jab; Wed, 18 Aug 2021 08:14:11 -0700 (PDT) X-Received: by 2002:a5d:6d0f:: with SMTP id e15mr11205425wrq.373.1629299651261; Wed, 18 Aug 2021 08:14:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629299651; cv=none; d=google.com; s=arc-20160816; b=uk+fDXvZzPXe9ZVIHddvW0ieKb6AqTmYFBloF/Jj6AzXccIpO/XZL723XtP926UwGg HMzm+HACUXaAzfMqQsvgQgkxnXtWWJhAGVroIQ/FxRzMhahxJzjwNWThZQNbG0HR+lUy 22JjkeaaxpEN+8mzHyy57iZz7XLCUEWZt0EhvDOiMAwQ0VQ3o3uCeqMQNBlyU5p4dEGe RF6exVrwdkQE6F9UVnVnE11sVKlSFmbmsCZBMhFEwZ1y3HAOvf31ILmDovVzC5aIRTPe XMcg0t84pI7xOCxSIAAFgclIx/IUa2ZH7ldLcHOPlr0Q3riR5kFkZXqrtoPieRlBRXNp TVgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=Da0DCFGolB9uAM2tKDPuHVOlQ6ovhGIdi2wnEJL3jXc=; b=Y2NCdjaAzRT2hBsI2XjG/Uii7zPOScMViOkRL2EyrkZhpHaVdtQA5O+ScbKLnKRz/S 6BprllCT4co4I1yjuzdx2Ftut/i7kAx7IOfx2VauHvXlYWSQUlmTu66scAR4d9prHrIw Kx5lDmkjNVjhQcT+rigtPECbpvDZ+11v7kc469NQApdhmHUCr1YHEMqA0KYOtHk7NA5M g/LJagPKQerYQeBszD9B/txBDOoQWnzVRK0PbJtjRIjciZ8HhJcGuGffZN/VGnYPO17G 7n7ZW2XBq7vLsTx0Gh1XttrAHXceR14Lffb1JyzWpUzvQCIqVQaVI3gkdi1TuHSjzgL/ NqDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JqZOf7zX; spf=pass (google.com: domain of daniel.thompson@linaro.org designates 209.85.220.41 as permitted sender) smtp.mailfrom=daniel.thompson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id g10sor1067341wmk.26.2021.08.18.08.14.11 for (Google Transport Security); Wed, 18 Aug 2021 08:14:11 -0700 (PDT) Received-SPF: pass (google.com: domain of daniel.thompson@linaro.org designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=JqZOf7zX; spf=pass (google.com: domain of daniel.thompson@linaro.org designates 209.85.220.41 as permitted sender) smtp.mailfrom=daniel.thompson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Da0DCFGolB9uAM2tKDPuHVOlQ6ovhGIdi2wnEJL3jXc=; b=JqZOf7zXT9L88sx2XhatvSar77vpGtprbyBun1lpZtJkBsF+4ehXeieZmHzpi9PLaS vnfRTYvY4mLwIWtikv3stTQ73/K8xZZ7i665vDbr0iKXPrKEiUjNRKf1aFOcmJLD6pJe t8OKIH6jT3o8Vo7Lzt5QlglKpxiKeJTMDtMdU9Piaz7txTB1P+PrgxbU9Hv25TvZh39P HAXJM0cwfE1AEtLDilFWuBp4BjpdqBiOi+Y6/Hwh+aW4loV+2i7cSC3VA47moIWgppLR /wRH8qbEZQl2uMvS+eTwmm6zsxfjZJM6QKry80ezpD5cXAoOgL01r3zghpua9u9SFoKq ijNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Da0DCFGolB9uAM2tKDPuHVOlQ6ovhGIdi2wnEJL3jXc=; b=AD/kH5fhgsL/by32akcfJ2sDGUmDR4Rywi/LrVrXdgqC3M9cZgfk5edkh/MrbvOt2Q w7SGoGcC5oe0bKXtz0ZpXf5aLLmjIdV+AShd2TtHyfGdlQ6fBijIk+L9XlqcSzMCEe6a ef1HYDcozjOG6R2ZkHXn8PBl01W96lDLmjA4iVl16By72mxYn0PxoM9eKjQy8lxOAQiO fBJ2/P7GsukPoNAp7u1bvsx3ZbWXoVqDuSlTZXuOiANQbQsbQh4Dz9ngMvrIPI30UA/+ 5BbfAsgBn5AYQYJNYtta1n8VQAJWWeqEcZ7tUppThnWjNqNEaUJUyPAOiLVGoCg638K3 xM+Q== X-Gm-Message-State: AOAM5305TKUs7oppoKWE/ItkognQ0HrlfEMn3tby7x9r29hJv6QD6t2j UVmL0CN3sXxf2bKTmZKH+IRD0kDH5rJ842N9DwM= X-Google-Smtp-Source: ABdhPJznDIbrC67RLd4q1jhvYx2titLrWoxzZktsdZNo655PU1Rk/lZxfAqsbScG+aYG6eBYozaydw== X-Received: by 2002:a1c:4a:: with SMTP id 71mr9102711wma.87.1629299640460; Wed, 18 Aug 2021 08:14:00 -0700 (PDT) Return-Path: Received: from maple.lan (cpc141216-aztw34-2-0-cust174.18-1.cable.virginm.net. [80.7.220.175]) by smtp.gmail.com with ESMTPSA id l21sm101829wmh.31.2021.08.18.08.13.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Aug 2021 08:14:00 -0700 (PDT) From: Daniel Thompson To: Vinod Koul , Jonathan Corbet Cc: Daniel Thompson , dmaengine@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, patches@linaro.org Subject: [PATCH 2/2] Documentation: dmaengine: Correctly describe dmatest with channel unset Date: Wed, 18 Aug 2021 16:13:15 +0100 Message-Id: <20210818151315.9505-3-daniel.thompson@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210818151315.9505-1-daniel.thompson@linaro.org> References: <20210818151315.9505-1-daniel.thompson@linaro.org> MIME-Version: 1.0 Currently the documentation states that channels must be configured before running the dmatest. This has not been true since commit 6b41030fdc79 ("dmaengine: dmatest: Restore default for channel"). Fix accordingly. Fixes: 6b41030fdc79 ("dmaengine: dmatest: Restore default for channel") Signed-off-by: Daniel Thompson --- Documentation/driver-api/dmaengine/dmatest.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) -- 2.30.2 diff --git a/Documentation/driver-api/dmaengine/dmatest.rst b/Documentation/driver-api/dmaengine/dmatest.rst index 529cc2cbbb1b..cf9859cd0b43 100644 --- a/Documentation/driver-api/dmaengine/dmatest.rst +++ b/Documentation/driver-api/dmaengine/dmatest.rst @@ -153,13 +153,14 @@ Part 5 - Handling channel allocation Allocating Channels ------------------- -Channels are required to be configured prior to starting the test run. -Attempting to run the test without configuring the channels will fail. +Channels do not need to be configured prior to starting a test run. Attempting +to run the test without configuring the channels will result in testing any +channels that are available. Example:: % echo 1 > /sys/module/dmatest/parameters/run - dmatest: Could not start test, no channels configured + dmatest: No channels configured, continue with any Channels are registered using the "channel" parameter. Channels can be requested by their name, once requested, the channel is registered and a pending thread is added to the test list.