Re: [PATCH] uio: eliminate extraneous irq thread under CONFIG_PREEMPT_RT

From: Ahmed S. Darwish

Date: Tue Aug 25 2026 - 06:53:08 EST


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