[tip: irq/core] genirq: Disable irqfixup/poll on PREEMPT_RT.

From: tip-bot2 for Ingo Molnar
Date: Sun Sep 19 2021 - 17:04:02 EST


The following commit has been merged into the irq/core branch of tip:

Commit-ID: b70e13885cf63b6f99cbd9a1dbb6beaa2622bf68
Gitweb: https://git.kernel.org/tip/b70e13885cf63b6f99cbd9a1dbb6beaa2622bf68
Author: Ingo Molnar <mingo@xxxxxxxxxx>
AuthorDate: Fri, 03 Jul 2009 08:29:57 -05:00
Committer: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
CommitterDate: Sun, 19 Sep 2021 23:01:15 +02:00

genirq: Disable irqfixup/poll on PREEMPT_RT.

The support for misrouted IRQs is used on old / legacy systems and is
not feasible on PREEMPT_RT.

Polling for interrupts reduces the overall system performance.
Additionally the interrupt latency depends on the polling frequency and
delays are not desired for real time workloads.

Disable IRQ polling on PREEMPT_RT and let the user know that it is not
enabled. The compiler will optimize the real fixup/poll code out.

[ bigeasy: Update changelog and switch to IS_ENABLED() ]

Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Link: https://lore.kernel.org/r/20210917223841.c6j6jcaffojrnot3@xxxxxxxxxxxxx
---
kernel/irq/spurious.c | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c
index c481d84..02b2daf 100644
--- a/kernel/irq/spurious.c
+++ b/kernel/irq/spurious.c
@@ -447,6 +447,10 @@ MODULE_PARM_DESC(noirqdebug, "Disable irq lockup detection when true");

static int __init irqfixup_setup(char *str)
{
+ if (IS_ENABLED(CONFIG_PREEMPT_RT)) {
+ pr_warn("irqfixup boot option not supported with PREEMPT_RT\n");
+ return 1;
+ }
irqfixup = 1;
printk(KERN_WARNING "Misrouted IRQ fixup support enabled.\n");
printk(KERN_WARNING "This may impact system performance.\n");
@@ -459,6 +463,10 @@ module_param(irqfixup, int, 0644);

static int __init irqpoll_setup(char *str)
{
+ if (IS_ENABLED(CONFIG_PREEMPT_RT)) {
+ pr_warn("irqpoll boot option not supported with PREEMPT_RT\n");
+ return 1;
+ }
irqfixup = 2;
printk(KERN_WARNING "Misrouted IRQ fixup and polling support "
"enabled\n");