• Home
  • Raw
  • Download

Lines Matching +full:1 +full:- +full:to +full:- +full:1

7 This small document introduces how to test DMA drivers using dmatest module.
15 The dmatest module can be configured to test a specific channel. It can also
21 capability of the following: DMA_MEMCPY (memory-to-memory), DMA_MEMSET
22 (const-to-memory or memory-to-memory, when emulated), DMA_XOR, DMA_PQ.
28 Part 1 - How to build the test module
33 Device Drivers -> DMA Engine support -> DMA Test client
38 Part 2 - When dmatest is built as a module
43 % modprobe dmatest timeout=2000 iterations=1 channel=dma0chan0 run=1
49 % echo 1 > /sys/module/dmatest/parameters/iterations
51 % echo 1 > /sys/module/dmatest/parameters/run
55 dmatest.timeout=2000 dmatest.iterations=1 dmatest.channel=dma0chan0 dmatest.run=1
57 Example of multi-channel test usage (new in the 5.0 kernel)::
61 % echo 1 > /sys/module/dmatest/parameters/iterations
65 % echo 1 > /sys/module/dmatest/parameters/run
68 For all tests, starting in the 5.0 kernel, either single- or multi-channel,
72 to any of the other parameters, and an additional channel specified, the
75 begin execution when the run parameter is set to 1.
80 % ls -1 /sys/class/dma/
82 Once started a message like " dmatest: Added 1 threads using dma0chan0" is
84 pending thread is started once run is to 1.
92 To wait for test completion userspace can poll 'run' until it is false, or use
93 the wait parameter. Specifying 'wait=1' when loading the module causes module
94 initialization to pause until a test run has completed, while reading
95 /sys/module/dmatest/parameters/wait waits for any running test to complete
97 to complete before exiting. Note that if 'iterations' is set to 'infinite' then
102 % modprobe dmatest run=1 iterations=42 wait=1
103 % modprobe -r dmatest
107 % modprobe dmatest run=1 iterations=42
109 % modprobe -r dmatest
111 Part 3 - When built-in in the kernel
114 The module parameters that is supplied to the kernel command line will be used
116 re-run with the same or different parameters. For the details see the above
117 section `Part 2 - When dmatest is built as a module`_.
120 case. You always could check them at run-time by running ::
122 % grep -H . /sys/module/dmatest/parameters/*
124 Part 4 - Gathering the test results
127 Test results are printed to the kernel log buffer with the format::
133 % dmesg | tail -n 1
134 dmatest: result dma0chan0-copy0: #1: No errors with src_off=0x7bf dst_off=0x8ad len=0x3fea (0)
144 % dmesg | tail -n 1
145 dmatest: dma0chan0-copy0: summary 1 test, 0 failures 1000 iops 100000 KB/s (0)
150 Part 5 - Handling channel allocation
154 -------------------
156 Channels do not need to be configured prior to starting a test run. Attempting
157 to run the test without configuring the channels will result in testing any
162 % echo 1 > /sys/module/dmatest/parameters/run
166 name, once requested, the channel is registered and a pending thread is added to the test list.
171 dmatest: Added 1 threads using dma0chan2
179 dmatest: Added 1 threads using dma0chan1
181 dmatest: Added 1 threads using dma0chan2
185 Another method of requesting channels is to request a channel with an empty string, Doing so
186 will request all channels available to be tested:
191 dmatest: Added 1 threads using dma0chan0
192 dmatest: Added 1 threads using dma0chan3
193 dmatest: Added 1 threads using dma0chan4
194 dmatest: Added 1 threads using dma0chan5
195 dmatest: Added 1 threads using dma0chan6
196 dmatest: Added 1 threads using dma0chan7
197 dmatest: Added 1 threads using dma0chan8
205 dmatest: 1 threads using dma0chan0
206 dmatest: 1 threads using dma0chan3
207 dmatest: 1 threads using dma0chan4
208 dmatest: 1 threads using dma0chan5
209 dmatest: 1 threads using dma0chan6
210 dmatest: 1 threads using dma0chan7
211 dmatest: 1 threads using dma0chan8
213 Note: Channels will have to be configured for each test run as channel configurations do not
214 carry across to the next test run.
217 -------------------
219 Channels can be freed by setting run to 0.
224 dmatest: Added 1 threads using dma0chan1
226 1