Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
dmatest.c File Reference
#include <linux/delay.h>
#include <linux/dma-mapping.h>
#include <linux/dmaengine.h>
#include <linux/freezer.h>
#include <linux/init.h>
#include <linux/kthread.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/random.h>
#include <linux/slab.h>
#include <linux/wait.h>

Go to the source code of this file.

Data Structures

struct  dmatest_thread
 
struct  dmatest_chan
 
struct  dmatest_done
 

Macros

#define PATTERN_SRC   0x80
 
#define PATTERN_DST   0x00
 
#define PATTERN_COPY   0x40
 
#define PATTERN_OVERWRITE   0x20
 
#define PATTERN_COUNT_MASK   0x1f
 

Functions

 module_param (test_buf_size, uint, S_IRUGO)
 
 MODULE_PARM_DESC (test_buf_size,"Size of the memcpy test buffer")
 
 module_param_string (channel, test_channel, sizeof(test_channel), S_IRUGO)
 
 MODULE_PARM_DESC (channel,"Bus ID of the channel to test (default: any)")
 
 module_param_string (device, test_device, sizeof(test_device), S_IRUGO)
 
 MODULE_PARM_DESC (device,"Bus ID of the DMA Engine to test (default: any)")
 
 module_param (threads_per_chan, uint, S_IRUGO)
 
 MODULE_PARM_DESC (threads_per_chan,"Number of threads to start per channel (default: 1)")
 
 module_param (max_channels, uint, S_IRUGO)
 
 MODULE_PARM_DESC (max_channels,"Maximum number of channels to use (default: all)")
 
 module_param (iterations, uint, S_IRUGO)
 
 MODULE_PARM_DESC (iterations,"Iterations before stopping test (default: infinite)")
 
 module_param (xor_sources, uint, S_IRUGO)
 
 MODULE_PARM_DESC (xor_sources,"Number of xor source buffers (default: 3)")
 
 module_param (pq_sources, uint, S_IRUGO)
 
 MODULE_PARM_DESC (pq_sources,"Number of p+q source buffers (default: 3)")
 
 module_param (timeout, uint, S_IRUGO)
 
 MODULE_PARM_DESC (timeout,"Transfer Timeout in msec (default: 3000), ""Pass -1 for infinite timeout")
 
 late_initcall (dmatest_init)
 
 module_exit (dmatest_exit)
 
 MODULE_AUTHOR ("Haavard Skinnemoen (Atmel)")
 
 MODULE_LICENSE ("GPL v2")
 

Macro Definition Documentation

#define PATTERN_COPY   0x40

Definition at line 77 of file dmatest.c.

#define PATTERN_COUNT_MASK   0x1f

Definition at line 79 of file dmatest.c.

#define PATTERN_DST   0x00

Definition at line 76 of file dmatest.c.

#define PATTERN_OVERWRITE   0x20

Definition at line 78 of file dmatest.c.

#define PATTERN_SRC   0x80

Definition at line 75 of file dmatest.c.

Function Documentation

late_initcall ( dmatest_init  )
MODULE_AUTHOR ( "Haavard Skinnemoen (Atmel)"  )
module_exit ( dmatest_exit  )
MODULE_LICENSE ( "GPL v2 )
module_param ( test_buf_size  ,
uint  ,
S_IRUGO   
)
module_param ( threads_per_chan  ,
uint  ,
S_IRUGO   
)
module_param ( max_channels  ,
uint  ,
S_IRUGO   
)
module_param ( iterations  ,
uint  ,
S_IRUGO   
)
module_param ( xor_sources  ,
uint  ,
S_IRUGO   
)
module_param ( pq_sources  ,
uint  ,
S_IRUGO   
)
module_param ( timeout  ,
uint  ,
S_IRUGO   
)
module_param_string ( channel  ,
test_channel  ,
sizeof(test_channel)  ,
S_IRUGO   
)
module_param_string ( device  ,
test_device  ,
sizeof(test_device)  ,
S_IRUGO   
)
MODULE_PARM_DESC ( test_buf_size  ,
"Size of the memcpy test buffer  
)
MODULE_PARM_DESC ( channel  ,
"Bus ID of the channel to test (default: any)"   
)
MODULE_PARM_DESC ( device  ,
"Bus ID of the DMA Engine to test (default: any)"   
)
MODULE_PARM_DESC ( threads_per_chan  ,
"Number of threads to start per channel (default: 1)"   
)
MODULE_PARM_DESC ( max_channels  ,
"Maximum number of channels to use (default: all)"   
)
MODULE_PARM_DESC ( iterations  ,
"Iterations before stopping test (default: infinite)"   
)
MODULE_PARM_DESC ( xor_sources  ,
"Number of xor source buffers (default: 3)"   
)
MODULE_PARM_DESC ( pq_sources  ,
"Number of p+q source buffers (default: 3)"   
)
MODULE_PARM_DESC ( timeout  ,
"Transfer Timeout in msec   default: 3000,
""Pass-1 for infinite timeout  
)