]> git.baikalelectronics.ru Git - kernel.git/commit
locking/atomic: net: use linux/atomic.h for xchg & cmpxchg
authorMark Rutland <mark.rutland@arm.com>
Tue, 25 May 2021 14:02:01 +0000 (15:02 +0100)
committerPeter Zijlstra <peterz@infradead.org>
Wed, 26 May 2021 11:20:49 +0000 (13:20 +0200)
commitfeb2053a92e013fb8bf922e31bec9522f64d97d0
tree7f884d88ba2bea8200b642c42ec72f4ce569f429
parent58ef2e380323be5ba4fea6411f4c1649e49aed3f
locking/atomic: net: use linux/atomic.h for xchg & cmpxchg

As xchg*() and cmpxchg*() may be instrumented by atomic-instrumented.h,
it's necessary to include <linux/atomic.h> to use these, rather than
<asm/cmpxchg.h>, which is effectively an arch-internal header.

In a couple of places we include <asm/cmpxchg.h>, but get away with this
as <linux/atomic.h> gets pulled in inidrectly by another include. Before
we convert more architectures to use atomic-instrumented.h, let's fix
these up to use <linux/atomic.h> so that we don't make things more
fragile.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Boqun Feng <boqun.feng@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Will Deacon <will@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20210525140232.53872-3-mark.rutland@arm.com
net/core/filter.c
net/sunrpc/xprtmultipath.c