lkml.org 
[lkml]   [2020]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] crypto: hisilicon/sec2 - Use atomics instead of __sync
On Tue, Jan 07, 2020 at 09:08:58PM +0100, Arnd Bergmann wrote:
> The use of __sync functions for atomic memory access is not
> supported in the kernel, and can result in a link error depending
> on configuration:
>
> ERROR: "__tsan_atomic32_compare_exchange_strong" [drivers/crypto/hisilicon/sec2/hisi_sec2.ko] undefined!
> ERROR: "__tsan_atomic64_fetch_add" [drivers/crypto/hisilicon/sec2/hisi_sec2.ko] undefined!
>
> Use the kernel's own atomic interfaces instead. This way the
> debugfs interface actually reads the counter atomically.
>
> Fixes: 416d82204df4 ("crypto: hisilicon - add HiSilicon SEC V2 driver")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/crypto/hisilicon/sec2/sec.h | 6 +++---
> drivers/crypto/hisilicon/sec2/sec_crypto.c | 12 ++++++------
> drivers/crypto/hisilicon/sec2/sec_main.c | 14 ++++++++++++--
> 3 files changed, 21 insertions(+), 11 deletions(-)

Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

\
 
 \ /
  Last update: 2020-01-09 06:16    [W:0.056 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site