linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* BUILD_BUG_ON(!__builtin_constant_p(feature)) breaks bcc trace tool
@ 2017-01-21  1:03 Anton Blanchard
  2017-01-21  9:49 ` Anton Blanchard
  2017-01-24  5:36 ` Michael Ellerman
  0 siblings, 2 replies; 8+ messages in thread
From: Anton Blanchard @ 2017-01-21  1:03 UTC (permalink / raw)
  To: Aneesh Kumar K.V, Benjamin Herrenschmidt, Paul Mackerras,
	Nicholas Piggin, Michael Ellerman
  Cc: linuxppc-dev

Hi,

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)). 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).

How should we work around this? Wrap the checks in !clang perhaps?

Anton

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-01-25 15:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-21  1:03 BUILD_BUG_ON(!__builtin_constant_p(feature)) breaks bcc trace tool Anton Blanchard
2017-01-21  9:49 ` Anton Blanchard
2017-01-24  6:15   ` Michael Ellerman
2017-01-24  9:45     ` Arnd Bergmann
2017-01-25 10:35     ` David Laight
2017-01-25 15:44       ` Arnd Bergmann
2017-01-24  5:36 ` Michael Ellerman
2017-01-24 10:47   ` Naveen N. Rao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).