mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-18 06:33:43 -04:00
crypto: hisilicon/sec2 - Use atomics instead of __sync
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: 416d82204d ("crypto: hisilicon - add HiSilicon SEC V2 driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
committed by
Herbert Xu
parent
84faa30724
commit
cb1eeb75cf
@@ -40,7 +40,7 @@ struct sec_req {
|
||||
int req_id;
|
||||
|
||||
/* Status of the SEC request */
|
||||
int fake_busy;
|
||||
atomic_t fake_busy;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -132,8 +132,8 @@ struct sec_debug_file {
|
||||
};
|
||||
|
||||
struct sec_dfx {
|
||||
u64 send_cnt;
|
||||
u64 recv_cnt;
|
||||
atomic64_t send_cnt;
|
||||
atomic64_t recv_cnt;
|
||||
};
|
||||
|
||||
struct sec_debug {
|
||||
|
||||
Reference in New Issue
Block a user