From patchwork Tue Feb 20 07:48:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Biggers X-Patchwork-Id: 10229533 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6FE1860392 for ; Tue, 20 Feb 2018 07:52:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 584432852B for ; Tue, 20 Feb 2018 07:52:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4CCC12852D; Tue, 20 Feb 2018 07:52:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C5DA82852B for ; Tue, 20 Feb 2018 07:52:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751360AbeBTHwD (ORCPT ); Tue, 20 Feb 2018 02:52:03 -0500 Received: from mail-pl0-f67.google.com ([209.85.160.67]:38378 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751381AbeBTHvz (ORCPT ); Tue, 20 Feb 2018 02:51:55 -0500 Received: by mail-pl0-f67.google.com with SMTP id d4so770299pll.5 for ; Mon, 19 Feb 2018 23:51:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=6q/i2OVsQrLGazQRx8lP7nWjn9M0ogJHgbRnal+O+ps=; b=JRrigILBHLTL/iW5Uk/03n4sqQT3dByZ4A9h2+cw9lbb4Jpcg3yX9d8CDETPbbw3vB bR3noQmjICxxdGF60qvSvatJCdKVXmLNsO87epCp5CDvgBKXGrYaRRLj5jhGsaH/NkTI GI+X1hrlN2N0Qeuy5/Kj1/Z+wxCXGuh0WaRaV8tKE9mfNWQsPojIwbdmNwEgwfSRQMGs jKXJXePuDVzI3IRBxk3wIKErzpmPgfeHm4kUvBBgR4yCzQzv6TsT0XtltmxtYlcMavRV Zjkwq0VZs24F3F3RH0Z6fjGkGmvHH7lLMmCp7ad4yeuheJpiW4r24HpW2Sz5a8NC6GK/ af1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=6q/i2OVsQrLGazQRx8lP7nWjn9M0ogJHgbRnal+O+ps=; b=s52icaiCri1Z9y07kDAbTBGQas7SkjShqfD7Oid9RRgavUIj5oDVgPud5szJVf3m7B lcs9uECSUeK7ZAsbX0cav8N4sN4kl8PBDYTB5QKm8/+lcKC2vIjAigp5Yi+H5xas9DGY e+wYEKvLdAe4qAo0PuIBcf0RxNaRPH4SNAaOa6NdhVqSqNCrZwL8hvsnlNmhSzxgMxen SYZkvxxZ6LWYJvqU22scJNj1ewSspzTpOo4R9Zv3+ch6iHxkA3yz6Bq8wuTSPe96T8/f JgDjGA3LeErefrftK60y1HAzc5cCR8PQ1itBXK2brrrGYjF9QANeJLnOM507gDIlO/6v cb7A== X-Gm-Message-State: APf1xPABIjOSvxaJCY8pdNq3FSkKpk6ItJHIYJ7UJpDg+KGHf1G5IANV wjqt2lvOrY2PYy072EU1t3B5IKSG X-Google-Smtp-Source: AH8x227qnJ8FMpTahdJ73/6MOzWZ15AWeRlbe+gDbOVrPpvpDW1S3DjRnQAOvF8hc1scIGp8Mcy3MQ== X-Received: by 2002:a17:902:26:: with SMTP id 35-v6mr16837632pla.42.1519113114298; Mon, 19 Feb 2018 23:51:54 -0800 (PST) Received: from zzz.localdomain (c-67-185-97-198.hsd1.wa.comcast.net. [67.185.97.198]) by smtp.gmail.com with ESMTPSA id z17sm16412772pfh.183.2018.02.19.23.51.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Feb 2018 23:51:53 -0800 (PST) From: Eric Biggers To: linux-crypto@vger.kernel.org Cc: Herbert Xu , Jussi Kivilinna , Eric Biggers Subject: [PATCH 29/30] crypto: x86/glue_helper - rename glue_skwalk_fpu_begin() Date: Mon, 19 Feb 2018 23:48:27 -0800 Message-Id: <20180220074828.2050-30-ebiggers3@gmail.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180220074828.2050-1-ebiggers3@gmail.com> References: <20180220074828.2050-1-ebiggers3@gmail.com> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Eric Biggers There are no users of the original glue_fpu_begin() anymore, so rename glue_skwalk_fpu_begin() to glue_fpu_begin() so that it matches glue_fpu_end() again. Signed-off-by: Eric Biggers --- arch/x86/crypto/cast5_avx_glue.c | 4 ++-- arch/x86/crypto/glue_helper.c | 21 +++++++++------------ arch/x86/include/asm/crypto/glue_helper.h | 7 +++---- 3 files changed, 14 insertions(+), 18 deletions(-) diff --git a/arch/x86/crypto/cast5_avx_glue.c b/arch/x86/crypto/cast5_avx_glue.c index 56f2a1b0ccf57..41034745d6a2a 100644 --- a/arch/x86/crypto/cast5_avx_glue.c +++ b/arch/x86/crypto/cast5_avx_glue.c @@ -50,8 +50,8 @@ static int cast5_setkey_skcipher(struct crypto_skcipher *tfm, const u8 *key, static inline bool cast5_fpu_begin(bool fpu_enabled, struct skcipher_walk *walk, unsigned int nbytes) { - return glue_skwalk_fpu_begin(CAST5_BLOCK_SIZE, CAST5_PARALLEL_BLOCKS, - walk, fpu_enabled, nbytes); + return glue_fpu_begin(CAST5_BLOCK_SIZE, CAST5_PARALLEL_BLOCKS, + walk, fpu_enabled, nbytes); } static inline void cast5_fpu_end(bool fpu_enabled) diff --git a/arch/x86/crypto/glue_helper.c b/arch/x86/crypto/glue_helper.c index fab5fa1aed77f..a78ef99a9981b 100644 --- a/arch/x86/crypto/glue_helper.c +++ b/arch/x86/crypto/glue_helper.c @@ -50,9 +50,8 @@ int glue_ecb_req_128bit(const struct common_glue_ctx *gctx, unsigned int func_bytes; unsigned int i; - fpu_enabled = glue_skwalk_fpu_begin(bsize, - gctx->fpu_blocks_limit, - &walk, fpu_enabled, nbytes); + fpu_enabled = glue_fpu_begin(bsize, gctx->fpu_blocks_limit, + &walk, fpu_enabled, nbytes); for (i = 0; i < gctx->num_funcs; i++) { func_bytes = bsize * gctx->funcs[i].num_blocks; @@ -129,9 +128,8 @@ int glue_cbc_decrypt_req_128bit(const struct common_glue_ctx *gctx, unsigned int i; u128 last_iv; - fpu_enabled = glue_skwalk_fpu_begin(bsize, - gctx->fpu_blocks_limit, - &walk, fpu_enabled, nbytes); + fpu_enabled = glue_fpu_begin(bsize, gctx->fpu_blocks_limit, + &walk, fpu_enabled, nbytes); /* Start of the last block. */ src += nbytes / bsize - 1; dst += nbytes / bsize - 1; @@ -190,9 +188,8 @@ int glue_ctr_req_128bit(const struct common_glue_ctx *gctx, unsigned int i; le128 ctrblk; - fpu_enabled = glue_skwalk_fpu_begin(bsize, - gctx->fpu_blocks_limit, - &walk, fpu_enabled, nbytes); + fpu_enabled = glue_fpu_begin(bsize, gctx->fpu_blocks_limit, + &walk, fpu_enabled, nbytes); be128_to_le128(&ctrblk, (be128 *)walk.iv); @@ -291,9 +288,9 @@ int glue_xts_req_128bit(const struct common_glue_ctx *gctx, return err; /* set minimum length to bsize, for tweak_fn */ - fpu_enabled = glue_skwalk_fpu_begin(bsize, gctx->fpu_blocks_limit, - &walk, fpu_enabled, - nbytes < bsize ? bsize : nbytes); + fpu_enabled = glue_fpu_begin(bsize, gctx->fpu_blocks_limit, + &walk, fpu_enabled, + nbytes < bsize ? bsize : nbytes); /* calculate first value of T */ tweak_fn(tweak_ctx, walk.iv, walk.iv); diff --git a/arch/x86/include/asm/crypto/glue_helper.h b/arch/x86/include/asm/crypto/glue_helper.h index b925a6363b3ff..d1818634ae7ee 100644 --- a/arch/x86/include/asm/crypto/glue_helper.h +++ b/arch/x86/include/asm/crypto/glue_helper.h @@ -44,10 +44,9 @@ struct common_glue_ctx { struct common_glue_func_entry funcs[]; }; -static inline bool glue_skwalk_fpu_begin(unsigned int bsize, - int fpu_blocks_limit, - struct skcipher_walk *walk, - bool fpu_enabled, unsigned int nbytes) +static inline bool glue_fpu_begin(unsigned int bsize, int fpu_blocks_limit, + struct skcipher_walk *walk, + bool fpu_enabled, unsigned int nbytes) { if (likely(fpu_blocks_limit < 0)) return false;