From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Chris Packham <Chris.Packham@alliedtelesis.co.nz>
Cc: Mike Schanne <mschanne@kns.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
LKML <linux-kernel@vger.kernel.org>,
"linux-rt-devel@lists.linux.dev" <linux-rt-devel@lists.linux.dev>,
linux-rt-users <linux-rt-users@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
Steven Rostedt <rostedt@goodmis.org>,
Todd Leitzel <tleitzel@kns.com>
Subject: Re: [PATCH] uio: eliminate extraneous irq thread under CONFIG_PREEMPT_RT
Date: Thu, 20 Aug 2026 16:12:22 +0200 [thread overview]
Message-ID: <20260820141222.gPkfKLpT@linutronix.de> (raw)
In-Reply-To: <5943e7e5-9578-42a1-b693-d79f9eef88f0@alliedtelesis.co.nz>
On 2026-08-19 20:48:51 [+0000], Chris Packham wrote:
> Hi Sebastian,
Hi Chris,
> On 20/08/2026 03:06, Sebastian Andrzej Siewior wrote:
> > Chris, what was the use case to split this?
>
> I was dealing with having a UIO interrupt for an input on a PCA9539.
> There's some more info on the original email thread[1] but basically
> because the PCA9539 inputs are nested __setup_irq() enforces that anyone
> requesting them does so with a threaded interrupt.
>
> https://lore.kernel.org/all/20240408234050.2056374-3-chris.packham@alliedtelesis.co.nz/
so you wrote:
| Prior to this the UIO registration fails with:
|
| [ 6.484699] uio_pdrv_genirq detect-gpio-9: unable to register uio device
| [ 6.484722] uio_pdrv_genirq detect-gpio-9: probe with driver uio_pdrv_genirq failed with error -22
|
| The -EINVAL ultimately comes from __setup_irq() where it knows the
| interrupt descriptor is nested but we haven't provided a thread_fn.
So we talk about this piece of kernel/irq/manage.c:
| /*
| * Check whether the interrupt nests into another interrupt
| * thread.
| */
| nested = irq_settings_is_nested_thread(desc);
| if (nested) {
| if (!new->thread_fn) {
| ret = -EINVAL;
| goto out_mput;
| }
| /*
| * Replace the primary handler which was provided from
| * the driver for non nested interrupt handling by the
| * dummy function which warns when called.
| */
| new->handler = irq_nested_primary_handler;
| } else {
If so, you realize that uio_interrupt_handler() isn't called at all?
Sebastian
next prev parent reply other threads:[~2026-08-20 14:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <TY0PR0101MB48672132B8525B7B39565EE4D2A52@TY0PR0101MB4867.apcprd01.prod.exchangelabs.com>
2026-08-19 15:06 ` [PATCH] uio: eliminate extraneous irq thread under CONFIG_PREEMPT_RT Sebastian Andrzej Siewior
2026-08-19 20:48 ` Chris Packham
2026-08-20 14:12 ` Sebastian Andrzej Siewior [this message]
2026-08-25 12:44 ` Sebastian Andrzej Siewior
2026-08-19 15:06 Mike Schanne
2026-08-25 10:45 ` Ahmed S. Darwish
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=20260820141222.gPkfKLpT@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=Chris.Packham@alliedtelesis.co.nz \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-devel@lists.linux.dev \
--cc=linux-rt-users@vger.kernel.org \
--cc=mschanne@kns.com \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=tleitzel@kns.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.