aboutsummaryrefslogtreecommitdiff
path: root/net/lapb/lapb_timer.c
diff options
context:
space:
mode:
authorWill Deacon <[email protected]>2015-11-18 10:13:08 +0000
committerCatalin Marinas <[email protected]>2015-11-18 18:06:43 +0000
commitc139aa60c1007429335131167a0ca181e38c5668 (patch)
treef4ab14648498f179be80c4b3091fbfc913bac074 /net/lapb/lapb_timer.c
parent0b2aa5b80bbf4d0fb5daa1fb83ff637daa12d552 (diff)
arm64: barriers: fix smp_load_acquire to work with const arguments
A newly introduced function in include/net/sock.h passes a const argument to smp_load_acquire: static inline int sk_state_load(const struct sock *sk) { return smp_load_acquire(&sk->sk_state); } This cause an allmodconfig build failure, since our underlying load-acquire implementation does not handle const types correctly: include/net/sock.h: In function 'sk_state_load': ./arch/arm64/include/asm/barrier.h:71:3: error: read-only variable '___p1' used as 'asm' output asm volatile ("ldarb %w0, %1" \ This patch fixes the problem by reusing the trick in READ_ONCE that loads via a non-const member of an anonymous union. This has the advantage of allowing us to use smp_load_acquire on packed structures (e.g. arch_spinlock_t) as well as primitive types. Cc: Arnd Bergmann <[email protected]> Cc: David Daney <[email protected]> Cc: Eric Dumazet <[email protected]> Reported-by: Arnd Bergmann <[email protected]> Reported-by: David Daney <[email protected]> Signed-off-by: Will Deacon <[email protected]> Signed-off-by: Catalin Marinas <[email protected]>
Diffstat (limited to 'net/lapb/lapb_timer.c')
0 files changed, 0 insertions, 0 deletions