OSDN Git Service

mailbox: stm32_ipcc: add spinlock to fix channels concurrent access
authorArnaud Pouliquen <arnaud.pouliquen@st.com>
Wed, 22 May 2019 08:25:35 +0000 (10:25 +0200)
committerJassi Brar <jaswinder.singh@linaro.org>
Thu, 11 Jul 2019 04:08:43 +0000 (23:08 -0500)
commitdba9a3dfe912dc47c9dbc9ba1f5f65adbf9aea0f
treedd43246a01c8a1e99cf2b4c569634574dd4999dc
parent6fbc7275c7a9ba97877050335f290341a1fd8dbf
mailbox: stm32_ipcc: add spinlock to fix channels concurrent access

Add spinlock protection on IPCC register update to avoid race condition.
Without this fix, stm32_ipcc_set_bits and stm32_ipcc_clr_bits can be
called in parallel for different channels. This results in register
corruptions.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Reviewed-by: Fabien Dessenne <fabien.dessenne@st.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
drivers/mailbox/stm32-ipcc.c