From patchwork Tue Jul 17 17:09:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Biggers X-Patchwork-Id: 10530217 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 724E660247 for ; Tue, 17 Jul 2018 17:12:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 60EB22872A for ; Tue, 17 Jul 2018 17:12:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5389328D63; Tue, 17 Jul 2018 17:12:40 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, MAILING_LIST_MULTI, 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 00E2F2872A for ; Tue, 17 Jul 2018 17:12:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730185AbeGQRqO (ORCPT ); Tue, 17 Jul 2018 13:46:14 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:39139 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730172AbeGQRqN (ORCPT ); Tue, 17 Jul 2018 13:46:13 -0400 Received: by mail-pf0-f196.google.com with SMTP id j8-v6so819729pff.6 for ; Tue, 17 Jul 2018 10:12:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=+xJe9QAEMC6UVpCOVT4Btl1UdFArdRZZl9v1CyQs8YQ=; b=CpdMaS8f0FsFnag392YjWgoJfWdAXTZt68YoYIc47/8jKhhNU4gKoJ08IdgFFgumSM h918op8M0zAO1icwPRdpE/ZI8PZe3sZoR8ndQQqf0ddh1pSyOgjKP+e4UrLcdX00P3FW ZUYCRJ5umH8lIc2Qy9LMHbqIcVA5wUBzU/95IM2Hm32IE3pFN7+e724XngA69zflLYxj /yHalTvHl+c6KogX5voWbI3yU8XbwydgViG7SfgKSTKxIl6OcGHJ1qdmBtWk723QNaJ+ my9T/pL2nAlB1WhTIPFzncVjGkCY/DtNuNYHzxTceElUicU/DoBQv7O5QAi5JVhOacnU aeWg== 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; bh=+xJe9QAEMC6UVpCOVT4Btl1UdFArdRZZl9v1CyQs8YQ=; b=kzLOLYraEpEGMKBIb/0Ve/I+k9/SInqLBgLoSl7CMbfA9hgYq5l+kGFrwZUlohqivu gV7/mQf/fUtq4BR3vlUEWOvR+qN/viZckEMJc8ovlJ0i3gjVdaNIFeyFtiSfM/vX7RYC 2y7PVU0n7VkDaa5ZpDNEEpfTQLcaZvaWqALgLK7s+xyBqEtkn+6mN+KHHrmh0V/eOMhu XEFzCetYA2i8pgAHsWp2Yvf3lArdpsNxIfllNWD5NiCNcqgDxDuY3WEQhyQn+z3TY2pi 3+gsb2h9Ff/bJN/o3HDq/YhsovAaAVVvfsq9iWX1mor2cCQ1/Flo/AyvDfv7lXd/mvwJ f8Dg== X-Gm-Message-State: AOUpUlH0mxh69MAGgP6Mi7yri2IOV7s2PoYjTmyHL23IJj+9U0YF3etk 26YnsSuOE1lg1P9QmNH1Ve5F/cEz X-Google-Smtp-Source: AAOMgpfGVPjrq25iFJBVRKovNyZqxsSKEGgEMvJUgrwrI6GyTA1WimyiDUAUrGb9t1bdyCSYMI7kug== X-Received: by 2002:a62:3d41:: with SMTP id k62-v6mr1528697pfa.35.1531847556440; Tue, 17 Jul 2018 10:12:36 -0700 (PDT) Received: from ebiggers-linuxstation.kir.corp.google.com ([2620:15c:17:3:dc28:5c82:b905:e8a8]) by smtp.gmail.com with ESMTPSA id f5-v6sm2667674pgn.34.2018.07.17.10.12.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Jul 2018 10:12:35 -0700 (PDT) From: Eric Biggers To: linux-crypto@vger.kernel.org, Herbert Xu Cc: linux-arm-kernel@lists.infradead.org, Eric Biggers Subject: [PATCH] crypto: arm64/sha256 - increase cra_priority of scalar implementations Date: Tue, 17 Jul 2018 10:09:26 -0700 Message-Id: <20180717170926.90689-1-ebiggers3@gmail.com> X-Mailer: git-send-email 2.18.0.203.gfac676dfb9-goog 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 Commit b73b7ac0a774 ("crypto: sha256_generic - add cra_priority") gave sha256-generic and sha224-generic a cra_priority of 100, to match the convention for generic implementations. But sha256-arm64 and sha224-arm64 also have priority 100, so their order relative to the generic implementations became ambiguous. Therefore, increase their priority to 125 so that they have higher priority than the generic implementations but lower priority than the NEON implementations which have priority 150. Signed-off-by: Eric Biggers --- arch/arm64/crypto/sha256-glue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/crypto/sha256-glue.c b/arch/arm64/crypto/sha256-glue.c index f1b4f4420ca1..4aedeaefd61f 100644 --- a/arch/arm64/crypto/sha256-glue.c +++ b/arch/arm64/crypto/sha256-glue.c @@ -67,7 +67,7 @@ static struct shash_alg algs[] = { { .descsize = sizeof(struct sha256_state), .base.cra_name = "sha256", .base.cra_driver_name = "sha256-arm64", - .base.cra_priority = 100, + .base.cra_priority = 125, .base.cra_blocksize = SHA256_BLOCK_SIZE, .base.cra_module = THIS_MODULE, }, { @@ -79,7 +79,7 @@ static struct shash_alg algs[] = { { .descsize = sizeof(struct sha256_state), .base.cra_name = "sha224", .base.cra_driver_name = "sha224-arm64", - .base.cra_priority = 100, + .base.cra_priority = 125, .base.cra_blocksize = SHA224_BLOCK_SIZE, .base.cra_module = THIS_MODULE, } };