Re: [PATCH 00/47] arch-removal: device drivers

2018-03-14 Thread Boris Brezillon
o take the mtd patches through the MTD tree. As you've probably noticed, nand code has been moved around and it's easier for me to carry those 2 simple changes in my tree than creating an immutable branch. Let me know if this is a problem. Regards, Boris -- Boris Brezillon, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com

Re: [PATCH] Update Boris Brezillon email address

2018-02-22 Thread Boris Brezillon
On Fri, 16 Feb 2018 11:44:49 +0100 Boris Brezillon wrote: > Free Electrons is now Bootlin. > > Signed-off-by: Boris Brezillon > --- > Note that I'm planning to take this patch through the MTD tree. Applied to the nand/next branch of the MTD tree. >

Re: [PATCH] Update Boris Brezillon email address

2018-02-16 Thread Boris Brezillon
On Fri, 16 Feb 2018 16:35:27 +0100 Kamil Konieczny wrote: > On 16.02.2018 15:54, Boris Brezillon wrote: > > Adding back all the people that were Cc-ed on the initial email. > > > > On Fri, 16 Feb 2018 15:18:21 +0100 > > Kamil Konieczny wrote: > > > >

Re: [PATCH] Update Boris Brezillon email address

2018-02-16 Thread Boris Brezillon
Adding back all the people that were Cc-ed on the initial email. On Fri, 16 Feb 2018 15:18:21 +0100 Kamil Konieczny wrote: > On 16.02.2018 15:00, Boris Brezillon wrote: > > On Fri, 16 Feb 2018 12:21:53 +0100 > > Kamil Konieczny wrote: > > > >> On 16.02.201

[PATCH] Update Boris Brezillon email address

2018-02-16 Thread Boris Brezillon
Free Electrons is now Bootlin. Signed-off-by: Boris Brezillon --- Note that I'm planning to take this patch through the MTD tree. --- .mailmap| 7 --- MAINTAINERS | 10 +- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.mailmap b/.mailmap index e18cab7

Re: [PATCH] crypto: marvell/cesa - Fix DMA API misuse

2018-01-10 Thread Boris Brezillon
Hi Christoph, On Wed, 10 Jan 2018 16:48:17 +0100 Christoph Hellwig wrote: > On Wed, Jan 10, 2018 at 04:25:22PM +0100, Boris Brezillon wrote: > > On Wed, 10 Jan 2018 15:15:43 + > > Robin Murphy wrote: > > > > > phys_to_dma() is an internal helper for c

Re: [PATCH] crypto: marvell/cesa - Fix DMA API misuse

2018-01-10 Thread Boris Brezillon
didn't exist when the offending code was first merged, but it does now. > > Signed-off-by: Robin Murphy Acked-by: Boris Brezillon > --- > > Found by inspection and compile-tested only > > drivers/crypto/marvell/cesa.c | 19 --- > 1 file changed, 1

Re: [cryptodev:master 125/166] FATAL: drivers/crypto/marvell/marvell-cesa: struct platform_device_id is not terminated with a NULL entry!

2017-11-03 Thread Boris Brezillon
Hi Herbert, On Sat, 4 Nov 2017 00:38:26 +0800 kbuild test robot wrote: > tree: > https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git > master > head: 7a373fd74a8d1c4882e0236cc38345cec1393505 > commit: 7b0c3d693ce65900dd3c79766185f539fa37a29a [125/166] crypto: marvell

[PATCH] crypto: marvell - Add a NULL entry at the end of mv_cesa_plat_id_table[]

2017-11-03 Thread Boris Brezillon
struct platform_device_id should be NULL terminated to let the core detect where the last entry is. Fixes: 07c50a8be41a ("crypto: marvell - Add a platform_device_id table") Signed-off-by: Boris Brezillon --- drivers/crypto/marvell/cesa.c | 1 + 1 file changed, 1 insertion(+) di

Re: [PATCH] crypto: marvell - Switch cipher algs to the skcipher interface

2017-10-13 Thread Boris Brezillon
On Fri, 13 Oct 2017 15:30:32 +0200 Boris Brezillon wrote: > crypto_alg is not supposed to be directly implemented by crypto engine > driver. Drivers should instead implement specialized interfaces like *drivers. > ahash_alg or skcipher_alg. > > Migrate to all cipher al

[PATCH] crypto: marvell - Switch cipher algs to the skcipher interface

2017-10-13 Thread Boris Brezillon
internal struct or function names. Signed-off-by: Boris Brezillon --- drivers/crypto/marvell/cesa.c | 10 +- drivers/crypto/marvell/cesa.h | 25 ++- drivers/crypto/marvell/cipher.c | 476 3 files changed, 251 insertions(+), 260 deletions(-) diff

[PATCH 3/3] crypto: marvell - Remove the old mv_cesa driver

2017-10-11 Thread Boris Brezillon
-by: Boris Brezillon --- drivers/crypto/Kconfig| 22 +- drivers/crypto/Makefile |1 - drivers/crypto/marvell/cesa.c |7 - drivers/crypto/mv_cesa.c | 1216 - drivers/crypto/mv_cesa.h | 150 - 5 files changed, 3

[PATCH 0/3] crypto: marvell - Remove the old CESA driver

2017-10-11 Thread Boris Brezillon
e, so, if this series is accepted it will have to go through a single tree (either ARM or crypto). Regards, Boris Boris Brezillon (3): crypto: marvell - Add a platform_device_id table ARM: configs: Stop selecting the old CESA driver crypto: marvell - Remove the old mv_cesa driver arch/arm/co

[PATCH 1/3] crypto: marvell - Add a platform_device_id table

2017-10-11 Thread Boris Brezillon
Add a platform_device_id table to allow using this driver on orion platforms that have not been converted to DT. Signed-off-by: Boris Brezillon --- drivers/crypto/marvell/cesa.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/crypto/marvell/cesa.c b/drivers/crypto/marvell

[PATCH 2/3] ARM: configs: Stop selecting the old CESA driver

2017-10-11 Thread Boris Brezillon
A new driver has been developed to support the CESA IP. Switch remaining users of the old driver to the new driver in order to remove the old one. Signed-off-by: Boris Brezillon --- arch/arm/configs/dove_defconfig | 2 +- arch/arm/configs/multi_v5_defconfig | 2 +- arch/arm/configs

Re: [PATCH] crypto: atmel-aes - properly set IV after {en,de}crypt

2017-10-10 Thread Boris Brezillon
Hi Romain, May I ask why you're sending this patch to the MTD ML? While I'm here, can you have a look at this patch [1] and add you Reviewed-by/Tested-by? Thanks, Boris [1]http://patchwork.ozlabs.org/patch/821959/ On Fri, 6 Oct 2017 17:51:08 +0200 Romain Izard wrote: > Certain cipher modes

Re: [PATCH v5 04/19] crypto: marvell/cesa: remove redundant backlog checks on EBUSY

2017-08-15 Thread Boris Brezillon
Le Mon, 14 Aug 2017 18:21:14 +0300, Gilad Ben-Yossef a écrit : > Now that -EBUSY return code only indicates backlog queueing > we can safely remove the now redundant check for the > CRYPTO_TFM_REQ_MAY_BACKLOG flag when -EBUSY is returned. > > Signed-off-by: Gilad Ben-Yossef

Re: [PATCH v2 4/9] crypto: marvell - Use IPAD/OPAD constant

2017-05-19 Thread Boris Brezillon
On Fri, 19 May 2017 08:53:26 +0200 Corentin Labbe wrote: > This patch simply replace all occurrence of HMAC IPAD/OPAD value by their > define. > > Signed-off-by: Corentin Labbe Acked-by: Boris Brezillon > --- > drivers/crypto/marvell/hash.c | 5 +++-- > 1 file change

Re: [PATCH] crypto: marvell - Copy IVDIG before launching partial DMA ahash requests

2016-12-14 Thread Boris Brezillon
: Romain Perier > Cc: Just a minor comment (see below), otherwise Acked-by: Boris Brezillon > --- > drivers/crypto/marvell/cesa.h | 3 ++- > drivers/crypto/marvell/hash.c | 29 - > drivers/crypto/marvell/tdma.c | 9 - > 3 files chan

Re: [PATCH 1/2] crypto: marvell - Don't copy hash operation twice into the SRAM

2016-12-02 Thread Boris Brezillon
On Fri, 2 Dec 2016 17:05:50 +0100 Romain Perier wrote: > No need to copy the template of an hash operation twice into the SRAM > from the step function. > > Fixes: commit 85030c5168f1 ("crypto: marvell - Add support for chai...") > Signed-off-by: Romain Perier

Re: [PATCH 1/2] crypto: marvell - Don't copy hash operation twice into the SRAM

2016-12-02 Thread Boris Brezillon
On Fri, 2 Dec 2016 17:05:50 +0100 Romain Perier wrote: > No need to copy the template of an hash operation twice into the SRAM > from the step function. > > Fixes: commit 85030c5168f1 ("crypto: marvell - Add support for chai...") > Signed-off-by: Romain Perier Oh, and please add Cc: to bot

Re: [PATCH 2/2] crypto: marvell - Don't corrupt state of an STD req for re-stepped ahash

2016-12-02 Thread Boris Brezillon
On Fri, 2 Dec 2016 17:05:51 +0100 Romain Perier wrote: > mv_cesa_hash_std_step always copies creq->state into the SRAM. If an IRQ > is triggered while the current STD request is not finished, this request > will be stepped again and the initial state will be filled into the > engine. Hm, it's n

Re: [PATCH v4 2/2] crypto: marvell - Don't break chain for computable last ahash requests

2016-10-14 Thread Boris Brezillon
gt; level. > The 'complete' operation is also updated to retrieve the MAC digest from the > right location. > > Signed-off-by: Romain Perier Minor comments below, otherwise it looks good. Acked-by: Boris Brezillon > --- > > Changes in v4: > - Remove the dummy

Re: [PATCH v3 2/2] crypto: marvell - Don't break chain for computable last ahash requests

2016-10-04 Thread Boris Brezillon
On Tue, 4 Oct 2016 14:57:20 +0200 Romain Perier wrote: > Currently, the driver breaks chain for all kind of hash requests in order to > don't override intermediate states of partial ahash updates. However, some > final > ahash requests can be directly processed by the engine, and so without > i

Re: [PATCH v3 1/2] crypto: marvell - Use an unique pool to copy results of requests

2016-10-04 Thread Boris Brezillon
_ERR(tdma)) > return PTR_ERR(tdma); > > - iv = dma_pool_alloc(cesa_dev->dma->iv_pool, gfp_flags, &dma_handle); > - if (!iv) > - return -ENOMEM; Can you add a comment explaining what you're doing here? /* We re-use

Re: [PATCH] crypto: mv_cesa: remove NO_IRQ reference

2016-09-02 Thread Boris Brezillon
() does the same thing) > > This removes the call to irq_of_parse_and_map() and checks for > the error code correctly. > > Signed-off-by: Arnd Bergmann Acked-by: Boris Brezillon > --- > drivers/crypto/mv_cesa.c | 7 ++- > 1 file changed, 2 insertions(+), 5 delet

Re: [PATCH 2/2] crypto: marvell - Don't break chain for computable last ahash requests

2016-08-20 Thread Boris Brezillon
On Thu, 18 Aug 2016 14:12:14 +0200 Romain Perier wrote: > Currently, the driver breaks chain for all kind of hash requests in order > to don't override intermediate states of partial ahash updates. However, > some final ahash requests can be directly processed by the engine, and > so without inte

Re: [PATCH 1/2] crypto: marvell - Use an unique pool to copy results of requests

2016-08-19 Thread Boris Brezillon
Hi Romain, On Thu, 18 Aug 2016 14:12:13 +0200 Romain Perier wrote: > So far, we used a dedicated dma pool to copy the result of outer IV for > cipher requests. Instead of using a dma pool per outer data, we prefer > use a common dma pool that contains the part of the SRAM that is likely > to be

Re: [PATCH] crypto: marvell: Don't copy IV vectors from the _process op for ciphers

2016-07-28 Thread Boris Brezillon
y is already done in the _complete operation, so this commit removes > the duplicated code in the _process op. > > Fixes: 3610d6cd5231 ("crypto: marvell - Add a complete...") > Signed-off-by: Romain Perier Acked-by: Boris Brezillon > --- > drivers/crypto/marvell/cip

Re: [PATCH] crypto: marvell - Update cache with input sg only when it is unmapped

2016-07-25 Thread Boris Brezillon
ete operation for..") > Signed-off-by: Romain Perier Acked-by: Boris Brezillon > --- > drivers/crypto/marvell/hash.c | 12 ++-- > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drivers/crypto/marvell/hash.c b/drivers/crypto/marvell/hash.c &g

Re: [PATCH] crypto: marvell - Don't chain at DMA level when backlog is disabled

2016-07-22 Thread Boris Brezillon
f the return status to be sure that the current request has been > correctly queued or added to the backlog. > > Fixes: 85030c5168f1 ("crypto: marvell - Add support for chaining...") > Signed-off-by: Romain Perier Acked-by: Boris Brezillon > --- > drivers/crypto/marv

Re: [PATCH] crypto: marvell - Fix memory leaks in TDMA chain for cipher requests

2016-07-22 Thread Boris Brezillon
function is called with the wrong version of the chain. > > Fixes: db509a45339f ("crypto: marvell/cesa - add TDMA support") > Signed-off-by: Romain Perier Acked-by: Boris Brezillon > --- > drivers/crypto/marvell/cipher.c | 14 ++ > 1 file changed, 6 inserti

Re: [PATCH] crypto: marvell: Fix wrong flag used for GFP in mv_cesa_dma_add_iv_op

2016-07-18 Thread Boris Brezillon
On Mon, 18 Jul 2016 11:32:24 +0200 Romain Perier wrote: > Use the parameter 'gfp_flags' instead of 'flag' as second argument of > dma_pool_alloc(). The parameter 'flag' is for the TDMA descriptor, its > content has no sense for the allocator. > > S

Re: [PATCH v3 09/10] crypto: marvell: Add support for chaining crypto requests in TDMA mode

2016-06-21 Thread Boris Brezillon
processed by the engine. > > This commits re-factorizes the code, changes the code architecture and > adds the required data structures to chain cryptographic requests > together before sending them to an engine (stopped or possibly already > running). > > Signed-off-by: Romain Perie

Re: [PATCH v3 08/10] crypto: marvell: Add load balancing between engines

2016-06-21 Thread Boris Brezillon
7;cesa_dev->lock' and improve parallelism. > > Signed-off-by: Romain Perier Acked-by: Boris Brezillon > --- > > Changes in v3: > > - Renamed mv_cesa_dequeue_req_unlocked => mv_cesa_dequeue_req_locked > > Changes in v2: > > - Reworded the commit m

Re: [PATCH v2 10/10] crypto: marvell: Increase the size of the crypto queue

2016-06-17 Thread Boris Brezillon
from sending asychronous requests, so more cryptographic tasks > are processed by the engines. > > Signed-off-by: Romain Perier Acked-by: Boris Brezillon > --- > drivers/crypto/marvell/cesa.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/cr

Re: [PATCH v2 09/10] crypto: marvell: Add support for chaining crypto requests in TDMA mode

2016-06-17 Thread Boris Brezillon
On Fri, 17 Jun 2016 13:24:08 +0200 Romain Perier wrote: > The Cryptographic Engines and Security Accelerators (CESA) supports the > Multi-Packet Chain Mode. With this mode enabled, multiple tdma requests > can be chained and processed by the hardware without software > intervention. This mode was

Re: [PATCH v2 08/10] crypto: marvell: Add load balancing between engines

2016-06-17 Thread Boris Brezillon
On Fri, 17 Jun 2016 13:24:07 +0200 Romain Perier wrote: > This commits adds support for fine grained load balancing on > multi-engine IPs. The engine is pre-selected based on its current load > and on the weight of the crypto request that is about to be processed. > The global crypto queue is als

Re: [PATCH v2 07/10] crypto: marvell: Move SRAM I/O operations to step functions

2016-06-17 Thread Boris Brezillon
st while the engine is running. > > Signed-off-by: Romain Perier Acked-by: Boris Brezillon > --- > drivers/crypto/marvell/cipher.c | 6 +++--- > drivers/crypto/marvell/hash.c | 18 +- > 2 files changed, 12 insertions(+), 12 deletions(-) > > diff --git

Re: [PATCH v2 06/10] crypto: marvell: Add a complete operation for async requests

2016-06-17 Thread Boris Brezillon
t to call > the process and the complete operations from different locations > depending on the type of the request (different cleanup logic). > > Signed-off-by: Romain Perier Acked-by: Boris Brezillon > --- > > Changes in v2: > > - Removed useless cosmetic ch

Re: [PATCH v2 05/10] crypto: marvell: Move tdma chain out of mv_cesa_tdma_req and remove it

2016-06-17 Thread Boris Brezillon
eq > to mv_cesa_ablkcipher_req directly. There are also no needs to keep the > 'base' field into the union of mv_cesa_ahash_req, so move it into the > upper structure. > > Signed-off-by: Romain Perier Acked-by: Boris Brezillon > --- > > Changes in v2: > -

Re: [PATCH v2 04/10] crypto: marvell: Copy IV vectors by DMA transfers for acipher requests

2016-06-17 Thread Boris Brezillon
required for processing multiple cipher requests > in chained mode, otherwise the content of the IV vector would be > overwritten by the last processed request. > > Signed-off-by: Romain Perier After fixing the coding style issue, Acked-by: Boris Brezillon > --- > > Changes

Re: [PATCH v2 03/10] crypto: marvell: Fix wrong type check in dma functions

2016-06-17 Thread Boris Brezillon
On Fri, 17 Jun 2016 13:24:02 +0200 Romain Perier wrote: > So far, the way that the type of a TDMA operation was checked was > wrong. We have to use the type mask in order to get the right part of > the flag containing the type of the operation. > > Signed-off-by: Romain Perier

Re: [PATCH v2 02/10] crypto: marvell: Check engine is not already running when enabling a req

2016-06-17 Thread Boris Brezillon
let the user know that something went wrong in the CESA > driver. > > Signed-off-by: Romain Perier Acked-by: Boris Brezillon > --- > > Changes in v2: > - Reworded the commit message > - Fixed cosmetic changes > > drivers/crypto/marvell/cipher.c | 2

Re: [PATCH v2 01/10] crypto: marvell: Add a macro constant for the size of the crypto queue

2016-06-17 Thread Boris Brezillon
-off-by: Romain Perier You forgot Acked-by: Boris Brezillon > --- > drivers/crypto/marvell/cesa.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/crypto/marvell/cesa.c > b/drivers/crypto/marvell/cesa.c index 056a754..fb403e1 100644 > --- a/d

Re: [PATCH 4/7] crypto: marvell: Moving the tdma chain out of mv_cesa_tdma_req

2016-06-16 Thread Boris Brezillon
r_std_req and mv_cesa_req base in mv_cesa_ablkcipher_req (you'll also have to remove the base field from the mv_cesa_ablkcipher_std_req struct). -- Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- To unsubscribe from this list: s

Re: [PATCH 4/7] crypto: marvell: Moving the tdma chain out of mv_cesa_tdma_req

2016-06-16 Thread Boris Brezillon
ch will always be false, since mv_cesa_ahash_dma_req_init() is the function supposed to fill the ->first and ->last fields. > > > > Should be > > > > if (cesa_dev->caps->has_tdma) > > > >>ret = mv_cesa_ahash_dma_req_init(req); &

Re: [PATCH 7/7] crypto: marvell: Add support for chaining crypto requests in TDMA mode

2016-06-15 Thread Boris Brezillon
ne, > + &backlog); > + > + /* Re-chaining to the next request */ > + engine->chain.first = tdma->next; > + tdma->next = NULL; > + > +

Re: [PATCH 6/7] crypto: marvell: Adding load balancing between engines

2016-06-15 Thread Boris Brezillon
,8 @@ static void mv_cesa_ahash_std_prepare(struct > ahash_request *req) > { > struct mv_cesa_ahash_req *creq = ahash_request_ctx(req); > struct mv_cesa_ahash_std_req *sreq = &creq->req.std; > - struct mv_cesa_engine *engine = sreq->base.engine; > > sreq->off

Re: [PATCH 5/7] crypto: marvell: Adding a complete operation for async requests

2016-06-15 Thread Boris Brezillon
int digsize; > + int i; > > digsize = crypto_ahash_digestsize(crypto_ahash_reqtfm(ahashreq)); > for (i = 0; i < digsize / 4; i++) > @@ -326,8 +329,6 @@ static int mv_cesa_ahash_process(struct > crypto_async_request *req, u32 status) >

Re: [PATCH 3/7] crypto: marvell: Copy IV vectors by DMA transfers for acipher requests

2016-06-15 Thread Boris Brezillon
memcpy_fromio(ablkreq->info, dreq->chain.last->data, ivsize); Just use memcpy() here: you're not copying from an iomem region here. -- Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- To unsubscribe from this list: s

Re: [PATCH 4/7] crypto: marvell: Moving the tdma chain out of mv_cesa_tdma_req

2016-06-15 Thread Boris Brezillon
eq) > if (cached) > return 0; > > - ret = mv_cesa_queue_req(&req->base); > + ret = mv_cesa_queue_req(&req->base, &creq->req.base); > if (mv_cesa_req_needs_cleanup(&req->base, ret)) > mv_cesa_ahash_cleanup(

Re: [PATCH 3/7] crypto: marvell: Copy IV vectors by DMA transfers for acipher requests

2016-06-15 Thread Boris Brezillon
_dma_add_desc(chain, gfp_flags); > + if (IS_ERR(tdma)) > + return PTR_ERR(tdma); > + > + cache = dma_pool_alloc(cesa_dev->dma->iv_pool, flags, &dma_handle); > + if (!cache) > + return -ENOMEM; > + > + tdma->byte_cnt

Re: [PATCH 2/7] crypto: marvell: Check engine is not already running when enabling a req

2016-06-15 Thread Boris Brezillon
ier Apart from the coding style issue mentioned below, Acked-by: Boris Brezillon > --- > drivers/crypto/marvell/cipher.c | 2 ++ > drivers/crypto/marvell/hash.c | 2 ++ > drivers/crypto/marvell/tdma.c | 2 ++ > 3 files changed, 6 insertions(+) > > diff --git a/drive

Re: [PATCH 1/7] crypto: marvell: Add a macro constant for the size of the crypto queue

2016-06-15 Thread Boris Brezillon
-off-by: Romain Perier Acked-by: Boris Brezillon > --- > drivers/crypto/marvell/cesa.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/crypto/marvell/cesa.c b/drivers/crypto/marvell/cesa.c > index 056a754..fb403e1 100644 > --- a/drivers/c

Re: [PATCH 4/5] crypto: Use dma_pool_zalloc

2016-04-29 Thread Boris Brezillon
; > @@ > > d = > -dma_pool_alloc > +dma_pool_zalloc > (...); > if (!d) S > - memset(d, 0, sizeof(*d)); > // > > Signed-off-by: Julia Lawall Acked-by: Boris Brezillon > > --- > > drivers/crypto/marvell/t

Re: [PATCH] crypto: marvell/cesa: Improving code readability

2016-04-19 Thread Boris Brezillon
ot; by "engine" and in order to improve > readability. > > Signed-off-by: Romain Perier Acked-by: Boris Brezillon > --- > drivers/crypto/marvell/cesa.c | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/crypto/marvell/cesa.c

Re: [PATCH 1/4] mm: add is_highmem_addr() helper

2016-04-04 Thread Boris Brezillon
On Mon, 4 Apr 2016 13:44:11 +0530 Vignesh R wrote: > Hi, > > On 03/31/2016 05:59 PM, Boris Brezillon wrote: > > Add an helper to check if a virtual address is in the highmem region. > > > > Signed-off-by: Boris Brezillon > > --- > > include/linux/h

Re: [PATCH 2/4] scatterlist: add sg_alloc_table_from_buf() helper

2016-03-31 Thread Boris Brezillon
Hi Russell, On Thu, 31 Mar 2016 15:14:13 +0100 Russell King - ARM Linux wrote: > On Thu, Mar 31, 2016 at 02:29:42PM +0200, Boris Brezillon wrote: > > sg_alloc_table_from_buf() provides an easy solution to create an sg_table > > from a virtual address pointer. This function takes

[PATCH 4/4] mtd: provide helper to prepare buffers for DMA operations

2016-03-31 Thread Boris Brezillon
Some NAND controller drivers are making use of DMA to transfer data from the controller to the buffer passed by the MTD user. Provide a generic mtd_map/unmap_buf() implementation to avoid open coded (and sometime erroneous) implementations. Signed-off-by: Boris Brezillon --- drivers/mtd

[PATCH 1/4] mm: add is_highmem_addr() helper

2016-03-31 Thread Boris Brezillon
Add an helper to check if a virtual address is in the highmem region. Signed-off-by: Boris Brezillon --- include/linux/highmem.h | 13 + 1 file changed, 13 insertions(+) diff --git a/include/linux/highmem.h b/include/linux/highmem.h index bb3f329..13dff37 100644 --- a/include/linux

[PATCH 2/4] scatterlist: add sg_alloc_table_from_buf() helper

2016-03-31 Thread Boris Brezillon
sg_alloc_table_from_buf() provides an easy solution to create an sg_table from a virtual address pointer. This function takes care of dealing with vmallocated buffers, buffer alignment, or DMA engine limitations (maximum DMA transfer size). Signed-off-by: Boris Brezillon --- include/linux

[PATCH 3/4] spi: use sg_alloc_table_from_buf()

2016-03-31 Thread Boris Brezillon
Replace custom implementation of sg_alloc_table_from_buf() by a call to sg_alloc_table_from_buf(). Signed-off-by: Boris Brezillon --- drivers/spi/spi.c | 45 + 1 file changed, 5 insertions(+), 40 deletions(-) diff --git a/drivers/spi/spi.c b/drivers

[PATCH 0/4] scatterlist: sg_table from virtual pointer

2016-03-31 Thread Boris Brezillon
ven if they're not directly impacted by those patches. Let me know if you want me to drop/add people from/to the recipient list. Thanks. Best Regards, Boris [1]http://www.spinics.net/lists/arm-kernel/msg493552.html Boris Brezillon (4): mm: add is_highmem_addr() helper scatterlist: add

Re: [patch] crypto: marvell/cesa - remove unneeded condition

2016-03-21 Thread Boris Brezillon
On Mon, 21 Mar 2016 12:03:43 +0300 Dan Carpenter wrote: > creq->cache[] is an array inside the struct, it's not a pointer and it > can't be NULL. > > Signed-off-by: Dan Carpenter Acked-by: Boris Brezillon > > diff --git a/drivers/crypto/marvell/hash.c

[PATCH] crypto: marvell/cesa - forward devm_ioremap_resource() error code

2016-03-19 Thread Boris Brezillon
Forward devm_ioremap_resource() error code instead of returning -ENOMEM. Signed-off-by: Boris Brezillon Reported-by: Russell King - ARM Linux Fixes: f63601fd616a ("crypto: marvell/cesa - add a new driver for Marvell's CESA") Cc: # 4.2+ --- drivers/crypto/marvell/cesa.c | 2 +-

Re: [PATCH] crypto: marvell/cesa - forward devm_ioremap_resource() error code

2016-03-19 Thread Boris Brezillon
Sorry for the noise, just sent twice the same patch :-/. Please ignore this one. On Thu, 17 Mar 2016 10:47:11 +0100 Boris Brezillon wrote: > Forward devm_ioremap_resource() error code instead of returning > -ENOMEM. > > Signed-off-by: Boris Brezillon > Reported-by: Russell K

Re: [PATCH 1/2] crypto: marvell/cesa - fix memory leak

2016-03-19 Thread Boris Brezillon
On Thu, 17 Mar 2016 10:21:34 +0100 Boris Brezillon wrote: > Crypto requests are not guaranteed to be finalized (->final() call), > and can be freed at any moment, without getting any notification from > the core. This can lead to memory leaks of the ->cache buffer. > > Mak

[PATCH] crypto: marvell/cesa - forward devm_ioremap_resource() error code

2016-03-19 Thread Boris Brezillon
Forward devm_ioremap_resource() error code instead of returning -ENOMEM. Signed-off-by: Boris Brezillon Reported-by: Russell King - ARM Linux Fixes: f63601fd616a ("crypto: marvell/cesa - add a new driver for Marvell's CESA") Cc: # 4.2+ --- drivers/crypto/marvell/cesa.c | 2 +-

Re: [PATCH 1/3] crypto: marvell/cesa - replace dma_to_phys with dma_map_single

2016-03-19 Thread Boris Brezillon
On Fri, 18 Mar 2016 11:25:48 + Robin Murphy wrote: > On 18/03/16 09:30, Boris Brezillon wrote: > > On Thu, 17 Mar 2016 23:50:20 + > > Russell King - ARM Linux wrote: > > > >> On Thu, Mar 17, 2016 at 07:17:24PM -0400, ok...@codeaurora.org wrote: > >

Re: [PATCH 1/3] crypto: marvell/cesa - replace dma_to_phys with dma_map_single

2016-03-19 Thread Boris Brezillon
On Fri, 18 Mar 2016 09:51:37 -0400 Sinan Kaya wrote: > On 3/18/2016 7:25 AM, Robin Murphy wrote: > > On 18/03/16 09:30, Boris Brezillon wrote: > >> On Thu, 17 Mar 2016 23:50:20 + > >> Russell King - ARM Linux wrote: > >> > >>> On Thu, Mar 17

Re: [PATCH 1/3] crypto: marvell/cesa - replace dma_to_phys with dma_map_single

2016-03-19 Thread Boris Brezillon
mory which isn't a struct > page, ultimately resulting in something that isn't SRAM being pointed > to by "engine->sram_dma". > Or we could just do engine->sram_dma = res->start; which is pretty much what the SRAM/genalloc code is doing already. -- Bo

[PATCH 2/2] crypto: marvell/cesa - initialize hash states

2016-03-19 Thread Boris Brezillon
->export() might be called before we have done an update operation, and in this case the ->state field is left uninitialized. Put the correct default value when initializing the request. Signed-off-by: Boris Brezillon --- drivers/crypto/marvell/hash.c | 20 1 file c

[PATCH 1/2] crypto: marvell/cesa - fix memory leak

2016-03-18 Thread Boris Brezillon
n the meantime, thus leading to an invalind dma_pool_free() call (the buffer passed in argument has not been allocated from the pool). Signed-off-by: Boris Brezillon Reported-by: Gregory CLEMENT --- drivers/crypto/marvell/cesa.h | 3 +- drivers/crypto/marve

[PATCH] crypto: cesa: fix test in mv_cesa_dev_dma_init()

2016-02-05 Thread Boris Brezillon
We are checking twice if dma->cache_pool is not NULL but are never testing dma->padding_pool value. Signed-off-by: Boris Brezillon --- drivers/crypto/marvell/cesa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/marvell/cesa.c b/drivers/crypto/marvell/

Re: [PATCH 0/6] Sparse related fixes

2015-10-18 Thread Boris Brezillon
opriate sparse warnings should be fixed without penalising code.) To the whole series: Acked-by: Boris Brezillon > > drivers/crypto/marvell/cesa.h | 44 > - > drivers/crypto/marvell/cipher.c | 13 ++-- > drivers/cr

Re: [PATCH 00/18] crypto: further fixes for Marvell CESA hash

2015-10-18 Thread Boris Brezillon
he same. > > Unfortunately, this is a large series, but the driver unfortunately > needs this level of bug fixing to work properly. Thanks for spending some time fixing those bugs and simplifying/factorizing/documenting the hash logic. To the whole series: Acked-by: Boris Brezillon No

Re: hash import/export

2015-10-11 Thread Boris Brezillon
The only other place is > in the marvell cesa driver itself when initialising the hmac state. > > Is there any reason a driver can't define its own structure to be > exported here which can be shared between each of the different methods > it supports? > > Thanks. >

Re: [PATCH v3 1/5] crypto: ensure algif_hash does not pass a zero-sized state

2015-10-10 Thread Boris Brezillon
sh_prepare_alg(struct shash_alg *alg) > > if (alg->digestsize > PAGE_SIZE / 8 || > alg->descsize > PAGE_SIZE / 8 || > - alg->statesize > PAGE_SIZE / 8) > + alg->statesize > PAGE_SIZE / 8 || > + alg->statesize == 0) &

Re: [PATCH v3b 5/5] crypto: marvell: factor out common import/export functions

2015-10-09 Thread Boris Brezillon
e_ptr; > - int ret; > - > - ret = crypto_ahash_init(req); > - if (ret) > - return ret; > - > - if (in_state->count >= SHA256_BLOCK_SIZE) > - mv_cesa_update_op_cfg(&creq->op_tmpl, > - CESA_SA_DE

Re: [PATCH v3 0/5] crypto: fixes for Marvell hash

2015-10-09 Thread Boris Brezillon
+ Fixes tags to patches 1 to 4 so that they can be applied on 4.2 too? Best Regards, Boris -- Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message

Re: [PATCH v3 5/5] crypto: marvell: factor out common import functions

2015-10-09 Thread Boris Brezillon
256_BLOCK_SIZE) > - mv_cesa_update_op_cfg(&creq->op_tmpl, > - CESA_SA_DESC_CFG_MID_FRAG, > - CESA_SA_DESC_CFG_FRAG_MSK); > - > - creq->len = in_state->count; > - memcpy(creq->sta

Re: [PATCH v3 4/5] crypto: marvell: fix wrong hash results

2015-10-09 Thread Boris Brezillon
sa_update_op_cfg(&creq->op_tmpl, > + CESA_SA_DESC_CFG_MID_FRAG, > + CESA_SA_DESC_CFG_FRAG_MSK); > + > creq->len = in_state->count; > memcpy(creq->state, in_state->state, digsize); >

Re: [PATCH v3 3/5] crypto: marvell: initialise struct mv_cesa_ahash_req

2015-10-09 Thread Boris Brezillon
t with > whatever data was in memory prior to sock_kmalloc(). > > Add zero-initialisation of this structure. Maybe you should also change your commit message since this patch no longer initializes the req struct to zero, otherwise Acked-by: Boris Brezillon > > Signed-off-by: Russell King

Re: [PATCH v2 3/3] crypto: marvell: initialise struct mv_cesa_ahash_req

2015-10-09 Thread Boris Brezillon
ers which are left with > whatever data was in memory prior to sock_kmalloc(). > > Add zero-initialisation of this structure. > > Signed-off-by: Russell King Acked-by: Boris Brezillon > --- > drivers/crypto/marvell/hash.c | 6 ++ > 1 file changed, 6 insertions(+) &

Re: [PATCH v2 2/3] crypto: marvell: fix stack smashing in marvell/hash.c

2015-10-09 Thread Boris Brezillon
te" etc. Add the necessary initialisers for the > .statesize member. > > Signed-off-by: Russell King Acked-by: Boris Brezillon > --- > drivers/crypto/marvell/hash.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/crypto/marvell/hash.c b/driv

Re: [PATCH v2 0/3] crypto: fixes for Marvell hash

2015-10-09 Thread Boris Brezillon
rt function writes. This patch is > > optional. > > > > The second patch adds the necessary statesize members to the Marvell > > code which were previously missing. Fixing this uncovered a further > > problem, which the third patch addresses. > Thanks again for spending some of your time debugging the driver and for providing those patches. Best Regards, Boris -- Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] MAINTAINERS: add maintainers for the Marvell Crypto driver

2015-10-09 Thread Boris Brezillon
relevant developers to the list of maintainers. > > Cc: Boris Brezillon Acked-by: Boris Brezillon Thanks, Boris > Cc: Arnaud Ebalard > Cc: Herbert Xu > Cc: Russell King > Signed-off-by: Thomas Petazzoni > --- > MAINTAINERS | 7 +++ > 1 file changed, 7 ins

Re: [PATCH] crypto: marvell: properly handle CRYPTO_TFM_REQ_MAY_BACKLOG-flagged requests

2015-09-18 Thread Boris Brezillon
b509a45339fd ("crypto: marvell/cesa - add TDMA support") > Cc: # v4.2+ > Signed-off-by: Thomas Petazzoni Acked-by: Boris Brezillon > --- > drivers/crypto/marvell/cesa.h | 27 +++ > drivers/crypto/marvell/cipher.c | 7 +

Re: [PATCH] crypto: Drop owner assignment from platform_driver

2015-07-09 Thread Boris Brezillon
On Fri, 10 Jul 2015 14:46:16 +0900 Krzysztof Kozlowski wrote: > platform_driver does not need to set an owner because > platform_driver_register() will set it. > > Signed-off-by: Krzysztof Kozlowski Acked-by: Boris Brezillon > > --- > > The coccinelle script which

Re: crypto: marvell/CESA: Issues with non cache-line aligned buffers

2015-07-03 Thread Boris Brezillon
On Fri, 3 Jul 2015 10:58:07 +0100 Russell King - ARM Linux wrote: > On Fri, Jul 03, 2015 at 11:43:05AM +0200, Boris Brezillon wrote: > > Which led us to think that this could be related to a non cache-line > > aligned buffer problem: if we share the cache line with someone > &g

Re: crypto: marvell/CESA: Issues with non cache-line aligned buffers

2015-07-03 Thread Boris Brezillon
te that none of my patches changed the clk_get(), request_irq() calls order, or the clk_get() error path ;-). Anyway, I'll propose a patch fixing the problem. Thanks for the feedback, Boris [1]https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit/drivers/crypto/mv_cesa.c

crypto: marvell/CESA: Issues with non cache-line aligned buffers

2015-07-03 Thread Boris Brezillon
g else we should check ? Best Regards, Boris -- Boris Brezillon, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majord...@vger.kernel.org Mo

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

2015-06-22 Thread Boris Brezillon
Hi Herbert, On Sun, 21 Jun 2015 16:27:17 +0800 Herbert Xu 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

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

2015-06-21 Thread Boris Brezillon
Hi Herbert, On Sun, 21 Jun 2015 16:27:17 +0800 Herbert Xu 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

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

2015-06-21 Thread Boris Brezillon
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: > >

[PATCH v7 09/14] crypto: marvell/CESA: add SHA256 support

2015-06-18 Thread Boris Brezillon
From: Arnaud Ebalard Add support for SHA256 operations. Signed-off-by: Arnaud Ebalard Signed-off-by: Boris Brezillon --- drivers/crypto/marvell/cesa.c | 2 + drivers/crypto/marvell/cesa.h | 2 + drivers/crypto/marvell/hash.c | 159 ++ 3 files

[PATCH v7 03/14] crypto: mv_cesa: explicitly define kirkwood and dove compatible strings

2015-06-18 Thread Boris Brezillon
their crypto engine device to this driver. Signed-off-by: Boris Brezillon --- Documentation/devicetree/bindings/crypto/mv_cesa.txt | 5 - drivers/crypto/mv_cesa.c | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree

[PATCH v7 02/14] crypto: mv_cesa: use gen_pool to reserve the SRAM memory region

2015-06-18 Thread Boris Brezillon
. Also note that the old way of retrieving the SRAM memory region is still supported, or in other words, backward compatibility is preserved. Signed-off-by: Boris Brezillon --- .../devicetree/bindings/crypto/mv_cesa.txt | 24 ++--- drivers/crypto/Kconfig

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

2015-06-18 Thread Boris Brezillon
commit introduce the base infrastructure allowing us to add support for DMA optimization. It also includes support for one hash (SHA1) and one cipher (AES) algorithm, and enable those features on the Armada 370 SoC. Other algorithms and platforms will be added later on. Signed-off-by: Boris Brezillon

  1   2   3   >