]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Use BUILD_BUG_ON_MSG() for unsupported {cmp}xchg sizes
authorpan xinhui <xinhui.pan@linux.vnet.ibm.com>
Tue, 23 Feb 2016 11:05:01 +0000 (19:05 +0800)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 24 Feb 2016 09:08:48 +0000 (20:08 +1100)
commitd8af2a15e33a28d3743eb780f9c41f5b939e10a1
tree5ab67c34061bb141ec4a6e231ebfd01d4d08faef
parent8f9353e2d0ffb40012ebc74b55b2a5e3f3aa18a9
powerpc: Use BUILD_BUG_ON_MSG() for unsupported {cmp}xchg sizes

__xchg_called_with_bad_pointer() can't tell us which code uses {cmp}xchg
with an unsupported size, and no error is reported until the link stage.

To make such problems easier to debug, use BUILD_BUG_ON_MSG() instead.

Signed-off-by: pan xinhui <xinhui.pan@linux.vnet.ibm.com>
[mpe: Tweak change log wording & add relaxed/acquire]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
fixup
arch/powerpc/include/asm/cmpxchg.h