The following command should return actual state of the test.
% cat /sys/kernel/debug/dmatest/run
To wait for test done the user may perform a busy loop that checks the state.
% while [ $(cat /sys/kernel/debug/dmatest/run) = "Y" ]
> do
> echo -n "."
> sleep 1
> done
> echo
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Note that running a new test will stop any in progress test.
Note that running a new test will stop any in progress test.
+The following command should return actual state of the test.
+ % cat /sys/kernel/debug/dmatest/run
+
+To wait for test done the user may perform a busy loop that checks the state.
+
+ % while [ $(cat /sys/kernel/debug/dmatest/run) = "Y" ]
+ > do
+ > echo -n "."
+ > sleep 1
+ > done
+ > echo
+
Part 3 - When built-in in the kernel...
The module parameters that is supplied to the kernel command line will be used
Part 3 - When built-in in the kernel...
The module parameters that is supplied to the kernel command line will be used
u8 **srcs;
u8 **dsts;
enum dma_transaction_type type;
u8 **srcs;
u8 **dsts;
enum dma_transaction_type type;
if (ret)
dmaengine_terminate_all(chan);
if (ret)
dmaengine_terminate_all(chan);
if (params->iterations > 0)
while (!kthread_should_stop()) {
DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wait_dmatest_exit);
if (params->iterations > 0)
while (!kthread_should_stop()) {
DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wait_dmatest_exit);
{
struct dmatest_info *info = file->private_data;
char buf[3];
{
struct dmatest_info *info = file->private_data;
char buf[3];
+ struct dmatest_chan *dtc;
+ bool alive = false;
+ list_for_each_entry(dtc, &info->channels, node) {
+ struct dmatest_thread *thread;
+
+ list_for_each_entry(thread, &dtc->threads, node) {
+ if (!thread->done) {
+ alive = true;
+ break;
+ }
+ }
+ }
+
+ if (alive) {
+ } else {
+ __stop_threaded_test(info);
mutex_unlock(&info->lock);
buf[1] = '\n';
buf[2] = 0x00;
mutex_unlock(&info->lock);
buf[1] = '\n';
buf[2] = 0x00;