2 * DMA Engine test module
4 * Copyright (C) 2007 Atmel Corporation
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
10 #include <linux/delay.h>
11 #include <linux/dma-mapping.h>
12 #include <linux/dmaengine.h>
13 #include <linux/freezer.h>
14 #include <linux/init.h>
15 #include <linux/kthread.h>
16 #include <linux/module.h>
17 #include <linux/moduleparam.h>
18 #include <linux/random.h>
19 #include <linux/slab.h>
20 #include <linux/wait.h>
22 static unsigned int test_buf_size
= 16384;
23 module_param(test_buf_size
, uint
, S_IRUGO
);
24 MODULE_PARM_DESC(test_buf_size
, "Size of the memcpy test buffer");
26 static char test_channel
[20];
27 module_param_string(channel
, test_channel
, sizeof(test_channel
), S_IRUGO
);
28 MODULE_PARM_DESC(channel
, "Bus ID of the channel to test (default: any)");
30 static char test_device
[20];
31 module_param_string(device
, test_device
, sizeof(test_device
), S_IRUGO
);
32 MODULE_PARM_DESC(device
, "Bus ID of the DMA Engine to test (default: any)");
34 static unsigned int threads_per_chan
= 1;
35 module_param(threads_per_chan
, uint
, S_IRUGO
);
36 MODULE_PARM_DESC(threads_per_chan
,
37 "Number of threads to start per channel (default: 1)");
39 static unsigned int max_channels
;
40 module_param(max_channels
, uint
, S_IRUGO
);
41 MODULE_PARM_DESC(max_channels
,
42 "Maximum number of channels to use (default: all)");
44 static unsigned int iterations
;
45 module_param(iterations
, uint
, S_IRUGO
);
46 MODULE_PARM_DESC(iterations
,
47 "Iterations before stopping test (default: infinite)");
49 static unsigned int xor_sources
= 3;
50 module_param(xor_sources
, uint
, S_IRUGO
);
51 MODULE_PARM_DESC(xor_sources
,
52 "Number of xor source buffers (default: 3)");
54 static unsigned int pq_sources
= 3;
55 module_param(pq_sources
, uint
, S_IRUGO
);
56 MODULE_PARM_DESC(pq_sources
,
57 "Number of p+q source buffers (default: 3)");
59 static int timeout
= 3000;
60 module_param(timeout
, uint
, S_IRUGO
);
61 MODULE_PARM_DESC(timeout
, "Transfer Timeout in msec (default: 3000), "
62 "Pass -1 for infinite timeout");
65 * Initialization patterns. All bytes in the source buffer has bit 7
66 * set, all bytes in the destination buffer has bit 7 cleared.
68 * Bit 6 is set for all bytes which are to be copied by the DMA
69 * engine. Bit 5 is set for all bytes which are to be overwritten by
72 * The remaining bits are the inverse of a counter which increments by
73 * one for each byte address.
75 #define PATTERN_SRC 0x80
76 #define PATTERN_DST 0x00
77 #define PATTERN_COPY 0x40
78 #define PATTERN_OVERWRITE 0x20
79 #define PATTERN_COUNT_MASK 0x1f
83 struct dmatest_thread
{
84 struct list_head node
;
85 struct dmatest_info
*info
;
86 struct task_struct
*task
;
87 struct dma_chan
*chan
;
90 enum dma_transaction_type type
;
94 struct list_head node
;
95 struct dma_chan
*chan
;
96 struct list_head threads
;
100 * struct dmatest_params - test parameters.
101 * @buf_size: size of the memcpy test buffer
102 * @channel: bus ID of the channel to test
103 * @device: bus ID of the DMA Engine to test
104 * @threads_per_chan: number of threads to start per channel
105 * @max_channels: maximum number of channels to use
106 * @iterations: iterations before stopping test
107 * @xor_sources: number of xor source buffers
108 * @pq_sources: number of p+q source buffers
109 * @timeout: transfer timeout in msec, -1 for infinite timeout
111 struct dmatest_params
{
112 unsigned int buf_size
;
115 unsigned int threads_per_chan
;
116 unsigned int max_channels
;
117 unsigned int iterations
;
118 unsigned int xor_sources
;
119 unsigned int pq_sources
;
124 * struct dmatest_info - test information.
125 * @params: test parameters
127 struct dmatest_info
{
128 /* Test parameters */
129 struct dmatest_params params
;
132 struct list_head channels
;
133 unsigned int nr_channels
;
136 static struct dmatest_info test_info
;
138 static bool dmatest_match_channel(struct dmatest_params
*params
,
139 struct dma_chan
*chan
)
141 if (params
->channel
[0] == '\0')
143 return strcmp(dma_chan_name(chan
), params
->channel
) == 0;
146 static bool dmatest_match_device(struct dmatest_params
*params
,
147 struct dma_device
*device
)
149 if (params
->device
[0] == '\0')
151 return strcmp(dev_name(device
->dev
), params
->device
) == 0;
154 static unsigned long dmatest_random(void)
158 get_random_bytes(&buf
, sizeof(buf
));
162 static void dmatest_init_srcs(u8
**bufs
, unsigned int start
, unsigned int len
,
163 unsigned int buf_size
)
168 for (; (buf
= *bufs
); bufs
++) {
169 for (i
= 0; i
< start
; i
++)
170 buf
[i
] = PATTERN_SRC
| (~i
& PATTERN_COUNT_MASK
);
171 for ( ; i
< start
+ len
; i
++)
172 buf
[i
] = PATTERN_SRC
| PATTERN_COPY
173 | (~i
& PATTERN_COUNT_MASK
);
174 for ( ; i
< buf_size
; i
++)
175 buf
[i
] = PATTERN_SRC
| (~i
& PATTERN_COUNT_MASK
);
180 static void dmatest_init_dsts(u8
**bufs
, unsigned int start
, unsigned int len
,
181 unsigned int buf_size
)
186 for (; (buf
= *bufs
); bufs
++) {
187 for (i
= 0; i
< start
; i
++)
188 buf
[i
] = PATTERN_DST
| (~i
& PATTERN_COUNT_MASK
);
189 for ( ; i
< start
+ len
; i
++)
190 buf
[i
] = PATTERN_DST
| PATTERN_OVERWRITE
191 | (~i
& PATTERN_COUNT_MASK
);
192 for ( ; i
< buf_size
; i
++)
193 buf
[i
] = PATTERN_DST
| (~i
& PATTERN_COUNT_MASK
);
197 static void dmatest_mismatch(u8 actual
, u8 pattern
, unsigned int index
,
198 unsigned int counter
, bool is_srcbuf
)
200 u8 diff
= actual
^ pattern
;
201 u8 expected
= pattern
| (~counter
& PATTERN_COUNT_MASK
);
202 const char *thread_name
= current
->comm
;
205 pr_warning("%s: srcbuf[0x%x] overwritten!"
206 " Expected %02x, got %02x\n",
207 thread_name
, index
, expected
, actual
);
208 else if ((pattern
& PATTERN_COPY
)
209 && (diff
& (PATTERN_COPY
| PATTERN_OVERWRITE
)))
210 pr_warning("%s: dstbuf[0x%x] not copied!"
211 " Expected %02x, got %02x\n",
212 thread_name
, index
, expected
, actual
);
213 else if (diff
& PATTERN_SRC
)
214 pr_warning("%s: dstbuf[0x%x] was copied!"
215 " Expected %02x, got %02x\n",
216 thread_name
, index
, expected
, actual
);
218 pr_warning("%s: dstbuf[0x%x] mismatch!"
219 " Expected %02x, got %02x\n",
220 thread_name
, index
, expected
, actual
);
223 static unsigned int dmatest_verify(u8
**bufs
, unsigned int start
,
224 unsigned int end
, unsigned int counter
, u8 pattern
,
228 unsigned int error_count
= 0;
232 unsigned int counter_orig
= counter
;
234 for (; (buf
= *bufs
); bufs
++) {
235 counter
= counter_orig
;
236 for (i
= start
; i
< end
; i
++) {
238 expected
= pattern
| (~counter
& PATTERN_COUNT_MASK
);
239 if (actual
!= expected
) {
240 if (error_count
< 32)
241 dmatest_mismatch(actual
, pattern
, i
,
249 if (error_count
> 32)
250 pr_warning("%s: %u errors suppressed\n",
251 current
->comm
, error_count
- 32);
256 /* poor man's completion - we want to use wait_event_freezable() on it */
257 struct dmatest_done
{
259 wait_queue_head_t
*wait
;
262 static void dmatest_callback(void *arg
)
264 struct dmatest_done
*done
= arg
;
267 wake_up_all(done
->wait
);
270 static inline void unmap_src(struct device
*dev
, dma_addr_t
*addr
, size_t len
,
274 dma_unmap_single(dev
, addr
[count
], len
, DMA_TO_DEVICE
);
277 static inline void unmap_dst(struct device
*dev
, dma_addr_t
*addr
, size_t len
,
281 dma_unmap_single(dev
, addr
[count
], len
, DMA_BIDIRECTIONAL
);
284 static unsigned int min_odd(unsigned int x
, unsigned int y
)
286 unsigned int val
= min(x
, y
);
288 return val
% 2 ? val
: val
- 1;
292 * This function repeatedly tests DMA transfers of various lengths and
293 * offsets for a given operation type until it is told to exit by
294 * kthread_stop(). There may be multiple threads running this function
295 * in parallel for a single channel, and there may be multiple channels
296 * being tested in parallel.
298 * Before each test, the source and destination buffer is initialized
299 * with a known pattern. This pattern is different depending on
300 * whether it's in an area which is supposed to be copied or
301 * overwritten, and different in the source and destination buffers.
302 * So if the DMA engine doesn't copy exactly what we tell it to copy,
305 static int dmatest_func(void *data
)
307 DECLARE_WAIT_QUEUE_HEAD_ONSTACK(done_wait
);
308 struct dmatest_thread
*thread
= data
;
309 struct dmatest_done done
= { .wait
= &done_wait
};
310 struct dmatest_info
*info
;
311 struct dmatest_params
*params
;
312 struct dma_chan
*chan
;
313 struct dma_device
*dev
;
314 const char *thread_name
;
315 unsigned int src_off
, dst_off
, len
;
316 unsigned int error_count
;
317 unsigned int failed_tests
= 0;
318 unsigned int total_tests
= 0;
320 enum dma_status status
;
321 enum dma_ctrl_flags flags
;
328 thread_name
= current
->comm
;
335 params
= &info
->params
;
338 if (thread
->type
== DMA_MEMCPY
)
339 src_cnt
= dst_cnt
= 1;
340 else if (thread
->type
== DMA_XOR
) {
341 /* force odd to ensure dst = src */
342 src_cnt
= min_odd(params
->xor_sources
| 1, dev
->max_xor
);
344 } else if (thread
->type
== DMA_PQ
) {
345 /* force odd to ensure dst = src */
346 src_cnt
= min_odd(params
->pq_sources
| 1, dma_maxpq(dev
, 0));
349 pq_coefs
= kmalloc(params
->pq_sources
+1, GFP_KERNEL
);
351 goto err_thread_type
;
353 for (i
= 0; i
< src_cnt
; i
++)
356 goto err_thread_type
;
358 thread
->srcs
= kcalloc(src_cnt
+1, sizeof(u8
*), GFP_KERNEL
);
361 for (i
= 0; i
< src_cnt
; i
++) {
362 thread
->srcs
[i
] = kmalloc(params
->buf_size
, GFP_KERNEL
);
363 if (!thread
->srcs
[i
])
366 thread
->srcs
[i
] = NULL
;
368 thread
->dsts
= kcalloc(dst_cnt
+1, sizeof(u8
*), GFP_KERNEL
);
371 for (i
= 0; i
< dst_cnt
; i
++) {
372 thread
->dsts
[i
] = kmalloc(params
->buf_size
, GFP_KERNEL
);
373 if (!thread
->dsts
[i
])
376 thread
->dsts
[i
] = NULL
;
378 set_user_nice(current
, 10);
381 * src buffers are freed by the DMAEngine code with dma_unmap_single()
382 * dst buffers are freed by ourselves below
384 flags
= DMA_CTRL_ACK
| DMA_PREP_INTERRUPT
385 | DMA_COMPL_SKIP_DEST_UNMAP
| DMA_COMPL_SRC_UNMAP_SINGLE
;
387 while (!kthread_should_stop()
388 && !(params
->iterations
&& total_tests
>= params
->iterations
)) {
389 struct dma_async_tx_descriptor
*tx
= NULL
;
390 dma_addr_t dma_srcs
[src_cnt
];
391 dma_addr_t dma_dsts
[dst_cnt
];
396 /* honor alignment restrictions */
397 if (thread
->type
== DMA_MEMCPY
)
398 align
= dev
->copy_align
;
399 else if (thread
->type
== DMA_XOR
)
400 align
= dev
->xor_align
;
401 else if (thread
->type
== DMA_PQ
)
402 align
= dev
->pq_align
;
404 if (1 << align
> params
->buf_size
) {
405 pr_err("%u-byte buffer too small for %d-byte alignment\n",
406 params
->buf_size
, 1 << align
);
410 len
= dmatest_random() % params
->buf_size
+ 1;
411 len
= (len
>> align
) << align
;
414 src_off
= dmatest_random() % (params
->buf_size
- len
+ 1);
415 dst_off
= dmatest_random() % (params
->buf_size
- len
+ 1);
417 src_off
= (src_off
>> align
) << align
;
418 dst_off
= (dst_off
>> align
) << align
;
420 dmatest_init_srcs(thread
->srcs
, src_off
, len
, params
->buf_size
);
421 dmatest_init_dsts(thread
->dsts
, dst_off
, len
, params
->buf_size
);
423 for (i
= 0; i
< src_cnt
; i
++) {
424 u8
*buf
= thread
->srcs
[i
] + src_off
;
426 dma_srcs
[i
] = dma_map_single(dev
->dev
, buf
, len
,
428 ret
= dma_mapping_error(dev
->dev
, dma_srcs
[i
]);
430 unmap_src(dev
->dev
, dma_srcs
, len
, i
);
431 pr_warn("%s: #%u: mapping error %d with "
432 "src_off=0x%x len=0x%x\n",
433 thread_name
, total_tests
- 1, ret
,
439 /* map with DMA_BIDIRECTIONAL to force writeback/invalidate */
440 for (i
= 0; i
< dst_cnt
; i
++) {
441 dma_dsts
[i
] = dma_map_single(dev
->dev
, thread
->dsts
[i
],
444 ret
= dma_mapping_error(dev
->dev
, dma_dsts
[i
]);
446 unmap_src(dev
->dev
, dma_srcs
, len
, src_cnt
);
447 unmap_dst(dev
->dev
, dma_dsts
, params
->buf_size
,
449 pr_warn("%s: #%u: mapping error %d with "
450 "dst_off=0x%x len=0x%x\n",
451 thread_name
, total_tests
- 1, ret
,
452 dst_off
, params
->buf_size
);
458 if (thread
->type
== DMA_MEMCPY
)
459 tx
= dev
->device_prep_dma_memcpy(chan
,
460 dma_dsts
[0] + dst_off
,
463 else if (thread
->type
== DMA_XOR
)
464 tx
= dev
->device_prep_dma_xor(chan
,
465 dma_dsts
[0] + dst_off
,
468 else if (thread
->type
== DMA_PQ
) {
469 dma_addr_t dma_pq
[dst_cnt
];
471 for (i
= 0; i
< dst_cnt
; i
++)
472 dma_pq
[i
] = dma_dsts
[i
] + dst_off
;
473 tx
= dev
->device_prep_dma_pq(chan
, dma_pq
, dma_srcs
,
479 unmap_src(dev
->dev
, dma_srcs
, len
, src_cnt
);
480 unmap_dst(dev
->dev
, dma_dsts
, params
->buf_size
,
482 pr_warning("%s: #%u: prep error with src_off=0x%x "
483 "dst_off=0x%x len=0x%x\n",
484 thread_name
, total_tests
- 1,
485 src_off
, dst_off
, len
);
492 tx
->callback
= dmatest_callback
;
493 tx
->callback_param
= &done
;
494 cookie
= tx
->tx_submit(tx
);
496 if (dma_submit_error(cookie
)) {
497 pr_warning("%s: #%u: submit error %d with src_off=0x%x "
498 "dst_off=0x%x len=0x%x\n",
499 thread_name
, total_tests
- 1, cookie
,
500 src_off
, dst_off
, len
);
505 dma_async_issue_pending(chan
);
507 wait_event_freezable_timeout(done_wait
,
508 done
.done
|| kthread_should_stop(),
509 msecs_to_jiffies(params
->timeout
));
511 status
= dma_async_is_tx_complete(chan
, cookie
, NULL
, NULL
);
515 * We're leaving the timed out dma operation with
516 * dangling pointer to done_wait. To make this
517 * correct, we'll need to allocate wait_done for
518 * each test iteration and perform "who's gonna
519 * free it this time?" dancing. For now, just
522 pr_warning("%s: #%u: test timed out\n",
523 thread_name
, total_tests
- 1);
526 } else if (status
!= DMA_SUCCESS
) {
527 pr_warning("%s: #%u: got completion callback,"
528 " but status is \'%s\'\n",
529 thread_name
, total_tests
- 1,
530 status
== DMA_ERROR
? "error" : "in progress");
535 /* Unmap by myself (see DMA_COMPL_SKIP_DEST_UNMAP above) */
536 unmap_dst(dev
->dev
, dma_dsts
, params
->buf_size
, dst_cnt
);
540 pr_debug("%s: verifying source buffer...\n", thread_name
);
541 error_count
+= dmatest_verify(thread
->srcs
, 0, src_off
,
542 0, PATTERN_SRC
, true);
543 error_count
+= dmatest_verify(thread
->srcs
, src_off
,
544 src_off
+ len
, src_off
,
545 PATTERN_SRC
| PATTERN_COPY
, true);
546 error_count
+= dmatest_verify(thread
->srcs
, src_off
+ len
,
547 params
->buf_size
, src_off
+ len
,
550 pr_debug("%s: verifying dest buffer...\n",
552 error_count
+= dmatest_verify(thread
->dsts
, 0, dst_off
,
553 0, PATTERN_DST
, false);
554 error_count
+= dmatest_verify(thread
->dsts
, dst_off
,
555 dst_off
+ len
, src_off
,
556 PATTERN_SRC
| PATTERN_COPY
, false);
557 error_count
+= dmatest_verify(thread
->dsts
, dst_off
+ len
,
558 params
->buf_size
, dst_off
+ len
,
562 pr_warning("%s: #%u: %u errors with "
563 "src_off=0x%x dst_off=0x%x len=0x%x\n",
564 thread_name
, total_tests
- 1, error_count
,
565 src_off
, dst_off
, len
);
568 pr_debug("%s: #%u: No errors with "
569 "src_off=0x%x dst_off=0x%x len=0x%x\n",
570 thread_name
, total_tests
- 1,
571 src_off
, dst_off
, len
);
576 for (i
= 0; thread
->dsts
[i
]; i
++)
577 kfree(thread
->dsts
[i
]);
581 for (i
= 0; thread
->srcs
[i
]; i
++)
582 kfree(thread
->srcs
[i
]);
588 pr_notice("%s: terminating after %u tests, %u failures (status %d)\n",
589 thread_name
, total_tests
, failed_tests
, ret
);
591 /* terminate all transfers on specified channels */
593 dmaengine_terminate_all(chan
);
595 if (params
->iterations
> 0)
596 while (!kthread_should_stop()) {
597 DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wait_dmatest_exit
);
598 interruptible_sleep_on(&wait_dmatest_exit
);
604 static void dmatest_cleanup_channel(struct dmatest_chan
*dtc
)
606 struct dmatest_thread
*thread
;
607 struct dmatest_thread
*_thread
;
610 list_for_each_entry_safe(thread
, _thread
, &dtc
->threads
, node
) {
611 ret
= kthread_stop(thread
->task
);
612 pr_debug("dmatest: thread %s exited with status %d\n",
613 thread
->task
->comm
, ret
);
614 list_del(&thread
->node
);
618 /* terminate all transfers on specified channels */
619 dmaengine_terminate_all(dtc
->chan
);
624 static int dmatest_add_threads(struct dmatest_info
*info
,
625 struct dmatest_chan
*dtc
, enum dma_transaction_type type
)
627 struct dmatest_params
*params
= &info
->params
;
628 struct dmatest_thread
*thread
;
629 struct dma_chan
*chan
= dtc
->chan
;
633 if (type
== DMA_MEMCPY
)
635 else if (type
== DMA_XOR
)
637 else if (type
== DMA_PQ
)
642 for (i
= 0; i
< params
->threads_per_chan
; i
++) {
643 thread
= kzalloc(sizeof(struct dmatest_thread
), GFP_KERNEL
);
645 pr_warning("dmatest: No memory for %s-%s%u\n",
646 dma_chan_name(chan
), op
, i
);
651 thread
->chan
= dtc
->chan
;
654 thread
->task
= kthread_run(dmatest_func
, thread
, "%s-%s%u",
655 dma_chan_name(chan
), op
, i
);
656 if (IS_ERR(thread
->task
)) {
657 pr_warning("dmatest: Failed to run thread %s-%s%u\n",
658 dma_chan_name(chan
), op
, i
);
663 /* srcbuf and dstbuf are allocated by the thread itself */
665 list_add_tail(&thread
->node
, &dtc
->threads
);
671 static int dmatest_add_channel(struct dmatest_info
*info
,
672 struct dma_chan
*chan
)
674 struct dmatest_chan
*dtc
;
675 struct dma_device
*dma_dev
= chan
->device
;
676 unsigned int thread_count
= 0;
679 dtc
= kmalloc(sizeof(struct dmatest_chan
), GFP_KERNEL
);
681 pr_warning("dmatest: No memory for %s\n", dma_chan_name(chan
));
686 INIT_LIST_HEAD(&dtc
->threads
);
688 if (dma_has_cap(DMA_MEMCPY
, dma_dev
->cap_mask
)) {
689 cnt
= dmatest_add_threads(info
, dtc
, DMA_MEMCPY
);
690 thread_count
+= cnt
> 0 ? cnt
: 0;
692 if (dma_has_cap(DMA_XOR
, dma_dev
->cap_mask
)) {
693 cnt
= dmatest_add_threads(info
, dtc
, DMA_XOR
);
694 thread_count
+= cnt
> 0 ? cnt
: 0;
696 if (dma_has_cap(DMA_PQ
, dma_dev
->cap_mask
)) {
697 cnt
= dmatest_add_threads(info
, dtc
, DMA_PQ
);
698 thread_count
+= cnt
> 0 ? cnt
: 0;
701 pr_info("dmatest: Started %u threads using %s\n",
702 thread_count
, dma_chan_name(chan
));
704 list_add_tail(&dtc
->node
, &info
->channels
);
710 static bool filter(struct dma_chan
*chan
, void *param
)
712 struct dmatest_params
*params
= param
;
714 if (!dmatest_match_channel(params
, chan
) ||
715 !dmatest_match_device(params
, chan
->device
))
721 static int run_threaded_test(struct dmatest_info
*info
)
724 struct dma_chan
*chan
;
725 struct dmatest_params
*params
= &info
->params
;
729 dma_cap_set(DMA_MEMCPY
, mask
);
731 chan
= dma_request_channel(mask
, filter
, params
);
733 err
= dmatest_add_channel(info
, chan
);
735 dma_release_channel(chan
);
736 break; /* add_channel failed, punt */
739 break; /* no more channels available */
740 if (params
->max_channels
&&
741 info
->nr_channels
>= params
->max_channels
)
742 break; /* we have all we need */
747 static void stop_threaded_test(struct dmatest_info
*info
)
749 struct dmatest_chan
*dtc
, *_dtc
;
750 struct dma_chan
*chan
;
752 list_for_each_entry_safe(dtc
, _dtc
, &info
->channels
, node
) {
753 list_del(&dtc
->node
);
755 dmatest_cleanup_channel(dtc
);
756 pr_debug("dmatest: dropped channel %s\n", dma_chan_name(chan
));
757 dma_release_channel(chan
);
760 info
->nr_channels
= 0;
763 static int __init
dmatest_init(void)
765 struct dmatest_info
*info
= &test_info
;
766 struct dmatest_params
*params
= &info
->params
;
768 memset(info
, 0, sizeof(*info
));
770 INIT_LIST_HEAD(&info
->channels
);
772 /* Set default parameters */
773 params
->buf_size
= test_buf_size
;
774 strlcpy(params
->channel
, test_channel
, sizeof(params
->channel
));
775 strlcpy(params
->device
, test_device
, sizeof(params
->device
));
776 params
->threads_per_chan
= threads_per_chan
;
777 params
->max_channels
= max_channels
;
778 params
->iterations
= iterations
;
779 params
->xor_sources
= xor_sources
;
780 params
->pq_sources
= pq_sources
;
781 params
->timeout
= timeout
;
783 return run_threaded_test(info
);
785 /* when compiled-in wait for drivers to load first */
786 late_initcall(dmatest_init
);
788 static void __exit
dmatest_exit(void)
790 struct dmatest_info
*info
= &test_info
;
792 stop_threaded_test(info
);
794 module_exit(dmatest_exit
);
796 MODULE_AUTHOR("Haavard Skinnemoen (Atmel)");
797 MODULE_LICENSE("GPL v2");