From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45A87C4360F for ; Wed, 13 Mar 2019 05:15:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0B42721874 for ; Wed, 13 Mar 2019 05:15:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1552454139; bh=4bywO5eXatDKtqu/5HOPPSncChimudaqktyjzb5khMw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=feZqx8GYxCynhH/kQfU+vFO+tPX1A1//yacjyJHH6xuPUcfyDn00ZmPCycTiM114a S96z7hMG+8Rcu9vpGQXkAFYV9k1R1b7YEaq7Hfe6oTQX9LdHJZNDUseNRZ+CuFZ5Sj J0Rcco4z7g4a1clhi9KNQd+D2BMl4i5Lm1TYvS+s= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726097AbfCMFPh (ORCPT ); Wed, 13 Mar 2019 01:15:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:50246 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726183AbfCMFPh (ORCPT ); Wed, 13 Mar 2019 01:15:37 -0400 Received: from sol.localdomain (c-107-3-167-184.hsd1.ca.comcast.net [107.3.167.184]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 507CA21873; Wed, 13 Mar 2019 05:15:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1552454136; bh=4bywO5eXatDKtqu/5HOPPSncChimudaqktyjzb5khMw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N0zxmAGwjT8/V73gaaM6KiCK2jKkZT1H2hb4gzX5eR48O5om3ACRG9czPRIBn9HV8 7c+8IWunmG9rxx0HE/Y57qpOjEXgKyN68VTE+S+WNv6+GhpEG8iwrIHKjdAahExyz4 4YbVEVI9xvftGjW6FgaTr4RFs2BJ49XYByBWPtks= From: Eric Biggers To: linux-crypto@vger.kernel.org, Herbert Xu Cc: Ard Biesheuvel , linux-arm-kernel@lists.infradead.org, x86@kernel.org Subject: [PATCH 7/8] crypto: simd - convert to use crypto_simd_usable() Date: Tue, 12 Mar 2019 22:12:51 -0700 Message-Id: <20190313051252.2917-8-ebiggers@kernel.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190313051252.2917-1-ebiggers@kernel.org> References: <20190313051252.2917-1-ebiggers@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org From: Eric Biggers Replace all calls to may_use_simd() in the shared SIMD helpers with crypto_simd_usable(), in order to allow testing the no-SIMD code paths. Signed-off-by: Eric Biggers --- crypto/simd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crypto/simd.c b/crypto/simd.c index 7d62686d3a3f..3e3b1d1a6b1f 100644 --- a/crypto/simd.c +++ b/crypto/simd.c @@ -85,7 +85,7 @@ static int simd_skcipher_encrypt(struct skcipher_request *req) subreq = skcipher_request_ctx(req); *subreq = *req; - if (!may_use_simd() || + if (!crypto_simd_usable() || (in_atomic() && cryptd_skcipher_queued(ctx->cryptd_tfm))) child = &ctx->cryptd_tfm->base; else @@ -106,7 +106,7 @@ static int simd_skcipher_decrypt(struct skcipher_request *req) subreq = skcipher_request_ctx(req); *subreq = *req; - if (!may_use_simd() || + if (!crypto_simd_usable() || (in_atomic() && cryptd_skcipher_queued(ctx->cryptd_tfm))) child = &ctx->cryptd_tfm->base; else @@ -336,7 +336,7 @@ static int simd_aead_encrypt(struct aead_request *req) subreq = aead_request_ctx(req); *subreq = *req; - if (!may_use_simd() || + if (!crypto_simd_usable() || (in_atomic() && cryptd_aead_queued(ctx->cryptd_tfm))) child = &ctx->cryptd_tfm->base; else @@ -357,7 +357,7 @@ static int simd_aead_decrypt(struct aead_request *req) subreq = aead_request_ctx(req); *subreq = *req; - if (!may_use_simd() || + if (!crypto_simd_usable() || (in_atomic() && cryptd_aead_queued(ctx->cryptd_tfm))) child = &ctx->cryptd_tfm->base; else -- 2.21.0 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 13DF8C43381 for ; Wed, 13 Mar 2019 10:16:02 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D0C432087C for ; Wed, 13 Mar 2019 10:16:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Opy++G6q"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="PgNV/4ZL"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="N0zxmAGw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D0C432087C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=aDAoWgkoZN5ctQ18Plj8sae7MvAuYQPOZauvKrHpW9o=; b=Opy++G6qio64wv dFvKnQIuDKNAuTFwBBewc7mDlx+7N9RUJTlxQChA7AZApdfS3Pqc/ZOhKPcst09O9ysTp0uCMSDxA rniPhpLgyOVTigCsFKDchbP8vmy4PxoQpn9/FDr6IEZ5WBy9+yQzsV5XvGfZfHH4dmvi9BqtHt5vg p7twsJRgcb5qNSKNKxu04Zv/TMELqvjdlIkU5+3kOhEIInPZD1HOpKPbjmOhRlwwRtT/UBkeY1P0p 29uhWQZDpeLT+mouE5sBb7OM/KbX4dcahz2QyO5noUdcYFFgvaav54RKygjmcchKVoRLp6ooTG3gx ++sA991xHd7X5PXI7N4g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1h40vQ-0001mn-2K; Wed, 13 Mar 2019 10:15:52 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h40q2-0000Sq-6U for linux-arm-kernel@bombadil.infradead.org; Wed, 13 Mar 2019 10:10:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=shinWE/HUscaGkANaQ0RMyvYZyS/kjl6mWK9A/5GiKI=; b=PgNV/4ZLC6zE2T9TJcgeP2Vxkc RTgJUoacTLMsSmFbQKDQ6dhBWQNsN5tChM80Kl5ex7NtfJlt4lzeEyMFHWiuNDA51s8m8/Sf2sf5C PuJgWmevHAwCi5m6Sfhv+Kp0ih6eo4i5qp+mBUzkRp/mhCdqwHGsxB9V/wLPCFddtgbl8+xGWqmyP FfSzietgO+ERNir4QtHQn6HtjVccpX5M6XSOsYZdiwQ91sAtAc8tv5RfZl+pklI6mSKx6gZjloe03 r63XIycwVAVEYlo0CfwXZq0koz1JnMgJL3zPY6A+IhvkM+Geq0B5QFRD9cz4toWofBHYd7IuWqG0O mSt43rrw==; Received: from mail.kernel.org ([198.145.29.99]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1h3wFM-00025p-KT for linux-arm-kernel@lists.infradead.org; Wed, 13 Mar 2019 05:16:10 +0000 Received: from sol.localdomain (c-107-3-167-184.hsd1.ca.comcast.net [107.3.167.184]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 507CA21873; Wed, 13 Mar 2019 05:15:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1552454136; bh=4bywO5eXatDKtqu/5HOPPSncChimudaqktyjzb5khMw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N0zxmAGwjT8/V73gaaM6KiCK2jKkZT1H2hb4gzX5eR48O5om3ACRG9czPRIBn9HV8 7c+8IWunmG9rxx0HE/Y57qpOjEXgKyN68VTE+S+WNv6+GhpEG8iwrIHKjdAahExyz4 4YbVEVI9xvftGjW6FgaTr4RFs2BJ49XYByBWPtks= From: Eric Biggers To: linux-crypto@vger.kernel.org, Herbert Xu Subject: [PATCH 7/8] crypto: simd - convert to use crypto_simd_usable() Date: Tue, 12 Mar 2019 22:12:51 -0700 Message-Id: <20190313051252.2917-8-ebiggers@kernel.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190313051252.2917-1-ebiggers@kernel.org> References: <20190313051252.2917-1-ebiggers@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190313_051608_841169_3ADBA7D8 X-CRM114-Status: GOOD ( 11.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: x86@kernel.org, linux-arm-kernel@lists.infradead.org, Ard Biesheuvel Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Eric Biggers Replace all calls to may_use_simd() in the shared SIMD helpers with crypto_simd_usable(), in order to allow testing the no-SIMD code paths. Signed-off-by: Eric Biggers --- crypto/simd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crypto/simd.c b/crypto/simd.c index 7d62686d3a3f..3e3b1d1a6b1f 100644 --- a/crypto/simd.c +++ b/crypto/simd.c @@ -85,7 +85,7 @@ static int simd_skcipher_encrypt(struct skcipher_request *req) subreq = skcipher_request_ctx(req); *subreq = *req; - if (!may_use_simd() || + if (!crypto_simd_usable() || (in_atomic() && cryptd_skcipher_queued(ctx->cryptd_tfm))) child = &ctx->cryptd_tfm->base; else @@ -106,7 +106,7 @@ static int simd_skcipher_decrypt(struct skcipher_request *req) subreq = skcipher_request_ctx(req); *subreq = *req; - if (!may_use_simd() || + if (!crypto_simd_usable() || (in_atomic() && cryptd_skcipher_queued(ctx->cryptd_tfm))) child = &ctx->cryptd_tfm->base; else @@ -336,7 +336,7 @@ static int simd_aead_encrypt(struct aead_request *req) subreq = aead_request_ctx(req); *subreq = *req; - if (!may_use_simd() || + if (!crypto_simd_usable() || (in_atomic() && cryptd_aead_queued(ctx->cryptd_tfm))) child = &ctx->cryptd_tfm->base; else @@ -357,7 +357,7 @@ static int simd_aead_decrypt(struct aead_request *req) subreq = aead_request_ctx(req); *subreq = *req; - if (!may_use_simd() || + if (!crypto_simd_usable() || (in_atomic() && cryptd_aead_queued(ctx->cryptd_tfm))) child = &ctx->cryptd_tfm->base; else -- 2.21.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel