OSDN Git Service

crypto: stm32/crc32 - protect from concurrent accesses
authorNicolas Toromanoff <nicolas.toromanoff@st.com>
Tue, 12 May 2020 14:11:13 +0000 (16:11 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 22 May 2020 14:08:21 +0000 (00:08 +1000)
commit7795c0baf5ac25e104fec8677ad134066a8fb8d3
tree738c48d2fb9c7e803d42db2e9f8e398bc9f67a58
parent100f84beee4874234d04a1ea642b8c9738d7020d
crypto: stm32/crc32 - protect from concurrent accesses

Protect STM32 CRC device from concurrent accesses.

As we create a spinlocked section that increase with buffer size,
we provide a module parameter to release the pressure by splitting
critical section in chunks.

Size of each chunk is defined in burst_size module parameter.
By default burst_size=0, i.e. don't split incoming buffer.

Signed-off-by: Nicolas Toromanoff <nicolas.toromanoff@st.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/stm32/stm32-crc32.c