Re: [PATCH] crypto: stm32/crc32 - Avoid lock if hardware is already used

2020-09-15 Thread Nicolas TOROMANOFF
Hello Herbert, On 9/11/20 6:28 AM, Herbert Xu wrote: > On Fri, Sep 04, 2020 at 01:25:27PM +0200, Nicolas Toromanoff wrote: >> If STM32 CRC device is already in use, calculate CRC by software. >> >> This will release CPU constraint for a concurrent access to the >> hardw

[PATCH v2] crypto: stm32/crc32 - Avoid lock if hardware is already used

2020-09-16 Thread Nicolas Toromanoff
Signed-off-by: Nicolas Toromanoff --- v2: select CRC32 and not (CRYPTO_CRC32 and CRYPTO_CRC32C) in Kconfig --- drivers/crypto/stm32/Kconfig | 1 + drivers/crypto/stm32/stm32-crc32.c | 15 --- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/stm32/Kconfig

[PATCH] crypto: stm32/crc32 - Avoid lock if hardware is already used

2020-09-04 Thread Nicolas Toromanoff
Signed-off-by: Nicolas Toromanoff --- drivers/crypto/stm32/Kconfig | 2 ++ drivers/crypto/stm32/stm32-crc32.c | 15 --- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/stm32/Kconfig b/drivers/crypto/stm32/Kconfig index 4ef3eb11361c..8d605b07571f 100644 ---

RE: [PATCH 5/5] crypto: stm32/crc: protect from concurrent accesses

2020-05-25 Thread Nicolas TOROMANOFF
Hello, > -Original Message- > From: Ard Biesheuvel > Sent: Friday, May 22, 2020 6:12 PM> > On Tue, 12 May 2020 at 16:13, Nicolas Toromanoff > wrote: > > > > Protect STM32 CRC device from concurrent accesses. > > > > As we create a spinlocked

RE: [PATCH 5/5] crypto: stm32/crc: protect from concurrent accesses

2020-05-25 Thread Nicolas TOROMANOFF
> -Original Message- > From: Ard Biesheuvel > Sent: Monday, May 25, 2020 9:46 AM > To: Nicolas TOROMANOFF > Subject: Re: [PATCH 5/5] crypto: stm32/crc: protect from concurrent accesses > > On Mon, 25 May 2020 at 09:24, Nicolas TOROMANOFF > wrote: > > >

RE: [PATCH 5/5] crypto: stm32/crc: protect from concurrent accesses

2020-05-25 Thread Nicolas TOROMANOFF
> -Original Message- > From: Ard Biesheuvel > Sent: Monday, May 25, 2020 11:07 AM > To: Nicolas TOROMANOFF ; Eric Biggers > > On Mon, 25 May 2020 at 11:01, Nicolas TOROMANOFF > wrote: > > > > > -Original Message- > > > From: Ard Bies

[PATCH 0/5] STM32 CRC update

2020-05-12 Thread Nicolas Toromanoff
ate atomic section to protect concurrent CRC32 calculus. This patch series applies to cryptodev/master. Nicolas Toromanoff (5): crypto: stm32/crc: fix ext4 chksum BUG_ON() crypto: stm32/crc: fix run-time self test issue. crypto: stm32/crc: fix multi-instance crypto: stm32/crc: don't sleep in

[PATCH 3/5] crypto: stm32/crc: fix multi-instance

2020-05-12 Thread Nicolas Toromanoff
Signed-off-by: Nicolas Toromanoff --- drivers/crypto/stm32/stm32-crc32.c | 48 ++ 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/drivers/crypto/stm32/stm32-crc32.c b/drivers/crypto/stm32/stm32-crc32.c index 1c3e411b7acb..10304511f9b4 100644 --- a/driv

[PATCH 4/5] crypto: stm32/crc: don't sleep in runtime pm

2020-05-12 Thread Nicolas Toromanoff
/resume. Signed-off-by: Nicolas Toromanoff --- drivers/crypto/stm32/stm32-crc32.c | 45 -- 1 file changed, 36 insertions(+), 9 deletions(-) diff --git a/drivers/crypto/stm32/stm32-crc32.c b/drivers/crypto/stm32/stm32-crc32.c index 10304511f9b4..413415c216ef 100644

[PATCH 2/5] crypto: stm32/crc: fix run-time self test issue.

2020-05-12 Thread Nicolas Toromanoff
dbe90912a ("crypto: stm32 - Support for STM32 CRC32 crypto module") Signed-off-by: Nicolas Toromanoff --- drivers/crypto/stm32/stm32-crc32.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/stm32/stm32-crc32.c b/drivers/crypto/stm32/stm32-cr

[PATCH 1/5] crypto: stm32/crc: fix ext4 chksum BUG_ON()

2020-05-12 Thread Nicolas Toromanoff
Allow use of crc_update without prior call to crc_init. And change (and fix) driver to use CRC device even on unaligned buffers. Fixes: b51dbe90912a ("crypto: stm32 - Support for STM32 CRC32 crypto module") Signed-off-by: Nicolas Toromanoff --- drivers/crypto/stm32/stm32-cr

[PATCH 5/5] crypto: stm32/crc: protect from concurrent accesses

2020-05-12 Thread Nicolas Toromanoff
=0, i.e. don't split incoming buffer. Signed-off-by: Nicolas Toromanoff --- drivers/crypto/stm32/stm32-crc32.c | 47 -- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/drivers/crypto/stm32/stm32-crc32.c b/drivers/crypto/stm32/stm32-crc32.c index