[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241119104339.2112455-3-andriy.shevchenko@linux.intel.com>
Date: Tue, 19 Nov 2024 12:42:35 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: linux-kernel@...r.kernel.org,
llvm@...ts.linux.dev
Cc: Thomas Gleixner <tglx@...utronix.de>,
Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Bill Wendling <morbo@...gle.com>,
Justin Stitt <justinstitt@...gle.com>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Subject: [PATCH v1 2/2] genirq: Reuse irq_thread_fn() for forced thread case
The irq_forced_thread_fn() uses the same action callback
as the non-forced variant but with different locking decorations.
Reuse irq_thread_fn() here to make that clear.
bloat-o-meter statistics on x86_64 (GCC-13, clang-18 shows no difference):
Function old new delta
irq_forced_thread_fn 118 55 -63
Total: Before=13845, After=13782, chg -0.46%
Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
---
kernel/irq/manage.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 310fbeed4d7a..2d9993f86fde 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -1213,11 +1213,7 @@ irq_forced_thread_fn(struct irq_desc *desc, struct irqaction *action)
local_bh_disable();
if (!IS_ENABLED(CONFIG_PREEMPT_RT))
local_irq_disable();
- ret = action->thread_fn(action->irq, action->dev_id);
- if (ret == IRQ_HANDLED)
- atomic_inc(&desc->threads_handled);
-
- irq_finalize_oneshot(desc, action);
+ ret = irq_thread_fn(desc, action);
if (!IS_ENABLED(CONFIG_PREEMPT_RT))
local_irq_enable();
local_bh_enable();
--
2.43.0.rc1.1336.g36b5255a03ac
Powered by blists - more mailing lists