Skip to content
Commit ddf50271 authored by Huacai Chen's avatar Huacai Chen
Browse files

LoongArch: Mark __xchg() and __cmpxchg() as __always_inline



Commit ac7c3e4f ("compiler: enable CONFIG_OPTIMIZE_INLINING
forcibly") allows compiler to uninline functions marked as 'inline'.
In case of __xchg()/__cmpxchg() this would cause to reference
BUILD_BUG(), which is an error case for catching bugs and will not
happen for correct code, if __xchg()/__cmpxchg() is inlined.

This bug can be produced with CONFIG_DEBUG_SECTION_MISMATCH enabled,
and the solution is similar to below commits:
46f16195 ("MIPS: include: Mark __xchg as __always_inline"),
88356d09 ("MIPS: include: Mark __cmpxchg as __always_inline").

Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
parent 1299a129
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment