mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-10-14 05:55:17 +00:00
LoongArch: Mark __xchg() and __cmpxchg() as __always_inline
Commitac7c3e4ff4("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:46f1619500("MIPS: include: Mark __xchg as __always_inline"),88356d0990("MIPS: include: Mark __cmpxchg as __always_inline"). Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
This commit is contained in:
parent
1299a129a9
commit
ddf502717d
1 changed files with 4 additions and 4 deletions
Loading…
Add table
Add a link
Reference in a new issue