Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Documentation: dmaengine: clean up description of dmatest usage

Fix the formatting of the multi-channel test usage example. Call out
the note about parameter ordering and add detail on the settings of
parameters for the new version of dmatest.

Fixes: f80f9988a26d7 ("dmaengine: Documentation: Add documentation for multi chan testing")
Signed-off-by: Gary R Hook <gary.hook@amd.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Hook, Gary and committed by
Vinod Koul
9dcb98a2 3145d73e

+13 -8
+13 -8
Documentation/driver-api/dmaengine/dmatest.rst
··· 44 44 45 45 dmatest.timeout=2000 dmatest.iterations=1 dmatest.channel=dma0chan0 dmatest.run=1 46 46 47 - Example of multi-channel test usage: 47 + Example of multi-channel test usage (new in the 5.0 kernel):: 48 + 48 49 % modprobe dmatest 49 50 % echo 2000 > /sys/module/dmatest/parameters/timeout 50 51 % echo 1 > /sys/module/dmatest/parameters/iterations ··· 54 53 % echo dma0chan2 > /sys/module/dmatest/parameters/channel 55 54 % echo 1 > /sys/module/dmatest/parameters/run 56 55 57 - Note: the channel parameter should always be the last parameter set prior to 58 - running the test (setting run=1), this is because upon setting the channel 59 - parameter, that specific channel is requested using the dmaengine and a thread 60 - is created with the existing parameters. This thread is set as pending 61 - and will be executed once run is set to 1. Any parameters set after the thread 62 - is created are not applied. 56 + .. note:: 57 + For all tests, starting in the 5.0 kernel, either single- or multi-channel, 58 + the channel parameter(s) must be set after all other parameters. It is at 59 + that time that the existing parameter values are acquired for use by the 60 + thread(s). All other parameters are shared. Therefore, if changes are made 61 + to any of the other parameters, and an additional channel specified, the 62 + (shared) parameters used for all threads will use the new values. 63 + After the channels are specified, each thread is set as pending. All threads 64 + begin execution when the run parameter is set to 1. 63 65 64 66 .. hint:: 65 - available channel list could be extracted by running the following command:: 67 + A list of available channels can be found by running the following command:: 66 68 67 69 % ls -1 /sys/class/dma/ 68 70 ··· 208 204 Channels can be freed by setting run to 0. 209 205 210 206 Example:: 207 + 211 208 % echo dma0chan1 > /sys/module/dmatest/parameters/channel 212 209 dmatest: Added 1 threads using dma0chan1 213 210 % cat /sys/class/dma/dma0chan1/in_use