Re: [PATCH 05/24] irq & spin_lock: Add counted interrupt disabling/enabling

Boqun Feng <[email protected]> Tue, 4 Aug 2026 05:50:46 -0700
Newsgroups org.kernel.vger.rust-for-linux,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Tue, Aug 04, 2026 at 09:33:16AM +0200, Peter Zijlstra wrote:
> On Tue, Aug 04, 2026 at 09:26:40AM +0200, Peter Zijlstra wrote:
> 
> > > > @@ -88,8 +89,17 @@ EXPORT_PER_CPU_SYMBOL_GPL(hardirqs_enabl
> > > >  EXPORT_PER_CPU_SYMBOL_GPL(hardirq_context);
> > > >  #endif
> > > >  
> > > > -DEFINE_PER_CPU(struct interrupt_disable_state, local_interrupt_disable_state);
> > > > -EXPORT_PER_CPU_SYMBOL_GPL(local_interrupt_disable_state);
> > > > +DEFINE_PER_CPU(unsigned long, local_interrupt_disable_state);
> > > > +
> > > > +void _local_interrupt_disable(void)
> > > > +{
> > > > +	__local_interrupt_disable();
> > > > +}
> > > > +
> > > > +void _local_interrupt_enable(void)
> > > > +{
> > > > +	__local_interrupt_enable();
> > > > +}
> > > >  
> > > 
> > > We need to EXPORT_SYMBOL_GPL() for these two functions.
> > > 
> > > Right?
> > 
> > Quite so.
> 
> Although, I suspect people will come and complain that this should be
> !GPL, it being something 'trivial' and all that nonsense, but we'll get
> there when we get there I suppose.

I haven't thought about the GPL part, but after a look, I think we
could do EXPORT_SYMBOL() (similar __local_bh_disable_ip) from the
get-go.

Regards,
Boqun