mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Ahmed S. Darwish" <darwi@linutronix.de>
To: Mike Schanne <mschanne@kns.com>
Cc: "'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>,
	'Sebastian Andrzej Siewior' <bigeasy@linutronix.de>,
	'Thomas Gleixner' <tglx@linutronix.de>,
	'Steven Rostedt' <rostedt@goodmis.org>,
	"'chris.packham@alliedtelesis.co.nz'"
	<chris.packham@alliedtelesis.co.nz>,
	Todd Leitzel <tleitzel@kns.com>
Subject: Re: [PATCH] uio: eliminate extraneous irq thread under CONFIG_PREEMPT_RT
Date: Tue, 25 Aug 2026 12:45:18 +0200	[thread overview]
Message-ID: <ao1yPl-FiYjMV20u@lx-t490> (raw)
In-Reply-To: <TY0PR0101MB48676D503A7F6C5CAC112B3BD2A52@TY0PR0101MB4867.apcprd01.prod.exchangelabs.com>

On Wed, 19 Aug 2026, Mike Schanne wrote:
> @@ -1038,8 +1042,13 @@ int __uio_register_device(struct module *owner,
>                  * FDs at the time of unregister and therefore may not be
>                  * freed until they are released.
>                  */
> -               ret = request_threaded_irq(info->irq, uio_interrupt_handler, uio_interrupt_thread,
> -                                          info->irq_flags, info->name, idev);
> +               if (IS_ENABLED(CONFIG_PREEMPT_RT)) {
> +                       ret = request_irq(info->irq, uio_interrupt_handler,
> +                               info->irq_flags, info->name, idev);
> +               } else {
> +                       ret = request_threaded_irq(info->irq, uio_interrupt_handler, uio_interrupt_thread,
> +                               info->irq_flags, info->name, idev);
> +               }
>

There should be a better way to do this.

The whole point of PREEMPT_RT is not to add random conditionals like that
inside drivers code.

Thanks,
Ahmed

  reply	other threads:[~2026-08-25 10:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-19 15:06 Mike Schanne
2026-08-25 10:45 ` Ahmed S. Darwish [this message]
     [not found] <TY0PR0101MB48672132B8525B7B39565EE4D2A52@TY0PR0101MB4867.apcprd01.prod.exchangelabs.com>
2026-08-19 15:06 ` Sebastian Andrzej Siewior
2026-08-19 20:48   ` Chris Packham
2026-08-20 14:12     ` Sebastian Andrzej Siewior
2026-08-25 12:44       ` 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=ao1yPl-FiYjMV20u@lx-t490 \
    --to=darwi@linutronix.de \
    --cc=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®