[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Mon, 10 Oct 2022 14:04:52 +0200
From: "Arnd Bergmann" <arnd@...db.de>
To: "Huacai Chen" <chenhuacai@...ngson.cn>,
"Huacai Chen" <chenhuacai@...nel.org>
Cc: loongarch@...ts.linux.dev, Linux-Arch <linux-arch@...r.kernel.org>,
"Xuefeng Li" <lixuefeng@...ngson.cn>, guoren <guoren@...nel.org>,
"WANG Xuerui" <kernel@...0n.name>,
"Jiaxun Yang" <jiaxun.yang@...goat.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] LoongArch: Mark __xchg() and __cmpxchg() as __always_inline
On Mon, Oct 10, 2022, at 1:56 PM, Huacai Chen wrote:
> Commit ac7c3e4ff401 ("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:
> 46f1619500d0225 ("MIPS: include: Mark __xchg as __always_inline"),
> 88356d09904bc60 ("MIPS: include: Mark __cmpxchg as __always_inline").
>
> Signed-off-by: Huacai Chen <chenhuacai@...ngson.cn>
Looks good to me,
Acked-by: Arnd Bergmann <arnd@...db.de>
Powered by blists - more mailing lists