On 2017-09-05 11:17:13 [+0200], To Jacek Konieczny wrote: > I'm sorry, I missed that. What about this on-top? > > diff --git a/include/linux/locallock.h b/include/linux/locallock.h > index eeb1a66df402..298afcd8e219 100644 > --- a/include/linux/locallock.h > +++ b/include/linux/locallock.h > @@ -61,6 +61,9 @@ static inline int __local_trylock(struct local_irq_lock *lv) > lv->owner = current; > lv->nestcnt = 1; > return 1; > + } else if (lv->owner == current) { > + lv->nestcnt++; > + return 1; > } > return 0; > } I am going to split up that part out in a separate patch and also add the !RT part to it. --- a/include/linux/locallock.h +++ b/include/linux/locallock.h @@ -68,6 +68,9 @@ static inline int __local_trylock(struct lv->owner = current; lv->nestcnt = 1; return 1; + } else if (lv->owner == current) { + lv->nestcnt++; + return 1; } return 0; } @@ -238,6 +241,12 @@ static inline int __local_unlock_irqrest static inline void local_irq_lock_init(int lvar) { } +#define local_trylock(lvar) \ + ({ \ + preempt_disable(); \ + 1; \ + }) + #define local_lock(lvar) preempt_disable() #define local_unlock(lvar) preempt_enable() #define local_lock_irq(lvar) local_irq_disable() -- To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html