From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org, Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH] linux/interrupt.h: allow "guard" notation to disable and reenable IRQ
Date: Thu, 6 Jun 2024 14:45:31 -0700 [thread overview]
Message-ID: <ZmIt-3uiNedKxMkR@google.com> (raw)
In-Reply-To: <Zl9_RsKZNYPpmGJ4@google.com>
On Tue, Jun 04, 2024 at 01:55:34PM -0700, Dmitry Torokhov wrote:
> On Tue, Jun 04, 2024 at 08:51:06PM +0200, Thomas Gleixner wrote:
> > On Thu, May 30 2024 at 11:07, Dmitry Torokhov wrote:
> > > Drivers often need to first disable an interrupt, carry out some
> > > action, and then reenable the interrupt. Introduce support for the
> > > "guard" notation for this so that the following is possible:
> > >
> > > ...
> > >
> > > scoped_cond_guard(mutex_intr, return -EINTR, &data->sysfs_mutex) {
> > > guard(disable_irq)(&client->irq);
> > >
> > > error = elan_acquire_baseline(data);
> > > if (error)
> > > return error;
> > > }
> > >
> > > ...
> > >
> > > Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> >
> > I assume you want to carry this through the input tree, so you can
> > modify the drivers.
> >
> > If so:
> >
> > Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
>
> Thanks Thomas. I'll stick this patch into an immutable branch off v6.9
> in case you (or someone else) wants to pull it in and start using it.
I made:
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git ib/6.9-disable-irq-guard
Thanks.
--
Dmitry
prev parent reply other threads:[~2024-06-06 21:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-30 18:07 [PATCH] linux/interrupt.h: allow "guard" notation to disable and reenable IRQ Dmitry Torokhov
2024-06-04 18:51 ` Thomas Gleixner
2024-06-04 20:55 ` Dmitry Torokhov
2024-06-06 21:45 ` Dmitry Torokhov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZmIt-3uiNedKxMkR@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox