arm64: barrier: Use '__unqual_scalar_typeof' for acquire/release macros
authorWill Deacon <will@kernel.org>
Thu, 19 Dec 2019 17:11:43 +0000 (17:11 +0000)
committerWill Deacon <will@kernel.org>
Thu, 16 Apr 2020 11:28:35 +0000 (12:28 +0100)
commit10223c5286f7389c022e9e91f12c49918790cf36
tree354fe951052df505cbc10520dbd538596f57389e
parent549887271a961a79375b2a55bf675515b9107778
arm64: barrier: Use '__unqual_scalar_typeof' for acquire/release macros

Passing volatile-qualified pointers to the arm64 implementations of the
load-acquire/store-release macros results in a re-load from the stack
and a bunch of associated stack-protector churn due to the temporary
result variable inheriting the volatile semantics thanks to the use of
'typeof()'.

Define these temporary variables using 'unqual_scalar_typeof' to drop
the volatile qualifier in the case that they are scalar types.

Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/include/asm/barrier.h