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=-13.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 6DA00C433E5 for ; Tue, 21 Jul 2020 19:07:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4BFEC206E3 for ; Tue, 21 Jul 2020 19:07:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20150623.gappssmtp.com header.i=@baylibre-com.20150623.gappssmtp.com header.b="m1KZnXuN" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730735AbgGUTHp (ORCPT ); Tue, 21 Jul 2020 15:07:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730389AbgGUTGx (ORCPT ); Tue, 21 Jul 2020 15:06:53 -0400 Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 387A0C05BD0F for ; Tue, 21 Jul 2020 12:06:53 -0700 (PDT) Received: by mail-wr1-x441.google.com with SMTP id 88so11943466wrh.3 for ; Tue, 21 Jul 2020 12:06:53 -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=IAzax0iAInzAko5yIFWiXgbe0PWCrK9UQn54BhF64QE=; b=m1KZnXuNUVbBvZhFNWCDC9GibXG8kn2La7zpp3vY38Gy9Cf4u6JQYGxg0X0pI0nvFl rNQtzF5nI/1fRnCshLvo7TSOoVxusaYR0WCRm/JW4fdlB020XpGh1HAxKMJvgGT70fks oCvAtKllhcjKE22qO84UHiLnWEf0iEs+kmgMlYlcdpQrRiLTdFj2H1+ImPjlPtNe9JVm W9qqBpWuKdpSMPEBdxPhy7c0Bbvmvr+FukwRGWL0gZIiilnQmOGowHeCp2fjvxmxJKyk mlZZAGMjFxtzPIN9/WO1F4HevQVp1MPquHP7/k+xWttv/giY+VjoPnhA4vovC5dm5wal l3xQ== 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=IAzax0iAInzAko5yIFWiXgbe0PWCrK9UQn54BhF64QE=; b=kiGY5Urw4BHyD06loGPcRaxXKjkDu+H8BOrAKffvkWR//RquxrtrXqmcUyxGNOPe8X 8OlYnKp0HpBRnoFzRUMYImx2apmlS5Dbpy1QCngr5cjuMDvZMr3WP0yq+bJO/8smPIyl 1tOua2CO5hAl9xEbiuzjNyEWbTpnd4Dpw/ScoxV2ZvCHeOeDgG3vO7mJvEdHSWyVsUcK rdj4tZfU9LqtMqBASDcx3uKiEYlqwDZK1TvZa2T+d7LexG7nQb+pZ92yCsGw0GYH+zK7 FTVCI9X7D2udPdg4gPEUo/yvV7VJDYs7ggF5Hy0Hk2W+48vBJbpEjMLffWYtNSPdzK5x M8QA== X-Gm-Message-State: AOAM53132vhkW9Qvgeyq9q8hCHpzvNp5sxaGZjvLhH+Y8V9AHaSmLO5R O6ZAG5MPks4tVN8iLBArZvYxoQ== X-Google-Smtp-Source: ABdhPJwUuh03MeS1LQlCCh4M8Y0/zoF8AU1cm9XXkn7ajfNy9hLcx7W0C6HjpklqTa/e8IfnnYIWXw== X-Received: by 2002:adf:9e8b:: with SMTP id a11mr5377184wrf.309.1595358411966; Tue, 21 Jul 2020 12:06:51 -0700 (PDT) Received: from localhost.localdomain ([51.15.160.169]) by smtp.googlemail.com with ESMTPSA id s14sm25794848wrv.24.2020.07.21.12.06.51 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Jul 2020 12:06:51 -0700 (PDT) From: Corentin Labbe To: davem@davemloft.net, herbert@gondor.apana.org.au, mripard@kernel.org, wens@csie.org Cc: linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, Corentin Labbe Subject: [PATCH v4 11/17] crypto: sun8i-ce: rename has_t_dlen_in_bytes to cipher_t_dlen_in_bytes Date: Tue, 21 Jul 2020 19:06:25 +0000 Message-Id: <1595358391-34525-12-git-send-email-clabbe@baylibre.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1595358391-34525-1-git-send-email-clabbe@baylibre.com> References: <1595358391-34525-1-git-send-email-clabbe@baylibre.com> Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.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 4cc98180be3f..de4d70f87a9c 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; }; -- 2.26.2 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=-13.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,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 3273BC433E1 for ; Tue, 21 Jul 2020 19:10:46 +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 DEA2920672 for ; Tue, 21 Jul 2020 19:10:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="xK5VSNZD"; 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="m1KZnXuN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DEA2920672 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+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=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=shCTBEp3oWZiJIFY8BQ03hyJzpavhj5dR+NvdU2nFhg=; b=xK5VSNZD6Z149LAPH2zBcAn+KM Xe6jB4IFKI0QiXFzGyFYhKcsjm2eWVnbUcIhbRRGsYfo/s8Et0J01wMPuQDh16nL34RjjJmxL7dg+ xfSxmKF2vAR5iGWjaLUgA7GiCNAyxNGrEvTAKqWwtRxyMkiCPSZgu0ECXjka+pKGGKFo0kg9mKt02 Y1J7XcaVRQKsjfK6iz3N+CgFMazvDvJBpcFgtcxOoDyTeGF5t01JSTn8WEe+lKNBAqK38HBaPza6o jNWwt3WetuDjVMDGGEsqmcSmCqQPSassxaLbj+CF06BtN7bqZaE70kuwev4xWHnLBWjkcX+m+Iyi+ yYBYyTcw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxxd7-0005Cw-DA; Tue, 21 Jul 2020 19:08:45 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jxxbI-0004K6-Pz for linux-arm-kernel@lists.infradead.org; Tue, 21 Jul 2020 19:06:56 +0000 Received: by mail-wr1-x442.google.com with SMTP id z15so22197664wrl.8 for ; Tue, 21 Jul 2020 12:06:52 -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=IAzax0iAInzAko5yIFWiXgbe0PWCrK9UQn54BhF64QE=; b=m1KZnXuNUVbBvZhFNWCDC9GibXG8kn2La7zpp3vY38Gy9Cf4u6JQYGxg0X0pI0nvFl rNQtzF5nI/1fRnCshLvo7TSOoVxusaYR0WCRm/JW4fdlB020XpGh1HAxKMJvgGT70fks oCvAtKllhcjKE22qO84UHiLnWEf0iEs+kmgMlYlcdpQrRiLTdFj2H1+ImPjlPtNe9JVm W9qqBpWuKdpSMPEBdxPhy7c0Bbvmvr+FukwRGWL0gZIiilnQmOGowHeCp2fjvxmxJKyk mlZZAGMjFxtzPIN9/WO1F4HevQVp1MPquHP7/k+xWttv/giY+VjoPnhA4vovC5dm5wal l3xQ== 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=IAzax0iAInzAko5yIFWiXgbe0PWCrK9UQn54BhF64QE=; b=qkSF5NeQ81LxgRqMCuKu7fBsUU4i0+G6fFOgcRUnMtsmOLknstI3orDkGdta5f17mc 9yb31yxmRGDEuAStOKi5BnC79SxvOOMuNVeGeob22QIelBXnS4dpMf1wUj6NbUO/eqQL vgc58DI6TVTDXKnpgpH/1/MbKfSlEpG6NgD8yEX1HXiiFq41wPGDGvh7HIH3jzy6xJHL T+HtMKfZiwf5dAFyQ89YwxBIy4+kCDVe8Bkd1jVDdOoOGWgkUZHQIFqBlWkbEgkscBaD L8uQfbnFDUb4xqddzm4wrgYOcJ6la6KB6IpfBH3MVJUwTZ3XBUA5ZlFr31Ib+UTO1I/E j23A== X-Gm-Message-State: AOAM532Z5GrZBmQ2HnkDLNXhyDHfQVUni3Na4N7egB6XGNDN1FBay6de Qvk8Hl8g9SmR0uXUaohUGFq2pQ== X-Google-Smtp-Source: ABdhPJwUuh03MeS1LQlCCh4M8Y0/zoF8AU1cm9XXkn7ajfNy9hLcx7W0C6HjpklqTa/e8IfnnYIWXw== X-Received: by 2002:adf:9e8b:: with SMTP id a11mr5377184wrf.309.1595358411966; Tue, 21 Jul 2020 12:06:51 -0700 (PDT) Received: from localhost.localdomain ([51.15.160.169]) by smtp.googlemail.com with ESMTPSA id s14sm25794848wrv.24.2020.07.21.12.06.51 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Jul 2020 12:06:51 -0700 (PDT) From: Corentin Labbe To: davem@davemloft.net, herbert@gondor.apana.org.au, mripard@kernel.org, wens@csie.org Subject: [PATCH v4 11/17] crypto: sun8i-ce: rename has_t_dlen_in_bytes to cipher_t_dlen_in_bytes Date: Tue, 21 Jul 2020 19:06:25 +0000 Message-Id: <1595358391-34525-12-git-send-email-clabbe@baylibre.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1595358391-34525-1-git-send-email-clabbe@baylibre.com> References: <1595358391-34525-1-git-send-email-clabbe@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200721_150652_916211_A59FD846 X-CRM114-Status: GOOD ( 17.13 ) 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-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.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 4cc98180be3f..de4d70f87a9c 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; }; -- 2.26.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel