Michael Ellerman b5fa0f7f88 powerpc: Fix build failure with clang due to BUILD_BUG_ON()
Anton says: In commit 4db7327194db ("powerpc: Add option to use jump
label for cpu_has_feature()") and commit c12e6f24d413 ("powerpc: Add
option to use jump label for mmu_has_feature()") we added:

  BUILD_BUG_ON(!__builtin_constant_p(feature))

to cpu_has_feature() and mmu_has_feature() in order to catch usage
issues (such as cpu_has_feature(cpu_has_feature(X), which has happened
once in the past). Unfortunately LLVM isn't smart enough to resolve
this, and it errors out.

I work around it in my clang/LLVM builds of the kernel, but I have just
discovered that it causes a lot of issues for the bcc (eBPF) trace tool
(which uses LLVM).

For now just #ifdef it away for clang builds.

Fixes: 4db7327194db ("powerpc: Add option to use jump label for cpu_has_feature()")
Fixes: c12e6f24d413 ("powerpc: Add option to use jump label for mmu_has_feature()")
Cc: stable@vger.kernel.org # v4.8+
Reported-by: Anton Blanchard <anton@samba.org>
Tested-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2017-01-25 13:36:10 +11:00
..
2016-01-12 20:46:53 +02:00
2015-07-13 10:10:54 +10:00
2013-04-18 13:03:53 +10:00
2015-05-28 15:31:53 +02:00
2016-06-21 15:30:56 +10:00
2014-04-09 12:53:28 +10:00
2012-03-28 18:30:02 +01:00
2011-11-08 14:51:46 +11:00
2014-06-25 18:49:40 -05:00
2015-01-12 05:04:13 -08:00
2015-02-03 18:47:18 +01:00
2016-03-04 23:50:27 -06:00
2014-11-03 12:12:32 +11:00
2016-09-09 16:18:07 +10:00
2016-03-01 19:27:20 +11:00
2015-02-23 14:52:04 +11:00
2016-08-05 09:00:54 -04:00
2016-08-07 23:50:09 -04:00
2011-07-26 16:49:47 -07:00
2013-12-09 11:40:25 +11:00
2016-08-05 09:00:54 -04:00
2016-09-20 20:57:12 +10:00
2016-05-11 21:53:49 +10:00
2016-06-14 13:58:26 +10:00
2016-10-07 20:19:31 -07:00
2016-12-16 09:26:42 -08:00
2016-06-14 13:58:26 +10:00
2016-06-14 13:58:26 +10:00
2016-11-24 22:14:52 +11:00
2013-11-06 14:13:49 +11:00
2012-09-17 16:31:51 +10:00
2016-07-21 18:51:42 +10:00
2016-06-14 13:58:26 +10:00
2014-02-17 11:19:37 +11:00
2015-05-05 13:35:39 -06:00