From patchwork Sun Jun 21 08:24:18 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boris BREZILLON X-Patchwork-Id: 6652191 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Original-To: patchwork-linux-crypto@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0FF82C05AC for ; Sun, 21 Jun 2015 08:24:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D2DDD20690 for ; Sun, 21 Jun 2015 08:24:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D4E6A2068E for ; Sun, 21 Jun 2015 08:24:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752029AbbFUIYa (ORCPT ); Sun, 21 Jun 2015 04:24:30 -0400 Received: from down.free-electrons.com ([37.187.137.238]:47737 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751854AbbFUIY1 convert rfc822-to-8bit (ORCPT ); Sun, 21 Jun 2015 04:24:27 -0400 Received: by mail.free-electrons.com (Postfix, from userid 106) id C15F5381; Sun, 21 Jun 2015 10:24:23 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from bbrezillon (col31-4-88-188-80-5.fbx.proxad.net [88.188.80.5]) by mail.free-electrons.com (Postfix) with ESMTPSA id 1EFE1363; Sun, 21 Jun 2015 10:24:20 +0200 (CEST) Date: Sun, 21 Jun 2015 10:24:18 +0200 From: Boris Brezillon To: Paul Gortmaker Cc: Herbert Xu , "David S. Miller" , linux-crypto@vger.kernel.org, Arnaud Ebalard , Tawfik Bayouk , Lior Amsalem , Nadav Haklai , Eran Ben-Avi , Thomas Petazzoni , Gregory CLEMENT , Jason Cooper , Sebastian Hesselbarth , Andrew Lunn , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , devicetree@vger.kernel.org, "linux-arm-kernel@lists.infradead.org" , LKML , Jason Gunthorpe , Imre Kaloz , Russell King - ARM Linux , "linux-next@vger.kernel.org" Subject: Re: [PATCH v7 00/14] crypto: add a new driver for Marvell's CESA Message-ID: <20150621102418.2ea74910@bbrezillon> In-Reply-To: References: <1434635190-27733-1-git-send-email-boris.brezillon@free-electrons.com> <20150619142444.GA15234@gondor.apana.org.au> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.23; x86_64-pc-linux-gnu) MIME-Version: 1.0 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 Hi Paul, On Sat, 20 Jun 2015 20:14:08 -0400 Paul Gortmaker wrote: > On Sat, Jun 20, 2015 at 4:32 PM, Paul Gortmaker > wrote: > > On Fri, Jun 19, 2015 at 10:24 AM, Herbert Xu > > wrote: > >> On Thu, Jun 18, 2015 at 03:46:16PM +0200, Boris Brezillon wrote: > >>> Hello, > >>> > >>> This patch series adds a new driver supporting Marvell's CESA IP. > >>> This driver addresses some limitations of the existing one. > >>> >From a performance and CPU load point of view the most important > >>> limitation in the existing driver is the lack of DMA support, thus > >>> preventing us from chaining crypto operations. > >> > >> All applied to cryptodev. Thanks a lot! > > > > It seems this breaks linux-next allmodconfig on i386: > > Similar breakage for s390 and sparc it seems: > > drivers/crypto/marvell/cesa.c:353:2: error: implicit declaration of > function 'phys_to_dma' [-Werror=implicit-function-declaration] > > http://kisskb.ellerman.id.au/kisskb/buildresult/12445415/ > http://kisskb.ellerman.id.au/kisskb/buildresult/12445345/ > > If the CESA IP is only available on a single arch then > adding an arch dependency might be the easiest fix, > since phys_to_dma seems sparsely implemented. Indeed. Here is a patch fixing that. Thanks, Boris --- >8 --- From 891d4e5f185c39cd34b5859a1a63850ef997514d Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Sun, 21 Jun 2015 10:17:54 +0200 Subject: [PATCH] crypto: marvell/CESA: enforce dependency on ARM The CESA driver calls phys_to_virt() which is not available on all architectures. Enforce the dependency on ARM so that other architectures won't compile the driver even if COMPILE_TEST is set. Signed-off-by: Boris Brezillon Reported-by: Paul Gortmaker Suggested-by: Paul Gortmaker --- drivers/crypto/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig index cdca762..b374d5d 100644 --- a/drivers/crypto/Kconfig +++ b/drivers/crypto/Kconfig @@ -176,7 +176,7 @@ config CRYPTO_DEV_MV_CESA config CRYPTO_DEV_MARVELL_CESA tristate "New Marvell's Cryptographic Engine driver" - depends on (PLAT_ORION || ARCH_MVEBU || COMPILE_TEST) && HAS_DMA && HAS_IOMEM + depends on (PLAT_ORION || ARCH_MVEBU || COMPILE_TEST) && HAS_DMA && HAS_IOMEM && ARM select CRYPTO_AES select CRYPTO_DES select CRYPTO_BLKCIPHER