ssphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget0/translations/zh_CN/driver-api/dmaengine/dmatestmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget0/translations/zh_TW/driver-api/dmaengine/dmatestmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget0/translations/it_IT/driver-api/dmaengine/dmatestmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget0/translations/ja_JP/driver-api/dmaengine/dmatestmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget0/translations/ko_KR/driver-api/dmaengine/dmatestmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget0/translations/sp_SP/driver-api/dmaengine/dmatestmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(hDMA Test Guideh]hDMA Test Guide}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhJ/var/lib/git/docbuild/linux/Documentation/driver-api/dmaengine/dmatest.rsthKubh paragraph)}(h3Andy Shevchenko h](hAndy Shevchenko <}(hhhhhNhNubh reference)}(h!andriy.shevchenko@linux.intel.comh]h!andriy.shevchenko@linux.intel.com}(hhhhhNhNubah}(h]h ]h"]h$]h&]refuri(mailto:andriy.shevchenko@linux.intel.comuh1hhhubh>}(hhhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hLThis small document introduces how to test DMA drivers using dmatest module.h]hLThis small document introduces how to test DMA drivers using dmatest module.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hXThe 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.h]hXThe 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.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hThe 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.h]hThe 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.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubhnote)}(hThe test suite works only on the channels that have at least one capability of the following: DMA_MEMCPY (memory-to-memory), DMA_MEMSET (const-to-memory or memory-to-memory, when emulated), DMA_XOR, DMA_PQ.h]h)}(hThe test suite works only on the channels that have at least one capability of the following: DMA_MEMCPY (memory-to-memory), DMA_MEMSET (const-to-memory or memory-to-memory, when emulated), DMA_XOR, DMA_PQ.h]hThe test suite works only on the channels that have at least one capability of the following: DMA_MEMCPY (memory-to-memory), DMA_MEMSET (const-to-memory or memory-to-memory, when emulated), DMA_XOR, DMA_PQ.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhhhhhhhNubj)}(hYIn case of any related questions use the official mailing list dmaengine@vger.kernel.org.h]h)}(hYIn case of any related questions use the official mailing list dmaengine@vger.kernel.org.h](h?In case of any related questions use the official mailing list }(hj%hhhNhNubh)}(hdmaengine@vger.kernel.orgh]hdmaengine@vger.kernel.org}(hj-hhhNhNubah}(h]h ]h"]h$]h&]refuri mailto:dmaengine@vger.kernel.orguh1hhj%ubh.}(hj%hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj!ubah}(h]h ]h"]h$]h&]uh1jhhhhhhhNubh)}(hhh](h)}(h%Part 1 - How to build the test moduleh]h%Part 1 - How to build the test module}(hjPhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjMhhhhhKubh)}(hHThe menuconfig contains an option that could be found by following path:h]hHThe menuconfig contains an option that could be found by following path:}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjMhhubh block_quote)}(h8Device Drivers -> DMA Engine support -> DMA Test client h]h)}(h7Device Drivers -> DMA Engine support -> DMA Test clienth]h7Device Drivers -> DMA Engine support -> DMA Test client}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK!hjnubah}(h]h ]h"]h$]h&]uh1jlhhhK!hjMhhubh)}(hIn the configuration file the option called CONFIG_DMATEST. The dmatest could be built as module or inside kernel. Let's consider those cases.h]hIn the configuration file the option called CONFIG_DMATEST. The dmatest could be built as module or inside kernel. Let’s consider those cases.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK#hjMhhubeh}(h]#part-1-how-to-build-the-test-moduleah ]h"]%part 1 - how to build the test moduleah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h*Part 2 - When dmatest is built as a moduleh]h*Part 2 - When dmatest is built as a module}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK'ubh)}(hExample of usage::h]hExample of usage:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK)hjhhubh literal_block)}(hD% modprobe dmatest timeout=2000 iterations=1 channel=dma0chan0 run=1h]hD% modprobe dmatest timeout=2000 iterations=1 channel=dma0chan0 run=1}hjsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1jhhhK+hjhhubh)}(h...or::h]h...or:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK-hjhhubj)}(h% modprobe dmatest % echo 2000 > /sys/module/dmatest/parameters/timeout % echo 1 > /sys/module/dmatest/parameters/iterations % echo dma0chan0 > /sys/module/dmatest/parameters/channel % echo 1 > /sys/module/dmatest/parameters/runh]h% modprobe dmatest % echo 2000 > /sys/module/dmatest/parameters/timeout % echo 1 > /sys/module/dmatest/parameters/iterations % echo dma0chan0 > /sys/module/dmatest/parameters/channel % echo 1 > /sys/module/dmatest/parameters/run}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhK/hjhhubh)}(h"...or on the kernel command line::h]h!...or on the kernel command line:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK5hjhhubj)}(hQdmatest.timeout=2000 dmatest.iterations=1 dmatest.channel=dma0chan0 dmatest.run=1h]hQdmatest.timeout=2000 dmatest.iterations=1 dmatest.channel=dma0chan0 dmatest.run=1}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhK7hjhhubh)}(h=Example of multi-channel test usage (new in the 5.0 kernel)::h]h /sys/module/dmatest/parameters/timeout % echo 1 > /sys/module/dmatest/parameters/iterations % echo dma0chan0 > /sys/module/dmatest/parameters/channel % echo dma0chan1 > /sys/module/dmatest/parameters/channel % echo dma0chan2 > /sys/module/dmatest/parameters/channel % echo 1 > /sys/module/dmatest/parameters/runh]hXX% modprobe dmatest % echo 2000 > /sys/module/dmatest/parameters/timeout % echo 1 > /sys/module/dmatest/parameters/iterations % echo dma0chan0 > /sys/module/dmatest/parameters/channel % echo dma0chan1 > /sys/module/dmatest/parameters/channel % echo dma0chan2 > /sys/module/dmatest/parameters/channel % echo 1 > /sys/module/dmatest/parameters/run}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhK;hjhhubj)}(hX5For all tests, starting in the 5.0 kernel, either single- or multi-channel, the channel parameter(s) must be set after all other parameters. It is at that time that the existing parameter values are acquired for use by the thread(s). All other parameters are shared. Therefore, if changes are made to any of the other parameters, and an additional channel specified, the (shared) parameters used for all threads will use the new values. After the channels are specified, each thread is set as pending. All threads begin execution when the run parameter is set to 1.h]h)}(hX5For all tests, starting in the 5.0 kernel, either single- or multi-channel, the channel parameter(s) must be set after all other parameters. It is at that time that the existing parameter values are acquired for use by the thread(s). All other parameters are shared. Therefore, if changes are made to any of the other parameters, and an additional channel specified, the (shared) parameters used for all threads will use the new values. After the channels are specified, each thread is set as pending. All threads begin execution when the run parameter is set to 1.h]hX5For all tests, starting in the 5.0 kernel, either single- or multi-channel, the channel parameter(s) must be set after all other parameters. It is at that time that the existing parameter values are acquired for use by the thread(s). All other parameters are shared. Therefore, if changes are made to any of the other parameters, and an additional channel specified, the (shared) parameters used for all threads will use the new values. After the channels are specified, each thread is set as pending. All threads begin execution when the run parameter is set to 1.}(hj%hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKDhj!ubah}(h]h ]h"]h$]h&]uh1jhjhhhhhNubhhint)}(hgA list of available channels can be found by running the following command:: % ls -1 /sys/class/dma/h](h)}(hLA list of available channels can be found by running the following command::h]hKA list of available channels can be found by running the following command:}(hj?hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKNhj;ubj)}(h% ls -1 /sys/class/dma/h]h% ls -1 /sys/class/dma/}hjMsbah}(h]h ]h"]h$]h&]jjuh1jhhhKPhj;ubeh}(h]h ]h"]h$]h&]uh1j9hjhhhhhNubh)}(hOnce started a message like " dmatest: Added 1 threads using dma0chan0" is emitted. A thread for that specific channel is created and is now pending, the pending thread is started once run is to 1.h]hOnce started a message like “ dmatest: Added 1 threads using dma0chan0” is emitted. A thread for that specific channel is created and is now pending, the pending thread is started once run is to 1.}(hjahhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKRhjhhubh)}(h@Note that running a new test will not stop any in progress test.h]h@Note that running a new test will not stop any in progress test.}(hjohhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKVhjhhubh)}(h7The following command returns the state of the test. ::h]h4The following command returns the state of the test.}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKXhjhhubj)}(h(% cat /sys/module/dmatest/parameters/runh]h(% cat /sys/module/dmatest/parameters/run}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKZhjhhubh)}(hXTo wait for test completion userspace can poll 'run' until it is false, or use the wait parameter. Specifying 'wait=1' when loading the module causes module initialization to pause until a test run has completed, while reading /sys/module/dmatest/parameters/wait waits for any running test to complete before returning. For example, the following scripts wait for 42 tests to complete before exiting. Note that if 'iterations' is set to 'infinite' then waiting is disabled.h]hXTo wait for test completion userspace can poll ‘run’ until it is false, or use the wait parameter. Specifying ‘wait=1’ when loading the module causes module initialization to pause until a test run has completed, while reading /sys/module/dmatest/parameters/wait waits for any running test to complete before returning. For example, the following scripts wait for 42 tests to complete before exiting. Note that if ‘iterations’ is set to ‘infinite’ then waiting is disabled.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK\hjhhubh)}(h Example::h]hExample:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKdhjhhubj)}(hC% modprobe dmatest run=1 iterations=42 wait=1 % modprobe -r dmatesth]hC% modprobe dmatest run=1 iterations=42 wait=1 % modprobe -r dmatest}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKfhjhhubh)}(h...or::h]h...or:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKihjhhubj)}(hf% modprobe dmatest run=1 iterations=42 % cat /sys/module/dmatest/parameters/wait % modprobe -r dmatesth]hf% modprobe dmatest run=1 iterations=42 % cat /sys/module/dmatest/parameters/wait % modprobe -r dmatest}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKkhjhhubeh}(h](part-2-when-dmatest-is-built-as-a-moduleah ]h"]*part 2 - when dmatest is built as a moduleah$]h&]uh1hhhhhhhhK' referencedKubh)}(hhh](h)}(h$Part 3 - When built-in in the kernelh]h$Part 3 - When built-in in the kernel}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKpubh)}(hXThe module parameters that is supplied to the kernel command line will be used for the first performed test. After user gets a control, the test could be re-run with the same or different parameters. For the details see the above section `Part 2 - When dmatest is built as a module`_.h](hThe module parameters that is supplied to the kernel command line will be used for the first performed test. After user gets a control, the test could be re-run with the same or different parameters. For the details see the above section }(hjhhhNhNubh)}(h-`Part 2 - When dmatest is built as a module`_h]h*Part 2 - When dmatest is built as a module}(hjhhhNhNubah}(h]h ]h"]h$]h&]name*Part 2 - When dmatest is built as a modulerefidjuh1hhjresolvedKubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKrhjhhubh)}(hIn both cases the module parameters are used as the actual values for the test case. You always could check them at run-time by running ::h]hIn both cases the module parameters are used as the actual values for the test case. You always could check them at run-time by running}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKwhjhhubj)}(h,% grep -H . /sys/module/dmatest/parameters/*h]h,% grep -H . /sys/module/dmatest/parameters/*}hj+sbah}(h]h ]h"]h$]h&]jjuh1jhhhKzhjhhubeh}(h]"part-3-when-built-in-in-the-kernelah ]h"]$part 3 - when built-in in the kernelah$]h&]uh1hhhhhhhhKpubh)}(hhh](h)}(h#Part 4 - Gathering the test resultsh]h#Part 4 - Gathering the test results}(hjDhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjAhhhhhK}ubh)}(hCTest results are printed to the kernel log buffer with the format::h]hBTest results are printed to the kernel log buffer with the format:}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjAhhubj)}(hm"dmatest: result : : '' with src_off= dst_off= len= ()"h]hm"dmatest: result : : '' with src_off= dst_off= len= ()"}hj`sbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjAhhubh)}(hExample of output::h]hExample of output:}(hjnhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjAhhubj)}(hr% dmesg | tail -n 1 dmatest: result dma0chan0-copy0: #1: No errors with src_off=0x7bf dst_off=0x8ad len=0x3fea (0)h]hr% dmesg | tail -n 1 dmatest: result dma0chan0-copy0: #1: No errors with src_off=0x7bf dst_off=0x8ad len=0x3fea (0)}hj|sbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjAhhubh)}(hX0The message format is unified across the different types of errors. A number in the parentheses represents additional information, e.g. error code, error counter, or status. A test thread also emits a summary line at completion listing the number of tests executed, number that failed, and a result code.h]hX0The message format is unified across the different types of errors. A number in the parentheses represents additional information, e.g. error code, error counter, or status. A test thread also emits a summary line at completion listing the number of tests executed, number that failed, and a result code.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjAhhubh)}(h Example::h]hExample:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjAhhubj)}(hb% dmesg | tail -n 1 dmatest: dma0chan0-copy0: summary 1 test, 0 failures 1000 iops 100000 KB/s (0)h]hb% dmesg | tail -n 1 dmatest: dma0chan0-copy0: summary 1 test, 0 failures 1000 iops 100000 KB/s (0)}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjAhhubh)}(h\The details of a data miscompare error are also emitted, but do not follow the above format.h]h\The details of a data miscompare error are also emitted, but do not follow the above format.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjAhhubeh}(h]!part-4-gathering-the-test-resultsah ]h"]#part 4 - gathering the test resultsah$]h&]uh1hhhhhhhhK}ubh)}(hhh](h)}(h$Part 5 - Handling channel allocationh]h$Part 5 - Handling channel allocation}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(hAllocating Channelsh]hAllocating Channels}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hChannels 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.h]hChannels 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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(h Example::h]hExample:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(h`% echo 1 > /sys/module/dmatest/parameters/run dmatest: No channels configured, continue with anyh]h`% echo 1 > /sys/module/dmatest/parameters/run dmatest: No channels configured, continue with any}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjhhubh)}(hChannels 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.h]hChannels 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.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(h Example::h]hExample:}(hj$hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hb% echo dma0chan2 > /sys/module/dmatest/parameters/channel dmatest: Added 1 threads using dma0chan2h]hb% echo dma0chan2 > /sys/module/dmatest/parameters/channel dmatest: Added 1 threads using dma0chan2}hj2sbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjhhubh)}(hMore channels can be added by repeating the example above. Reading back the channel parameter will return the name of last channel that was added successfully.h]hMore channels can be added by repeating the example above. Reading back the channel parameter will return the name of last channel that was added successfully.}(hj@hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(h Example::h]hExample:}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(h% echo dma0chan1 > /sys/module/dmatest/parameters/channel dmatest: Added 1 threads using dma0chan1 % echo dma0chan2 > /sys/module/dmatest/parameters/channel dmatest: Added 1 threads using dma0chan2 % cat /sys/module/dmatest/parameters/channel dma0chan2h]h% echo dma0chan1 > /sys/module/dmatest/parameters/channel dmatest: Added 1 threads using dma0chan1 % echo dma0chan2 > /sys/module/dmatest/parameters/channel dmatest: Added 1 threads using dma0chan2 % cat /sys/module/dmatest/parameters/channel dma0chan2}hj\sbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjhhubh)}(hAnother method of requesting channels is to request a channel with an empty string, Doing so will request all channels available to be tested:h]hAnother method of requesting channels is to request a channel with an empty string, Doing so will request all channels available to be tested:}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(h Example::h]hExample:}(hjxhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hXQ% echo "" > /sys/module/dmatest/parameters/channel dmatest: Added 1 threads using dma0chan0 dmatest: Added 1 threads using dma0chan3 dmatest: Added 1 threads using dma0chan4 dmatest: Added 1 threads using dma0chan5 dmatest: Added 1 threads using dma0chan6 dmatest: Added 1 threads using dma0chan7 dmatest: Added 1 threads using dma0chan8h]hXQ% echo "" > /sys/module/dmatest/parameters/channel dmatest: Added 1 threads using dma0chan0 dmatest: Added 1 threads using dma0chan3 dmatest: Added 1 threads using dma0chan4 dmatest: Added 1 threads using dma0chan5 dmatest: Added 1 threads using dma0chan6 dmatest: Added 1 threads using dma0chan7 dmatest: Added 1 threads using dma0chan8}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjhhubh)}(h}At any point during the test configuration, reading the "test_list" parameter will print the list of currently pending tests.h]hAt any point during the test configuration, reading the “test_list” parameter will print the list of currently pending tests.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(h Example::h]hExample:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hX#% cat /sys/module/dmatest/parameters/test_list dmatest: 1 threads using dma0chan0 dmatest: 1 threads using dma0chan3 dmatest: 1 threads using dma0chan4 dmatest: 1 threads using dma0chan5 dmatest: 1 threads using dma0chan6 dmatest: 1 threads using dma0chan7 dmatest: 1 threads using dma0chan8h]hX#% cat /sys/module/dmatest/parameters/test_list dmatest: 1 threads using dma0chan0 dmatest: 1 threads using dma0chan3 dmatest: 1 threads using dma0chan4 dmatest: 1 threads using dma0chan5 dmatest: 1 threads using dma0chan6 dmatest: 1 threads using dma0chan7 dmatest: 1 threads using dma0chan8}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjhhubh)}(hNote: Channels will have to be configured for each test run as channel configurations do not carry across to the next test run.h]hNote: Channels will have to be configured for each test run as channel configurations do not carry across to the next test run.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]allocating-channelsah ]h"]allocating channelsah$]h&]uh1hhjhhhhhKubh)}(hhh](h)}(hReleasing Channelsh]hReleasing Channels}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(h*Channels can be freed by setting run to 0.h]h*Channels can be freed by setting run to 0.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(h Example::h]hExample:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(h% echo dma0chan1 > /sys/module/dmatest/parameters/channel dmatest: Added 1 threads using dma0chan1 % cat /sys/class/dma/dma0chan1/in_use 1 % echo 0 > /sys/module/dmatest/parameters/run % cat /sys/class/dma/dma0chan1/in_use 0h]h% echo dma0chan1 > /sys/module/dmatest/parameters/channel dmatest: Added 1 threads using dma0chan1 % cat /sys/class/dma/dma0chan1/in_use 1 % echo 0 > /sys/module/dmatest/parameters/run % cat /sys/class/dma/dma0chan1/in_use 0}hjsbah}(h]h ]h"]h$]h&]jjuh1jhhhKhjhhubh)}(hChannels allocated by previous test runs are automatically freed when a new channel is requested after completing a successful test run.h]hChannels allocated by previous test runs are automatically freed when a new channel is requested after completing a successful test run.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]releasing-channelsah ]h"]releasing channelsah$]h&]uh1hhjhhhhhKubeh}(h]"part-5-handling-channel-allocationah ]h"]$part 5 - handling channel allocationah$]h&]uh1hhhhhhhhKubeh}(h]dma-test-guideah ]h"]dma test guideah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjXerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}*part 2 - when dmatest is built as a module]jasrefids}nameids}(j2j/jjjjj>j;jjj*j'jjj"ju nametypes}(j2jjj>jj*jj"uh}(j/hjjMjjj;jjjAj'jjjjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.