From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Lukas Wunner <lukas@wunner.de>
Cc: linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>,
Bartosz Golaszewski <brgl@bgdev.pl>,
Basavaraj Natikar <Basavaraj.Natikar@amd.com>,
Hans de Goede <hdegoede@redhat.com>,
Linus Walleij <linus.walleij@linaro.org>,
Mark Gross <markgross@kernel.org>, Michael Buesch <m@bues.ch>,
Rafa?? Mi??ecki <zajec5@gmail.com>,
Shyam Sundar S K <Shyam-sundar.S-k@amd.com>,
linux-gpio@vger.kernel.org, linux-wireless@vger.kernel.org,
platform-driver-x86@vger.kernel.org
Subject: Re: [RFC PATCH] genirq: Provide generic_handle_domain_irq_safe().
Date: Mon, 16 May 2022 13:23:46 +0200 [thread overview]
Message-ID: <YoI0QiM4ntJP/9fQ@linutronix.de> (raw)
In-Reply-To: <20220516101814.GA18490@wunner.de>
On 2022-05-16 12:18:14 [+0200], Lukas Wunner wrote:
> On Mon, May 09, 2022 at 04:04:08PM +0200, Sebastian Andrzej Siewior wrote:
> > The problem with generic_handle_domain_irq() is that with `threadirqs'
> > it will trigger "WARN_ON_ONCE(!in_hardirq())".
>
> Now silenced by:
> https://git.kernel.org/linus/792ea6a074ae
>
>
> > +int generic_handle_domain_irq_safe(struct irq_domain *domain, unsigned int hwirq)
> > +{
> > + unsigned long flags;
> > + int ret;
> > +
> > + local_irq_save(flags);
> > + ret = handle_irq_desc(irq_resolve_mapping(domain, hwirq));
> > + local_irq_restore(flags);
> > + return ret;
> > +}
> > +EXPORT_SYMBOL_GPL(generic_handle_domain_irq_safe);
>
> AFAICS you don't need to disable hardirqs at least for the "threadirqs"
> case because irq_forced_thread_fn() already does that.
PREEMPT_RT does not disable interrupts. Also completions in softirq
won't disable interrupts.
>
> > drivers/bcma/driver_gpio.c | 2 +-
> > drivers/gpio/gpio-mlxbf2.c | 6 ++----
> > drivers/pinctrl/pinctrl-amd.c | 2 +-
> > drivers/platform/x86/intel/int0002_vgpio.c | 3 +--
> > drivers/ssb/driver_gpio.c | 6 ++++--
>
> From a quick look, the proper solution for all of those drivers is
> probably to just add IRQF_NO_THREAD and be done with it.
I think I mentioned that part in the commit description: IRQF_NO_THREAD
must be specified by all handlers of a shared interrupt. It is an option
for the handler that owns an interrupt exclusive.
> Thanks,
>
> Lukas
Sebastian
next prev parent reply other threads:[~2022-05-16 11:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-09 14:04 [RFC PATCH] genirq: Provide generic_handle_domain_irq_safe() Sebastian Andrzej Siewior
2022-05-16 10:18 ` Lukas Wunner
2022-05-16 11:23 ` Sebastian Andrzej Siewior [this message]
2022-09-19 13:25 ` [tip: irq/core] bcma: gpio: Use generic_handle_irq_safe() tip-bot2 for Sebastian Andrzej Siewior
2022-09-19 13:25 ` [tip: irq/core] gpio: mlxbf2: " tip-bot2 for Sebastian Andrzej Siewior
2022-09-19 13:25 ` [tip: irq/core] platform/x86: intel_int0002_vgpio: " tip-bot2 for Sebastian Andrzej Siewior
2022-09-19 13:25 ` [tip: irq/core] ssb: gpio: " tip-bot2 for Sebastian Andrzej Siewior
2022-09-19 13:25 ` [tip: irq/core] pinctrl: amd: " tip-bot2 for Sebastian Andrzej Siewior
2022-09-19 13:25 ` [tip: irq/core] genirq: Provide generic_handle_domain_irq_safe() tip-bot2 for Sebastian Andrzej Siewior
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=YoI0QiM4ntJP/9fQ@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=Basavaraj.Natikar@amd.com \
--cc=Shyam-sundar.S-k@amd.com \
--cc=brgl@bgdev.pl \
--cc=hdegoede@redhat.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=m@bues.ch \
--cc=markgross@kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=zajec5@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.