Received: by 10.223.176.5 with SMTP id f5csp533143wra; Fri, 2 Feb 2018 01:52:17 -0800 (PST) X-Google-Smtp-Source: AH8x2251y66o4HiuEwtz9UPat+uQcr4XeFGDrL8/22CEc8vDEA2WmiswTwDun5+IQLuwdNOt0oXH X-Received: by 2002:a17:902:1746:: with SMTP id i64-v6mr33370710pli.53.1517565137221; Fri, 02 Feb 2018 01:52:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517565137; cv=none; d=google.com; s=arc-20160816; b=UnylAN5zaTSkrN7VXtqj1ZLTWqWvGwCNOjb+QiOB/ja9XT1eNtDRP7TYxUPYzm4l4a fC710acp/Er92hv5ek/ehqekyN769GqVPOcnwJf2ARNpK3GE2+ThZbvpJ/iU6MfaBu9F FvKDA9uc+feAZ9mrxN2gJzGQtT0Tcw9L1Tp5Gmfr20l3icQ8DPbRwcdhNDseQlQ/CuOk UbZG+2/Ukithw5jlK7afRmqyHGePU609Fn4Dljpm9OvsS1sQZF9dKHzF4ZAI/RBT5Erb 9kzcAGXbu4undut6voT1nlYLyJeq4b5oZ0ryDJr7xj6+zZjXpu/P0QnU/0S1Eh6C2euR rMsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=o9FmT/DrtJHSFjAnMpbX1q/XdDAmIBp1GDrApjfFm8k=; b=cYbw4NMOeE3iqt5Bw4yMMLAQxgHxC7YWEKDx0/NVtYTasohnrTAF9FWW216xisUNTE bypYgTYjWAXZAweS/0cerblafE+k2xM8KnmA2eyywkL7kBgIvaL27yUr1JGZDbhN9FCY 9D11DCKl1kuuBNWcwkuk/XbRfzw8xsQ3z9IMMadlsT2qGVOyGSpLGIu78bPdgii7nO18 e/0BKlKpi2AxVcX20ZYAEqJCTtCZArMBohTFbS3gBbweHZP1LHDHe2gnx+mRDx8SrNWI bHSEiLIW8TSZw2xIPi3POyy6xmTpcJB/brUsob8iaPz2U3AUIns6rbzxoa29tWQEOKib UDkw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d13-v6si1475744pln.747.2018.02.02.01.52.02; Fri, 02 Feb 2018 01:52:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751669AbeBBJve (ORCPT + 99 others); Fri, 2 Feb 2018 04:51:34 -0500 Received: from mx01.hxt-semitech.com.96.203.223.in-addr.arpa ([223.203.96.7]:57978 "EHLO barracuda.hxt-semitech.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751017AbeBBJv2 (ORCPT ); Fri, 2 Feb 2018 04:51:28 -0500 X-ASG-Debug-ID: 1517565084-093b7e4cf100210001-xx1T2L Received: from HXTBJIDCEMVIW01.hxtcorp.net (localhost [10.128.0.14]) by barracuda.hxt-semitech.com with ESMTP id Hhlr00jqOiXk0RF4 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 02 Feb 2018 17:51:24 +0800 (CST) X-Barracuda-Envelope-From: shunyong.yang@hxt-semitech.com Received: from y.localdomain (10.5.21.109) by HXTBJIDCEMVIW01.hxtcorp.net (10.128.0.14) with Microsoft SMTP Server (TLS) id 15.0.847.32; Fri, 2 Feb 2018 17:51:34 +0800 From: Yang Shunyong To: CC: , , , Yang Shunyong , Joey Zheng Subject: [PATCH v3] dmaengine: dmatest: add norandom option Date: Fri, 2 Feb 2018 17:51:09 +0800 X-ASG-Orig-Subj: [PATCH v3] dmaengine: dmatest: add norandom option Message-ID: <1517565069-19769-1-git-send-email-shunyong.yang@hxt-semitech.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.5.21.109] X-ClientProxiedBy: HXTBJIDCEMVIW01.hxtcorp.net (10.128.0.14) To HXTBJIDCEMVIW01.hxtcorp.net (10.128.0.14) X-Barracuda-Connect: localhost[10.128.0.14] X-Barracuda-Start-Time: 1517565084 X-Barracuda-Encrypted: ECDHE-RSA-AES256-SHA X-Barracuda-URL: https://192.168.50.101:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at hxt-semitech.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Bayes: INNOCENT GLOBAL 0.5114 1.0000 0.7500 X-Barracuda-Spam-Score: 0.75 X-Barracuda-Spam-Status: No, SCORE=0.75 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.47508 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Existing option noverify disables both random src/dst address offset setup and data verification. Sometimes, we need to control random src/dst address setup and verification separately, such as disabling random to make sure that test covers addresses in all interleaving banks, but data verification is still performed. This patch adds option norandom to disable random offset setup. Option noverify has been changed to disable data verification only. Cc: Joey Zheng Signed-off-by: Yang Shunyong --- v3: new patch should be octal permissions. v2: change to symbolic permissions. --- drivers/dma/dmatest.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c index 80cc2be6483c..b9339524d5bd 100644 --- a/drivers/dma/dmatest.c +++ b/drivers/dma/dmatest.c @@ -74,7 +74,11 @@ static bool noverify; module_param(noverify, bool, S_IRUGO | S_IWUSR); -MODULE_PARM_DESC(noverify, "Disable random data setup and verification"); +MODULE_PARM_DESC(noverify, "Disable data verification (default: verify)"); + +static bool norandom; +module_param(norandom, bool, 0644); +MODULE_PARM_DESC(norandom, "Disable random offset setup (default: random)"); static bool verbose; module_param(verbose, bool, S_IRUGO | S_IWUSR); @@ -103,6 +107,7 @@ struct dmatest_params { unsigned int pq_sources; int timeout; bool noverify; + bool norandom; }; /** @@ -575,7 +580,7 @@ static int dmatest_func(void *data) break; } - if (params->noverify) + if (params->norandom) len = params->buf_size; else len = dmatest_random() % params->buf_size + 1; @@ -586,17 +591,19 @@ static int dmatest_func(void *data) total_len += len; - if (params->noverify) { + if (params->norandom) { src_off = 0; dst_off = 0; } else { - start = ktime_get(); src_off = dmatest_random() % (params->buf_size - len + 1); dst_off = dmatest_random() % (params->buf_size - len + 1); src_off = (src_off >> align) << align; dst_off = (dst_off >> align) << align; + } + if (!params->noverify) { + start = ktime_get(); dmatest_init_srcs(thread->srcs, src_off, len, params->buf_size, is_memset); dmatest_init_dsts(thread->dsts, dst_off, len, @@ -975,6 +982,7 @@ static void run_threaded_test(struct dmatest_info *info) params->pq_sources = pq_sources; params->timeout = timeout; params->noverify = noverify; + params->norandom = norandom; request_channels(info, DMA_MEMCPY); request_channels(info, DMA_MEMSET); -- 1.8.3.1