Re: BUILD_BUG_ON(!__builtin_constant_p(feature)) breaks bcc trace tool

2017-01-25 Thread Arnd Bergmann
On Wed, Jan 25, 2017 at 11:35 AM, David Laight wrote: > From: Michael Ellerman >> #define inlineinline __attribute__((always_inline)) >> notrace >> >> So in fact every inline function is marked always_inline all the time, >> which seems dubious.

RE: BUILD_BUG_ON(!__builtin_constant_p(feature)) breaks bcc trace tool

2017-01-25 Thread David Laight
From: Michael Ellerman > Sent: 24 January 2017 06:16 > Anton Blanchard writes: > >> 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

Re: BUILD_BUG_ON(!__builtin_constant_p(feature)) breaks bcc trace tool

2017-01-24 Thread Naveen N. Rao
On 2017/01/24 04:36PM, Michael Ellerman wrote: > Anton Blanchard writes: > > 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)).

Re: BUILD_BUG_ON(!__builtin_constant_p(feature)) breaks bcc trace tool

2017-01-24 Thread Arnd Bergmann
On Tue, Jan 24, 2017 at 7:15 AM, Michael Ellerman wrote: > Hmm, in fact it seems because we don't define > CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING and CONFIG_OPTIMIZE_INLINING, we > get: > > #define inline inline __attribute__((always_inline)) notrace > >

Re: BUILD_BUG_ON(!__builtin_constant_p(feature)) breaks bcc trace tool

2017-01-23 Thread Michael Ellerman
Anton Blanchard writes: >> 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,

Re: BUILD_BUG_ON(!__builtin_constant_p(feature)) breaks bcc trace tool

2017-01-23 Thread Michael Ellerman
Anton Blanchard writes: > 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

Re: BUILD_BUG_ON(!__builtin_constant_p(feature)) breaks bcc trace tool

2017-01-21 Thread Anton Blanchard
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

BUILD_BUG_ON(!__builtin_constant_p(feature)) breaks bcc trace tool

2017-01-20 Thread Anton Blanchard
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