Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp8023015ybi; Thu, 6 Jun 2019 05:33:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqzS+xLprtpESqbPeAIvWb5mVfWRgTU98w1elFCzGsczxTG59DJbc7T8f0mNLulllh3T8Hz1 X-Received: by 2002:a17:902:b194:: with SMTP id s20mr36649370plr.77.1559824400761; Thu, 06 Jun 2019 05:33:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559824400; cv=none; d=google.com; s=arc-20160816; b=nmdqOfGyqFojp3jFmje/Wy7hk1xS7D8Zwo5AQJNHsqcHipagz7Yl864a8BkMHpE7Vi N8ccEJ7ys2siZWKOaTKQjcTi+0pnDRJHtVOEO+4lYxTw6oMYTcItUfDCkpExpPHVuAt6 3Sgv1NvWjZw3aaXg2f6gX0qXNd7zJf8VUfDiXQ8/KxdrfSaWyo14rfKXDRMjc/AcPZA6 tO5VFcN4BqU7fo6XaUunH+aYPYEiXzPwhAp46wM9jSErQeRGPZYaq5gv41y4ghPUzXPZ zgKd+EgSnfabCCzBtoBRBRzs+y446dmnRPczrRrDDbTFA+E+/rBcF3Qmo5RbaZgzURv2 eUog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:cc:to:subject:from:references :in-reply-to:message-id:dkim-signature; bh=C807DMn2knPnxoyEdl5erVMcqL7Pg26rgYiktiJfkeo=; b=ROtyXLYutS540oc7/RNopsuD+E/S47bT41oRxdXF1OEWFIfhZIOTkwOHh2akkBW4uO DB7nlA5OfhBBEjoS1GiQKOjJqDsEjIovpX+no6SXtLXi3XCLvuEcyDhUNsbpOwd2HTXa b9vWnPmJ49zUXBoUbY5z6oTkHnN1Bq2ohg4qFYdKOat/dOJcNVIDwE7mBREioATldzbQ cCrr5GvzF7GF/9tQY3tcWNdacSEsapmXZhLAK56zkPa4I9PemzKeT2JA20mUYHlMJvQO n/YHAUISn9VRC6YCzYB5sDduatwXObATpAtwIHAwnY67IjHxvWHglDgF2KRRamAoQ7we ICWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=bmchooTJ; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l93si1916904pje.32.2019.06.06.05.33.04; Thu, 06 Jun 2019 05:33:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=bmchooTJ; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727585AbfFFLbz (ORCPT + 99 others); Thu, 6 Jun 2019 07:31:55 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:40001 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728497AbfFFLbj (ORCPT ); Thu, 6 Jun 2019 07:31:39 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 45KNlr4wqPzB09ZP; Thu, 6 Jun 2019 13:31:36 +0200 (CEST) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=bmchooTJ; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id 02uiVHsYpACb; Thu, 6 Jun 2019 13:31:36 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 45KNlr3skFzB09ZF; Thu, 6 Jun 2019 13:31:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1559820696; bh=C807DMn2knPnxoyEdl5erVMcqL7Pg26rgYiktiJfkeo=; h=In-Reply-To:References:From:Subject:To:Cc:Date:From; b=bmchooTJ3kmi9co7DlYaKcbCEliAkBfomwNM4/LXqtNRc6ISGPVbQ+cC/qDFVO1dT VEKPypecEVD+1Ae4mtyzHAdMWVX7gWm1POM1f7xYwMQuA+ElYOtfXjP9Y7sE73lXs5 EBbyBkD1sPXhSHEl8BsRckyrNHsTYzlqiKnHXVZc= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id C78A18B894; Thu, 6 Jun 2019 13:31:37 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id SiytaB2fKX2F; Thu, 6 Jun 2019 13:31:37 +0200 (CEST) Received: from po16838vm.idsi0.si.c-s.fr (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 8645C8B891; Thu, 6 Jun 2019 13:31:37 +0200 (CEST) Received: by po16838vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 687FF68CFD; Thu, 6 Jun 2019 11:31:37 +0000 (UTC) Message-Id: <108a23c4d2f0803b1302bc00c7321d799e42edc1.1559819372.git.christophe.leroy@c-s.fr> In-Reply-To: References: From: Christophe Leroy Subject: [PATCH v1 2/5] crypto: talitos - move struct talitos_edesc into talitos.h To: Herbert Xu , "David S. Miller" , horia.geanta@nxp.com Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Thu, 6 Jun 2019 11:31:37 +0000 (UTC) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Next patch will require struct talitos_edesc to be defined earlier in talitos.c This patch moves it into talitos.h so that it can be used from any place in talitos.c Fixes: 37b5e8897eb5 ("crypto: talitos - chain in buffered data for ahash on SEC1") Signed-off-by: Christophe Leroy --- drivers/crypto/talitos.c | 30 ------------------------------ drivers/crypto/talitos.h | 30 ++++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index 3b3e99f1cddb..5b401aec6c84 100644 --- a/drivers/crypto/talitos.c +++ b/drivers/crypto/talitos.c @@ -951,36 +951,6 @@ static int aead_des3_setkey(struct crypto_aead *authenc, goto out; } -/* - * talitos_edesc - s/w-extended descriptor - * @src_nents: number of segments in input scatterlist - * @dst_nents: number of segments in output scatterlist - * @icv_ool: whether ICV is out-of-line - * @iv_dma: dma address of iv for checking continuity and link table - * @dma_len: length of dma mapped link_tbl space - * @dma_link_tbl: bus physical address of link_tbl/buf - * @desc: h/w descriptor - * @link_tbl: input and output h/w link tables (if {src,dst}_nents > 1) (SEC2) - * @buf: input and output buffeur (if {src,dst}_nents > 1) (SEC1) - * - * if decrypting (with authcheck), or either one of src_nents or dst_nents - * is greater than 1, an integrity check value is concatenated to the end - * of link_tbl data - */ -struct talitos_edesc { - int src_nents; - int dst_nents; - bool icv_ool; - dma_addr_t iv_dma; - int dma_len; - dma_addr_t dma_link_tbl; - struct talitos_desc desc; - union { - struct talitos_ptr link_tbl[0]; - u8 buf[0]; - }; -}; - static void talitos_sg_unmap(struct device *dev, struct talitos_edesc *edesc, struct scatterlist *src, diff --git a/drivers/crypto/talitos.h b/drivers/crypto/talitos.h index 32ad4fc679ed..95f78c6d9206 100644 --- a/drivers/crypto/talitos.h +++ b/drivers/crypto/talitos.h @@ -42,6 +42,36 @@ struct talitos_desc { #define TALITOS_DESC_SIZE (sizeof(struct talitos_desc) - sizeof(__be32)) +/* + * talitos_edesc - s/w-extended descriptor + * @src_nents: number of segments in input scatterlist + * @dst_nents: number of segments in output scatterlist + * @icv_ool: whether ICV is out-of-line + * @iv_dma: dma address of iv for checking continuity and link table + * @dma_len: length of dma mapped link_tbl space + * @dma_link_tbl: bus physical address of link_tbl/buf + * @desc: h/w descriptor + * @link_tbl: input and output h/w link tables (if {src,dst}_nents > 1) (SEC2) + * @buf: input and output buffeur (if {src,dst}_nents > 1) (SEC1) + * + * if decrypting (with authcheck), or either one of src_nents or dst_nents + * is greater than 1, an integrity check value is concatenated to the end + * of link_tbl data + */ +struct talitos_edesc { + int src_nents; + int dst_nents; + bool icv_ool; + dma_addr_t iv_dma; + int dma_len; + dma_addr_t dma_link_tbl; + struct talitos_desc desc; + union { + struct talitos_ptr link_tbl[0]; + u8 buf[0]; + }; +}; + /** * talitos_request - descriptor submission request * @desc: descriptor pointer (kernel virtual) -- 2.13.3