From patchwork Fri Sep 4 11:09:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Corentin LABBE X-Patchwork-Id: 11756723 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5F9721599 for ; Fri, 4 Sep 2020 11:13:42 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 372DC20684 for ; Fri, 4 Sep 2020 11:13:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="tf4jt0AV"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="OQ2AQpv0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 372DC20684 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id: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=RnIKCgPKxIlI9nQDC2AehTnkwgHmLKlTdP74Eg7h2AE=; b=tf4jt0AVDxeOG5QLaUBrzRdGa4 pNSGXCwTY336tlXVO16yDebyUjBPQekcscPBWMrmDWoTVgiHuFin3O9pBzw9Wr0gJfQ/PS3ExgH/k bFDR2VJ3F6RoXFH/gcRpC4EgQnLS4cugznZ0hZqZOo0fN2znYMNAUkyJo8p/HLCvLTWKWsQeJv+9s y62x4iidyGVM4g6bRMwk5SdTj+HSsYJ3XPhUV8aXTvIMeg1LLFoKbAo5u+9WEYVJ9dbCVvssqiVJn c44b/EZb4cXymQgYRtNxZ9eSR0HVcI9AAj3iZNWFLZwMOR6WLO2PLKs7uHJIy536SCQvZy4vJDQch oM2TK7Bw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kE9dB-0002Ow-59; Fri, 04 Sep 2020 11:11:45 +0000 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kE9bs-0001sD-N6 for linux-arm-kernel@lists.infradead.org; Fri, 04 Sep 2020 11:10:26 +0000 Received: by mail-wm1-x344.google.com with SMTP id o21so5725111wmc.0 for ; Fri, 04 Sep 2020 04:10:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=gSXaIPMXv2p2JdvokUaT0GeoWLMWWGeoBVt/sDwVK3w=; b=OQ2AQpv0aDDax25XCFXNkwjgsdSc8WwGSK4ROJFMz71nXGrRDgIJ+EOiHW3Z+i4L82 odgYoN6Uc30ot7WECybBG4kn9bAv0tgD5+jqxRmWu5h7Xk75D1kZLKuozG/Svcf8CQuJ OzVUppruRVyFXLo1r8boA5lxh1ubE3USunjg2ctM74bJX/ToxjOpMiYGbBN0Nb+GWNzv UVUaJp9Rp7bXw261E5c4tpmPFEq6OYp4NDmbNgj2KEy9N3nSmnYw0m999nlZ86Dbd9f3 CkgTvF8+jNZjfZUF0bcxtqNtbLimACP7MYYXKZiKb/5gCmdopvfQqdJFAKI2eyEvy7lR e4sw== 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=gSXaIPMXv2p2JdvokUaT0GeoWLMWWGeoBVt/sDwVK3w=; b=doYwkh2lJ8RQowEY7LGyQbIvN2fmFxLwH7fjcZNABZNQTsxVS4YFoXeylqGx9F6vdR Ak0fvmW3ri2RhabuVhUp/VPgGbktdHPxG554sRftIJOjehaRV/yG/WUFhcFxtxEK7J2/ 8yeyG6P3c/sJUET0iNmBavnzy5WlC1Jws8XOALKEQiwLKq3adYPruRv+HnEwcTZSAJcJ uxv4tEsWKfQ/Q0BRfeBv7s0p15qbPe17eEDwEyfq/EbUws75CYQx+Ogdqt4ByO/YH90X 1McNZLQAnrQdwai6eFd11JfM6rXQ/Zu335IyGshvWYbq3XvqoDCVCF65FPYGLRl0Emhk Trmw== X-Gm-Message-State: AOAM530oNn0jNoJfB2AaRgQ/BTsBFZqi4HbAI/hGoCzP2AZlJrdDbF7f G9FCtuzth95PqzEM7FVZsG1Ajg== X-Google-Smtp-Source: ABdhPJzOdvbXZXNYCKdyeqKZqW8Rv8aEdFTJ10je2scG4VGGkxKBfje30FaI8pb5he2GjqAgkG1mLA== X-Received: by 2002:a1c:9883:: with SMTP id a125mr7454711wme.133.1599217823242; Fri, 04 Sep 2020 04:10:23 -0700 (PDT) Received: from localhost.localdomain ([51.15.160.169]) by smtp.googlemail.com with ESMTPSA id m3sm10622743wmb.26.2020.09.04.04.10.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Sep 2020 04:10:22 -0700 (PDT) From: Corentin Labbe To: davem@davemloft.net, herbert@gondor.apana.org.au, mripard@kernel.org, wens@csie.org Subject: [PATCH v6 11/18] crypto: sun8i-ce: rename has_t_dlen_in_bytes to cipher_t_dlen_in_bytes Date: Fri, 4 Sep 2020 11:09:56 +0000 Message-Id: <1599217803-29755-12-git-send-email-clabbe@baylibre.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1599217803-29755-1-git-send-email-clabbe@baylibre.com> References: <1599217803-29755-1-git-send-email-clabbe@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200904_071024_786970_106305E8 X-CRM114-Status: GOOD ( 18.90 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:344 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Corentin Labbe , linux-sunxi@googlegroups.com, linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Hash algorithms will need also a spetial t_dlen handling, but since the meaning will be different, rename the current flag to specify it apply only on ciphers algorithms. Signed-off-by: Corentin Labbe --- drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c | 2 +- drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c | 2 +- drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c index fa12c966c45f..2dcf508b0f18 100644 --- a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c +++ b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c @@ -119,7 +119,7 @@ static int sun8i_ce_cipher_prepare(struct crypto_engine *engine, void *async_req common |= rctx->op_dir | CE_COMM_INT; cet->t_common_ctl = cpu_to_le32(common); /* CTS and recent CE (H6) need length in bytes, in word otherwise */ - if (ce->variant->has_t_dlen_in_bytes) + if (ce->variant->cipher_t_dlen_in_bytes) cet->t_dlen = cpu_to_le32(areq->cryptlen); else cet->t_dlen = cpu_to_le32(areq->cryptlen / 4); diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c index 65748dfa7a48..688976011f07 100644 --- a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c +++ b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c @@ -61,7 +61,7 @@ static const struct ce_variant ce_h6_variant = { }, .op_mode = { CE_OP_ECB, CE_OP_CBC }, - .has_t_dlen_in_bytes = true, + .cipher_t_dlen_in_bytes = true, .ce_clks = { { "bus", 0, 200000000 }, { "mod", 300000000, 0 }, diff --git a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h index eea0847dc1e8..3dbf8ca47b7c 100644 --- a/drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h +++ b/drivers/crypto/allwinner/sun8i-ce/sun8i-ce.h @@ -97,7 +97,7 @@ struct ce_clock { * @alg_cipher: list of supported ciphers. for each CE_ID_ this will give the * coresponding CE_ALG_XXX value * @op_mode: list of supported block modes - * @has_t_dlen_in_bytes: Does the request size for cipher is in + * @cipher_t_dlen_in_bytes: Does the request size for cipher is in * bytes or words * @ce_clks: list of clocks needed by this variant * @esr: The type of error register @@ -105,7 +105,7 @@ struct ce_clock { struct ce_variant { char alg_cipher[CE_ID_CIPHER_MAX]; u32 op_mode[CE_ID_OP_MAX]; - bool has_t_dlen_in_bytes; + bool cipher_t_dlen_in_bytes; struct ce_clock ce_clks[CE_MAX_CLOCKS]; int esr; };