ia64: Rewrite atomic_add and atomic_sub
authorMatthew Wilcox <mawilcox@microsoft.com>
Thu, 18 Jan 2018 21:52:17 +0000 (13:52 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 19 Jan 2018 18:47:51 +0000 (10:47 -0800)
commit4b664e739f7743f91e1d12ebfb7a76307ebea702
tree3fcda6df9410cb392a7a1ce7614d296b47840ec9
parent726ba84b50acf6f5816c1d854150612d2a511bab
ia64: Rewrite atomic_add and atomic_sub

Force __builtin_constant_p to evaluate whether the argument to atomic_add
& atomic_sub is constant in the front-end before optimisations which
can lead GCC to output a call to __bad_increment_for_ia64_fetch_and_add().

See GCC bugzilla 83653.

Signed-off-by: Jakub Jelinek <jakub@redhat.com>
Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/ia64/include/asm/atomic.h