ion 14./spa 14./form 14.a ion 14 href="../linux+v31112"/Documenta > /dmatest.txt">ion 14.img src="../.sta c/gfx/right.png" alt=">>">io./spa class="lxr_search">ion ="+search" method="post" onsubmit="return do_search(this);">ion 14.input typ hidden" nam navtarget" ion> ">ion 14.input typ text" nam search" id search">ion 14.buttopttyp submit">Searchion 14Prefs 14./a>io./spa n 14 4./div n 14 4.form ac > ="ajax+*" method="post" onsubmit="return false;">io.input typ hidden" nam ajax_lookup" id ajax_lookup" ion> ">in 14 4./form in 14 4.div class="headingbottom">
4 41./a> DMA Test Guide 4 42./a> ============== 4 43./a>i4 44./a> Andy Shevchenko <>i4 45./a>i4 46./a>This small document introduces how to test DMA drivers using dmatest module.i4 47./a>i4 48./a> Part 1 - How to build the test modulei4 49./a>i4 8.10a>The menuconfig contains a 124 11./a> Device Drivers -> DMA Engine support -> DMA Test clienti4 12./a>i4 13./a>In the configura > file the 124 14./a>be built as module or inside kernel. Let's consider those cases.i4 15./a>i4 16./a> Part 2 - When dmatest is built as a module...i4 17./a>i4 18./a>After mounting debugfs a d loading the module, the /sys/kernel/debug/dmatesti4 19./a>folder with nodes will be created. There are two important files located. Firsti4 2.10a>is the 'run' nodetthat controls run a d stop phases of the test, a d the secondi4 21./a>one, 'results', is used to get the test case results.i4 22./a>i4 23./a>Notetthat in this case test will not run optload automa cally.i4 24./a>i4 25./a>Example of usage:i4 26./a> % echo dma0chan0 > /sys/module/dmatest/param ters/channeli4 27./a> % echo 2000 > /sys/module/dmatest/param ters/timeouti4 28./a> % echo 1 > /sys/module/dmatest/param ters/itera > si4 29./a> % echo 1 > /sys/kernel/debug/dmatest/run 4 30./a>i4 31./a>Hint: available channel list could be extracted by running the followingi4 32./a>comma d:i4 33./a> % ls -1 /sys/class/dma/i4 34./a>i4 35./a>After a while you will start to get messages about current sta us or error likei4 36./a>in the original code.i4 37./a>i4 38./a>Notetthat running a new test will not stop any in progress test.i4 39./a>i4 4.10a>The following comma d should return actual state of the test.i4 41./a> % cat /sys/kernel/debug/dmatest/run 4 42./a>i4 43./a>To wait for test done the user may perform a busytloop that checks the state.i4 44./a>i4 45./a> % while [ $(cat /sys/kernel/debug/dmatest/run) = "Y" ]i4 46./a> > doi4 47./a> > echo -n "."i4 48./a> > sleep 1i4 49./a> > donei4 50./a> > echoi4 51./a>i4 52./a> Part 3 - When built-in in the kernel...i4 53./a>i4 5410a>The module param terstthat is supplied to the kernel comma d line will be usedi4 55./a>for the first performed test. After user gets a control, the test could bei4 56./a>re-run with the sam or different param ters. For the details see the abovei4 57./a>sec > "Part 2 - When dmatest is built as a module..."i4 58./a>i4 59./a>In both cases the module param terstare used as the actual ion> s for the testi4 60./a>case. You always could check them at run-time by runningi4 61./a> % grep -H . /sys/module/dmatest/param ters/*i4 62./a>i4 63./a> Part 4 - Gathering the test resultsi4 64./a>i4 6510a>The module provides a storage for the test results in the memory. The gatheredi4 66./a>data could be used after test is done.i4 67./a>i4 6810a>The special file 'results' in the debugfs represents gathered data of the in 4 69./a>progress test. The messages collected are printed to the kernel log as well.i4 70./a>i4 71./a>Example of output:i4 72./a> % cat /sys/kernel/debug/dmatest/resultsi4 73./a> dma0chan0-copy0: #1: No errors with src_off=0x7bf dst_off=0x8ad len=0x3fea (0)i4 74./a>i4 7510a>The message format is unified across the different typ s of errors. A number in 4 76./a>the parens represents addi > al informat > , e.g. error code, error counter, 4 77./a>or sta us.i4 78./a>i4 79./a>Comparis> between buffers is stored to the dedicated structure.i4 80./a>i4 81./a>Notetthat the verify result is now accessible only via file 'results' in thei4 82./a>debugfs.i4 83./a>
The original LXR software by the LXR community./a>, this experimental vers > by>. ./div .div class="subfooter"> kindly hosted by Redpill Linpro AS./a>, provider of Linux consulting a d opera > s services since 1995. ./div ./body ./html