• Will Deacon's avatar
    arm64: barrier: Use '__unqual_scalar_typeof' for acquire/release macros · 10223c52
    Will Deacon authored
    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: default avatarMark Rutland <mark.rutland@arm.com>
    Signed-off-by: default avatarWill Deacon <will@kernel.org>
    10223c52
barrier.h 4.18 KB