Re: [PATCH v5 14/18] rust: Introduce interrupt module

Boqun Feng <[email protected]>
Newsgroups org.kernel.vger.rust-for-linux,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Mon, Aug 10, 2026 at 10:57:53AM +0200, Peter Zijlstra wrote:
> On Fri, Aug 07, 2026 at 12:02:11AM -0700, Boqun Feng wrote:
> > diff --git a/rust/helpers/interrupt.c b/rust/helpers/interrupt.c
> > new file mode 100644
> > index 000000000000..51b319bd4c00
> > --- /dev/null
> > +++ b/rust/helpers/interrupt.c
> > @@ -0,0 +1,18 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +
> > +#include <linux/spinlock.h>
> > +
> > +__rust_helper void rust_helper_local_interrupt_disable(void)
> > +{
> > +	local_interrupt_disable();
> > +}
> > +
> > +__rust_helper void rust_helper_local_interrupt_enable(void)
> > +{
> > +	local_interrupt_enable();
> > +}
> > +
> > +__rust_helper bool rust_helper_irqs_disabled(void)
> > +{
> > +	return irqs_disabled();
> > +}
> 
> This last one doesn't appear used in this patch; can I remove it?

Yes. Previously this function was used for debugging, but we have moved
to lockdep_assert_irqs_disabled(), so it's no longer used.

Regards,
Boqun
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.