Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1169495 > unrolled thread

Re: [PATCH v7 00/14] crypto: add a new driver for Marvell's CESA

Started byPaul Gortmaker <paul.gortmaker@windriver.com>
First post2015-06-21 02:20 +0200
Last post2015-06-25 10:50 +0200
Articles 7 — 5 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v7 00/14] crypto: add a new driver for Marvell's CESA Paul Gortmaker <paul.gortmaker@windriver.com> - 2015-06-21 02:20 +0200
    Re: [PATCH v7 00/14] crypto: add a new driver for Marvell's CESA Boris Brezillon <boris.brezillon@free-electrons.com> - 2015-06-21 10:30 +0200
      Re: [PATCH v7 00/14] crypto: add a new driver for Marvell's CESA Herbert Xu <herbert@gondor.apana.org.au> - 2015-06-21 10:40 +0200
        Re: [PATCH v7 00/14] crypto: add a new driver for Marvell's CESA Boris Brezillon <boris.brezillon@free-electrons.com> - 2015-06-21 17:40 +0200
        Re: [PATCH v7 00/14] crypto: add a new driver for Marvell's CESA Paul Gortmaker <paul.gortmaker@windriver.com> - 2015-06-25 02:10 +0200
          Re: [PATCH v7 00/14] crypto: add a new driver for Marvell's CESA Javier Martinez Canillas <javier@dowhile0.org> - 2015-06-25 02:40 +0200
            [PATCH] crypto: mv_cesa - fix up for of_get_named_gen_pool() rename Simon Guinot <simon.guinot@sequanux.org> - 2015-06-25 10:50 +0200

#1169495 — Re: [PATCH v7 00/14] crypto: add a new driver for Marvell's CESA

FromPaul Gortmaker <paul.gortmaker@windriver.com>
Date2015-06-21 02:20 +0200
SubjectRe: [PATCH v7 00/14] crypto: add a new driver for Marvell's CESA
Message-ID<pDB9o-5Fg-3@gated-at.bofh.it>
On Sat, Jun 20, 2015 at 4:32 PM, Paul Gortmaker
<paul.gortmaker@windriver.com> wrote:
> On Fri, Jun 19, 2015 at 10:24 AM, Herbert Xu
> <herbert@gondor.apana.org.au> 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.

Paul.
--

>
> http://kisskb.ellerman.id.au/kisskb/buildresult/12445342/
>
> ERROR: "phys_to_dma" [drivers/crypto/marvell/marvell-cesa.ko] undefined!
> make[2]: *** [__modpost] Error 1
>
> Paul.
> --
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1169536

FromBoris Brezillon <boris.brezillon@free-electrons.com>
Date2015-06-21 10:30 +0200
Message-ID<pDINz-875-5@gated-at.bofh.it>
In reply to#1169495
Hi Paul,

On Sat, 20 Jun 2015 20:14:08 -0400
Paul Gortmaker <paul.gortmaker@windriver.com> wrote:

> On Sat, Jun 20, 2015 at 4:32 PM, Paul Gortmaker
> <paul.gortmaker@windriver.com> wrote:
> > On Fri, Jun 19, 2015 at 10:24 AM, Herbert Xu
> > <herbert@gondor.apana.org.au> 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 <boris.brezillon@free-electrons.com>
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 <boris.brezillon@free-electrons.com>
Reported-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Suggested-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
 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
-- 
1.9.1



-- 
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1169539

FromHerbert Xu <herbert@gondor.apana.org.au>
Date2015-06-21 10:40 +0200
Message-ID<pDIXg-8iq-15@gated-at.bofh.it>
In reply to#1169536
On Sun, Jun 21, 2015 at 10:24:18AM +0200, Boris Brezillon wrote:
> 
> Indeed. Here is a patch fixing that.

I think you should just kill COMPILE_TEST instead of adding ARM.

Cheers,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1169601

FromBoris Brezillon <boris.brezillon@free-electrons.com>
Date2015-06-21 17:40 +0200
Message-ID<pDPvH-Jq-9@gated-at.bofh.it>
In reply to#1169539
Hi Herbert,

On Sun, 21 Jun 2015 16:27:17 +0800
Herbert Xu <herbert@gondor.apana.org.au> wrote:

> On Sun, Jun 21, 2015 at 10:24:18AM +0200, Boris Brezillon wrote:
> > 
> > Indeed. Here is a patch fixing that.
> 
> I think you should just kill COMPILE_TEST instead of adding ARM.

Okay, I guess I should also kill the HAS_DMA and HAS_IOMEM since
PLAT_ORION and ARCH_MVEBU are guaranteed to have those options selected.


-- 
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1171754

FromPaul Gortmaker <paul.gortmaker@windriver.com>
Date2015-06-25 02:10 +0200
Message-ID<pF2TU-d1-15@gated-at.bofh.it>
In reply to#1169539
[Re: [PATCH v7 00/14] crypto: add a new driver for Marvell's CESA] On 22/06/2015 (Mon 15:59) Herbert Xu wrote:

> On Mon, Jun 22, 2015 at 09:23:36AM +0200, Boris Brezillon wrote:
> > Hi Herbert,
> > 
> > On Sun, 21 Jun 2015 16:27:17 +0800
> > Herbert Xu <herbert@gondor.apana.org.au> wrote:
> > 
> > > On Sun, Jun 21, 2015 at 10:24:18AM +0200, Boris Brezillon wrote:
> > > > 
> > > > Indeed. Here is a patch fixing that.
> > > 
> > > I think you should just kill COMPILE_TEST instead of adding ARM.
> > 
> > The following patch is killing the COMPILE_TEST dependency.
> 
> Patch applied.

Just a heads up, this driver is still killing a couple of linux-next
builds today and for the past few days.

drivers/crypto/mv_cesa.c:1037:2: error: implicit declaration of function
'of_get_named_gen_pool' [-Werror=implicit-function-declaration]

http://kisskb.ellerman.id.au/kisskb/buildresult/12448851/
http://kisskb.ellerman.id.au/kisskb/buildresult/12448776/

Missing dependency on CONFIG_OF_<blah> presumably.

Paul.
--

> -- 
> Email: Herbert Xu <herbert@gondor.apana.org.au>
> Home Page: http://gondor.apana.org.au/~herbert/
> PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1171774

FromJavier Martinez Canillas <javier@dowhile0.org>
Date2015-06-25 02:40 +0200
Message-ID<pF3mV-KX-7@gated-at.bofh.it>
In reply to#1171754
Hello Paul,

On Thu, Jun 25, 2015 at 2:00 AM, Paul Gortmaker
<paul.gortmaker@windriver.com> wrote:
> [Re: [PATCH v7 00/14] crypto: add a new driver for Marvell's CESA] On 22/06/2015 (Mon 15:59) Herbert Xu wrote:
>
>> On Mon, Jun 22, 2015 at 09:23:36AM +0200, Boris Brezillon wrote:
>> > Hi Herbert,
>> >
>> > On Sun, 21 Jun 2015 16:27:17 +0800
>> > Herbert Xu <herbert@gondor.apana.org.au> wrote:
>> >
>> > > On Sun, Jun 21, 2015 at 10:24:18AM +0200, Boris Brezillon wrote:
>> > > >
>> > > > Indeed. Here is a patch fixing that.
>> > >
>> > > I think you should just kill COMPILE_TEST instead of adding ARM.
>> >
>> > The following patch is killing the COMPILE_TEST dependency.
>>
>> Patch applied.
>
> Just a heads up, this driver is still killing a couple of linux-next
> builds today and for the past few days.
>
> drivers/crypto/mv_cesa.c:1037:2: error: implicit declaration of function
> 'of_get_named_gen_pool' [-Werror=implicit-function-declaration]
>
> http://kisskb.ellerman.id.au/kisskb/buildresult/12448851/
> http://kisskb.ellerman.id.au/kisskb/buildresult/12448776/
>
> Missing dependency on CONFIG_OF_<blah> presumably.
>

I haven't looked at the series but <linux/genalloc.h> has a stub
of_get_named_gen_pool() function if CONFIG_OF is not enabled [0].

So it seems that the problem is rather that the header is not being
included in some file.

> Paul.
> --
>

Best regards,
Javier

[0]: http://lxr.free-electrons.com/source/include/linux/genalloc.h#L131
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1171953 — [PATCH] crypto: mv_cesa - fix up for of_get_named_gen_pool() rename

FromSimon Guinot <simon.guinot@sequanux.org>
Date2015-06-25 10:50 +0200
Subject[PATCH] crypto: mv_cesa - fix up for of_get_named_gen_pool() rename
Message-ID<pFb18-3Dh-13@gated-at.bofh.it>
In reply to#1171774
This patch fixes the following build error:

drivers/crypto/mv_cesa.c: In function 'mv_cesa_get_sram':
drivers/crypto/mv_cesa.c:1037: error: implicit declaration of function 'of_get_named_gen_pool'
drivers/crypto/mv_cesa.c:1038: warning: assignment makes pointer from integer without a cast
scripts/Makefile.build:258: recipe for target 'drivers/crypto/mv_cesa.o' failed

Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
---
 drivers/crypto/mv_cesa.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/mv_cesa.c b/drivers/crypto/mv_cesa.c
index 5bcd575fa96f..e6b658faef63 100644
--- a/drivers/crypto/mv_cesa.c
+++ b/drivers/crypto/mv_cesa.c
@@ -1034,8 +1034,8 @@ static int mv_cesa_get_sram(struct platform_device *pdev,
 			     &sram_size);
 
 	cp->sram_size = sram_size;
-	cp->sram_pool = of_get_named_gen_pool(pdev->dev.of_node,
-					      "marvell,crypto-srams", 0);
+	cp->sram_pool = of_gen_pool_get(pdev->dev.of_node,
+					"marvell,crypto-srams", 0);
 	if (cp->sram_pool) {
 		cp->sram = gen_pool_dma_alloc(cp->sram_pool, sram_size,
 					      &cp->sram_dma);
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web