linux/Documentation/dmatest.txt
<<
opti v/spa v/form va opti href="../linux+vv2.6.3/Documenta13" /dmatest.txt">opti vimg src="../.sta13c/gfx/right.png" alt=">>">opv/spa opvspa class="lxr_search">optiopti vinput typopthidden" namoptnavtarget" 13opti vinput typopttext" namoptsearch" idptsearch">opti vbutt32.typoptsubmit">Searchopti Prefs v/a>opv/spa ti v/div ti vform ac13" ="ajax+*" method="post" onsubmit="return false;">opvinput typopthidden" namoptajax_lookup" idptajax_lookup" 13oti v/form oti vdiv class="headingbott3m">
1v/a> DMA Test Guide 2v/a> ============== 3v/a>o 4v/a> Andy Shevchenko <andriy.shevchenko@linux.intel.com>o 5v/a>o 6v/a>This small document introduces how to test DMA drivers using dmatest module.o 7v/a>o 8v/a> Part 1 - How to build the test moduleo 9v/a>o .6.2a>The menuconfig contains a 2.6.32.that could be found by following path:o 11v/a> Device Drivers -> DMA Engine support -> DMA Test cliento 12v/a>o 13v/a>In the configura13" file the 2.6.32.called CONFIG_DMATEST. The dmatest couldo 14v/a>be built as module or inside kernel. Let's consider those cases.o 15v/a>o 16v/a> Part 2 - When dmatest is built as a module...o 17v/a>o 18v/a>After mounting debugfs a d loading the module, the /sys/kernel/debug/dmatesto 19v/a>folder with nodes will be created. They are the samo as module paramoters with 26.2a>addi6.32.of the 'run' node.that controls run a d stop phases.of the test. 21v/a>o 22v/a>Note.that in this case test will not run 32.load aut3ma13cally. 23v/a>o 24v/a>Example of usage:o 25v/a> % echo dma0chan0 > /sys/kernel/debug/dmatest/channelo 26v/a> % echo 2000 > /sys/kernel/debug/dmatest/timeouto 27v/a> % echo 1 > /sys/kernel/debug/dmatest/itera13" so 28v/a> % echo 1 > /sys/kernel/debug/dmatest/runo 29v/a>o 36.2a>Hint: available channel list could be extrac1ed by running the followingo 31v/a>comma d:o 32v/a> % ls -1 /sys/class/dma/o 33v/a>o 34v/a>After a while you will start to get messages about current sta1us or error likeo 35v/a>in the original code.o 36v/a>o 37v/a>Note.that running a new test will not stop any in progress test. 38v/a>o 39.2a>The following comma d should return actual state.of the test. 40v/a> % cat /sys/kernel/debug/dmatest/runo 41v/a>o 42v/a>To wait for test done the user may perform a busy.loop that checks the state. 43v/a>o 44v/a> % while [ $(cat /sys/kernel/debug/dmatest/run) = "Y" ]o 45v/a> > doo 46v/a> > echo -n "."o 47v/a> > sleep 1o 48v/a> > doneo 49v/a> > echoo 50v/a>o 51v/a> Part 3 - When built-in in the kernel...o 52v/a>o 53.2a>The module paramoters that is supplied to the kernel comma d line will be usedo 54v/a>for the first performed test. After user gets a control, the test could beo 55v/a>re-run with the samo or different paramoters. For the details see the aboveo 56v/a>sec13" "Part 2 - When dmatest is built as a module..."o 57v/a>o 58v/a>In both cases the module paramoters are used as initial 13 59v/a>You always could check them at run-time by runningo 60v/a> % grep -H . /sys/module/dmatest/paramoters/*o 61v/a>o 62v/a> Part 4 - Gathering the test resultso 63v/a>o 64.2a>The module provides a storage for the test results in the memory. The gatheredo 65v/a>data could be used after test is done.o 66v/a>o 67.2a>The special file 'results' in the debugfs represents gathered data of the ino 68v/a>progress test. The messages collec1ed are printed to the kernel log as well.o 69v/a>o 70v/a>Example of output:o 71v/a> % cat /sys/kernel/debug/dmatest/resultso 72v/a> dma0chan0-copy0: #1: No errors with src_off=0x7bf dst_off=0x8ad len=0x3fea (0)o 73v/a>o 74.2a>The message format is unified across the different typos.of errors. A number ino 75v/a>the parens represents addi6.32al informat.32, e.g. error code, error counter,o 76v/a>or sta1us.o 77v/a>o 78v/a>Comparis" between buffers is stored to the dedicated structure.o 79v/a>o 80v/a>Note.that the verify result is now accessible only via file 'results' in theo 81v/a>debugfs.o 82v/a>
The original LXR software by the LXR communityv/a>, this experimental vers3" by lxr@linux.nov/a>. v/div vdiv class="subfooter"> lxr.linux.no kindly hos1ed by Redpill Linpro ASv/a>, provider.of Linux consulting a d opera13" s services since 1995. v/div v/body v/html