From 2b4558b3b1a5c4c2b66ab6519b4078962392fc0b Mon Sep 17 00:00:00 2001 From: zr_yy Date: Sat, 3 Jun 2023 16:06:09 +0800 Subject: [PATCH 1/2] genirq: Disable irqpoll on -rt commit 672f4d8462083915084e695c9ed600d32fbfcd52 upstream. Creates long latencies for no value Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner --- kernel/irq/spurious.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/kernel/irq/spurious.c b/kernel/irq/spurious.c index d867d6ddafdd..cd12ee86c01e 100644 --- a/kernel/irq/spurious.c +++ b/kernel/irq/spurious.c @@ -442,6 +442,10 @@ MODULE_PARM_DESC(noirqdebug, "Disable irq lockup detection when true"); static int __init irqfixup_setup(char *str) { +#ifdef CONFIG_PREEMPT_RT_BASE + pr_warn("irqfixup boot option not supported w/ CONFIG_PREEMPT_RT_BASE\n"); + return 1; +#endif irqfixup = 1; printk(KERN_WARNING "Misrouted IRQ fixup support enabled.\n"); printk(KERN_WARNING "This may impact system performance.\n"); @@ -454,6 +458,10 @@ module_param(irqfixup, int, 0644); static int __init irqpoll_setup(char *str) { +#ifdef CONFIG_PREEMPT_RT_BASE + pr_warn("irqpoll boot option not supported w/ CONFIG_PREEMPT_RT_BASE\n"); + return 1; +#endif irqfixup = 2; printk(KERN_WARNING "Misrouted IRQ fixup and polling support " "enabled\n"); -- Gitee From 1f49e01b25e1e4e9420e78f360b5527fd5749b35 Mon Sep 17 00:00:00 2001 From: zr_yy Date: Sat, 3 Jun 2023 16:06:37 +0800 Subject: [PATCH 2/2] genirq: Force interrupt thread on RT commit a2049c3364eae5d13eaaa22d9212c631faf58236 upstream. Force threaded_irqs and optimize the code (force_irqthreads) in regard to this. Signed-off-by: Thomas Gleixner --- include/linux/interrupt.h | 4 ++++ kernel/irq/manage.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 79bc3ef03701..119960618dd1 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h @@ -451,7 +451,11 @@ extern int irq_set_irqchip_state(unsigned int irq, enum irqchip_irq_state which, bool state); #ifdef CONFIG_IRQ_FORCED_THREADING +# ifdef CONFIG_PREEMPT_RT_BASE +# define force_irqthreads (true) +# else extern bool force_irqthreads; +# endif #else #define force_irqthreads (0) #endif diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index c546ccfda8c1..35eb5dde8a06 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -24,6 +24,7 @@ #include "internals.h" #ifdef CONFIG_IRQ_FORCED_THREADING +# ifndef CONFIG_PREEMPT_RT_BASE __read_mostly bool force_irqthreads; EXPORT_SYMBOL_GPL(force_irqthreads); @@ -33,6 +34,7 @@ static int __init setup_forced_irqthreads(char *arg) return 0; } early_param("threadirqs", setup_forced_irqthreads); +# endif #endif static void __synchronize_hardirq(struct irq_desc *desc, bool sync_chip) -- Gitee