On 2019-02-28 18:12:25 [+0100], Frederic Weisbecker wrote: > --- a/include/linux/interrupt.h > +++ b/include/linux/interrupt.h > @@ -474,17 +474,62 @@ enum … > +static inline unsigned int local_softirq_pending(void) > +{ > + return local_softirq_data() & SOFTIRQ_PENDING_MASK; > +} …
I'm still digesting but… > +static inline void softirq_enabled_set(unsigned int enabled) > +{ > + unsigned int data; > + > + data = enabled << SOFTIRQ_ENABLED_SHIFT; > + data |= local_softirq_pending(); if an interrupt occurs at this point and invokes raise_softirq_irqof() => softirq_pending_set_mask() then we lose the pending bits, correct? This may be invoked from local_bh_enable() => local_bh_enable_ip_mask() => local_bh_enable_common() => softirq_enabled_set() and as far as I can, interrupts are only disabled in the tracing case. > + __this_cpu_write(local_softirq_data_ref, data); > +} Sebastian