From patchwork Tue Apr 25 08:25:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gilad Ben-Yossef X-Patchwork-Id: 98181 Delivered-To: patch@linaro.org Received: by 10.140.109.52 with SMTP id k49csp1839955qgf; Tue, 25 Apr 2017 01:25:52 -0700 (PDT) X-Received: by 10.98.200.24 with SMTP id z24mr28212481pff.235.1493108752632; Tue, 25 Apr 2017 01:25:52 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i25si21557170pfk.375.2017.04.25.01.25.52; Tue, 25 Apr 2017 01:25:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-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-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1176500AbdDYIZu (ORCPT + 1 other); Tue, 25 Apr 2017 04:25:50 -0400 Received: from foss.arm.com ([217.140.101.70]:37598 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1176026AbdDYIZt (ORCPT ); Tue, 25 Apr 2017 04:25:49 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id EF34D15A2; Tue, 25 Apr 2017 01:25:48 -0700 (PDT) Received: from gby.kfn.arm.com (unknown [10.45.48.182]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 64FEE3F3E1; Tue, 25 Apr 2017 01:25:47 -0700 (PDT) From: Gilad Ben-Yossef To: Herbert Xu , "David S. Miller" Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, gilad.benyossef@arm.com, Ofir Drang Subject: [PATCH] crypto: tcrypt: don't disable irqs and wait Date: Tue, 25 Apr 2017 11:25:40 +0300 Message-Id: <1493108740-1642-1-git-send-email-gilad@benyossef.com> X-Mailer: git-send-email 2.1.4 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org The tcrypt AEAD cycles speed tests disables irqs during the test, which is broken at the very least since commit '1425d2d17f7309c6 ("crypto: tcrypt - Fix AEAD speed tests")' adds a wait for completion as part of the test and probably since switching to the new AEAD API. While the result of taking a cycle count diff may not mean much on SMP systems if the task migrates, it's good enough for tcrypt being the quick & dirty dev tool it is. It's also what all the other (i.e. hash) cycle speed tests do. Signed-off-by: Gilad Ben-Yossef Reported-by: Ofir Drang --- crypto/tcrypt.c | 4 ---- 1 file changed, 4 deletions(-) -- 2.1.4 Reviewed-by: Horia Geantă diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index 9a11f3c..0dd6a43 100644 --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c @@ -138,8 +138,6 @@ static int test_aead_cycles(struct aead_request *req, int enc, int blen) int ret = 0; int i; - local_irq_disable(); - /* Warm-up run. */ for (i = 0; i < 4; i++) { if (enc) @@ -169,8 +167,6 @@ static int test_aead_cycles(struct aead_request *req, int enc, int blen) } out: - local_irq_enable(); - if (ret == 0) printk("1 operation in %lu cycles (%d bytes)\n", (cycles + 4) / 8, blen);