On Fri, Dec 04, 2020 at 06:01:55PM +0100, Thomas Gleixner wrote: > +static void __local_bh_enable(unsigned int cnt, bool unlock) > +{ > + unsigned long flags; > + int newcnt; > + > + DEBUG_LOCKS_WARN_ON(current->softirq_disable_cnt != > + this_cpu_read(softirq_ctrl.cnt));
Less important since it's debug code, but still can be __this_cpu_read(). > + > + if (IS_ENABLED(CONFIG_TRACE_IRQFLAGS) && softirq_count() == cnt) { > + raw_local_irq_save(flags); > + lockdep_softirqs_on(_RET_IP_); > + raw_local_irq_restore(flags); > + } > + > + newcnt = __this_cpu_sub_return(softirq_ctrl.cnt, cnt); > + current->softirq_disable_cnt = newcnt; > + > + if (!newcnt && unlock) { > + rcu_read_unlock(); > + local_unlock(&softirq_ctrl.lock); > + } > +} > + > +static inline bool should_wake_ksoftirqd(void) > +{ > + return !this_cpu_read(softirq_ctrl.cnt); And that too. Other than these boring details: Reviewed-by: Frederic Weisbecker <frede...@kernel.org> Thanks.