Re: [PATCH 02/32] locking/lockdep: Introduce struct lock_usage

2019-02-13 Thread Frederic Weisbecker
On Tue, Feb 12, 2019 at 09:38:42AM -0800, Linus Torvalds wrote: > On Tue, Feb 12, 2019 at 9:14 AM Frederic Weisbecker > wrote: > > > > +static u64 lock_usage_mask(struct lock_usage *usage) > > +{ > > + return BIT(usage->bit); > > +} > > More insane "u64" - and it's *incorrect* too. > >

Re: [PATCH 02/32] locking/lockdep: Introduce struct lock_usage

2019-02-12 Thread Linus Torvalds
On Tue, Feb 12, 2019 at 9:14 AM Frederic Weisbecker wrote: > > +static u64 lock_usage_mask(struct lock_usage *usage) > +{ > + return BIT(usage->bit); > +} More insane "u64" - and it's *incorrect* too. #define BIT(nr)(1UL << (nr)) fundamentally means that "BIT()" ca

[PATCH 02/32] locking/lockdep: Introduce struct lock_usage

2019-02-12 Thread Frederic Weisbecker
In order to support softirq per-vector locking validation, we could simply iterate over all enabled vectors and perform separate validation for all of them on every lock event. We can expect that to introduce a severe performance penalty though. Therefore, we instead plan to validate the LOCK_USED