[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <28561e25-1140-9a08-1546-4422150b65f7@st.com>
Date: Tue, 15 Sep 2020 15:54:41 +0000
From: Nicolas TOROMANOFF <nicolas.toromanoff@...com>
To: Herbert Xu <herbert@...dor.apana.org.au>
CC: "David S . Miller" <davem@...emloft.net>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Alexandre TORGUE <alexandre.torgue@...com>,
"Ard Biesheuvel" <ardb@...nel.org>,
"linux-crypto@...r.kernel.org" <linux-crypto@...r.kernel.org>,
"linux-stm32@...md-mailman.stormreply.com"
<linux-stm32@...md-mailman.stormreply.com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] crypto: stm32/crc32 - Avoid lock if hardware is already
used
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
>> hardware, and avoid masking irqs during the whole block processing.
>>
>> Fixes: 7795c0baf5ac ("crypto: stm32/crc32 - protect from concurrent accesses")
>>
>> Signed-off-by: Nicolas Toromanoff <nicolas.toromanoff@...com>
>> ---
>> 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
>> --- a/drivers/crypto/stm32/Kconfig
>> +++ b/drivers/crypto/stm32/Kconfig
>> @@ -3,6 +3,8 @@ config CRYPTO_DEV_STM32_CRC
>> tristate "Support for STM32 crc accelerators"
>> depends on ARCH_STM32
>> select CRYPTO_HASH
>> + select CRYPTO_CRC32
>> + select CRYPTO_CRC32C
>
> Shouldn't this be "select CRC32"?
Correct "select CRC32" is enough.
I'll send a version 2 with only "select CRC32".
Nicolas.
Powered by blists - more mailing lists