Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2398753ybi; Thu, 18 Jul 2019 07:49:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqzOBiAnzdzK4oSGlYGcEr1Oo/ssmlky+dVmgNgzl6NwAkHWyVVH2Ye0dVIGniyEbePpmJgp X-Received: by 2002:a65:6259:: with SMTP id q25mr7801396pgv.145.1563461373046; Thu, 18 Jul 2019 07:49:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563461373; cv=none; d=google.com; s=arc-20160816; b=m+azuYofGN7bITPiDZipIg0ynQln9cuhpM6LXUBbfgl/uOXYbPtIIxG7FumYrhbkLr vn9Bwk6dOPzsyR6KENTBYqvEAX9RYWgmNs+mtkQBLoEkT+/AuJR9SeqBMsz1K/+mo4M4 9tdOYOljENrZn+L2WkWWuIkjO9cA+B1UVAnGgEmiNfDf5y1R4HElNOtBttXxgrVnf8o/ 16auJaXgjQU+0//+nWG1hfMggwrDOgdyBa//s72DfuamY4WbxgcileS++xeqPgcl02+5 3473F3HH5dIhyDAOCCFTj+Uay/DoJPrYgmyCqJDyOvKeoEe+f1PgJ+MK6uDj3GImelKi R5rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=w9gy3K54W5ISGcbE0VuPojwhi8QSiYvTiIvm/AUjlNs=; b=XPVgc7SL1EBsINlZd6ZehMKsIsFXf2b3rDxbfYeuUJsDzvHycbFp2aXWTE8mPatlSh Vrlmz0EiEL2++f8cNbEl3r9YBFIBZ1uhIbgxjoziS5Y0TVkVpD9TtRZAz2MYidz7MHW8 wGeEZJwezb+/tFNdPEO76RuESRFiQ1CYiAQE3XJgpUOHtCxKej+GxcZ8druh3ianomC8 jkWEsOuPN0jwvioxlUu+3RI1busiSjyg8ww6xMiBgatnkWzSi9RvmAjYMUAS3XUb/D5x X6ArL9ikJxGzqMgr55FlBh6UD3eLGB2EXIyFO/ZK2CO5GXO2f6HDwozmQ+tzWLnNM31E lo1Q== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x9si1290296plv.182.2019.07.18.07.49.19; Thu, 18 Jul 2019 07:49:33 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390494AbfGROtS (ORCPT + 99 others); Thu, 18 Jul 2019 10:49:18 -0400 Received: from inva021.nxp.com ([92.121.34.21]:43098 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390345AbfGROtS (ORCPT ); Thu, 18 Jul 2019 10:49:18 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 1744C2000AC; Thu, 18 Jul 2019 16:49:16 +0200 (CEST) Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 0A22E200009; Thu, 18 Jul 2019 16:49:16 +0200 (CEST) Received: from lorenz.ea.freescale.net (lorenz.ea.freescale.net [10.171.71.5]) by inva024.eu-rdc02.nxp.com (Postfix) with ESMTP id B3F1F205C7; Thu, 18 Jul 2019 16:49:15 +0200 (CEST) From: Iuliana Prodan To: Herbert Xu , Horia Geanta , Aymen Sghaier Cc: "David S. Miller" , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-imx Subject: [PATCH] crypto: caam - move shared symbols in a common location Date: Thu, 18 Jul 2019 17:49:09 +0300 Message-Id: <1563461349-24876-1-git-send-email-iuliana.prodan@nxp.com> X-Mailer: git-send-email 2.1.0 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Moved to a common location the symbols shared by all CAAM drivers (jr, qi, qi2). Signed-off-by: Iuliana Prodan --- This patch depends on series: https://patchwork.kernel.org/project/linux-crypto/list/?series=147479 drivers/crypto/caam/common_if.c | 7 +++++++ drivers/crypto/caam/common_if.h | 7 +++++++ drivers/crypto/caam/error.c | 6 ------ drivers/crypto/caam/error.h | 5 ----- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/drivers/crypto/caam/common_if.c b/drivers/crypto/caam/common_if.c index 1291d3d..071b08d 100644 --- a/drivers/crypto/caam/common_if.c +++ b/drivers/crypto/caam/common_if.c @@ -7,6 +7,13 @@ #include "compat.h" #include "common_if.h" +#include + +bool caam_little_end; +EXPORT_SYMBOL(caam_little_end); + +bool caam_imx; +EXPORT_SYMBOL(caam_imx); /* * validate key length for AES algorithms diff --git a/drivers/crypto/caam/common_if.h b/drivers/crypto/caam/common_if.h index 61d5516..5fb8840 100644 --- a/drivers/crypto/caam/common_if.h +++ b/drivers/crypto/caam/common_if.h @@ -8,6 +8,8 @@ #ifndef CAAM_COMMON_LOCATION_H #define CAAM_COMMON_LOCATION_H +#include "desc.h" + int check_aes_keylen(unsigned int keylen); int check_gcm_authsize(unsigned int authsize); @@ -16,4 +18,9 @@ int check_rfc4106_authsize(unsigned int authsize); int check_ipsec_assoclen(unsigned int assoclen); +static inline bool is_mdha(u32 algtype) +{ + return (algtype & OP_ALG_ALGSEL_MASK & ~OP_ALG_ALGSEL_SUBMASK) == + OP_ALG_CHA_MDHA; +} #endif /* CAAM_COMMON_LOCATION_H */ diff --git a/drivers/crypto/caam/error.c b/drivers/crypto/caam/error.c index b7fbf1b..b901872 100644 --- a/drivers/crypto/caam/error.c +++ b/drivers/crypto/caam/error.c @@ -50,12 +50,6 @@ void caam_dump_sg(const char *prefix_str, int prefix_type, #endif /* DEBUG */ EXPORT_SYMBOL(caam_dump_sg); -bool caam_little_end; -EXPORT_SYMBOL(caam_little_end); - -bool caam_imx; -EXPORT_SYMBOL(caam_imx); - static const struct { u8 value; const char *error_text; diff --git a/drivers/crypto/caam/error.h b/drivers/crypto/caam/error.h index 16809fa..e2f6ed8 100644 --- a/drivers/crypto/caam/error.h +++ b/drivers/crypto/caam/error.h @@ -21,9 +21,4 @@ void caam_dump_sg(const char *prefix_str, int prefix_type, int rowsize, int groupsize, struct scatterlist *sg, size_t tlen, bool ascii); -static inline bool is_mdha(u32 algtype) -{ - return (algtype & OP_ALG_ALGSEL_MASK & ~OP_ALG_ALGSEL_SUBMASK) == - OP_ALG_CHA_MDHA; -} #endif /* CAAM_ERROR_H */ -- 2.1.0