[RFC,1/6] softirq: Turn set_softirq_pending() to reset_softirq_pending()

Message ID 20230801132441.559222-2-frederic@kernel.org
State New
Headers
Series softirq: Start pushing down the big softirq lock |

Commit Message

Frederic Weisbecker Aug. 1, 2023, 1:24 p.m. UTC
  set_softirq_pending() is only ever used to reset the pending vector's
mask to 0. Make the function more specialized for that very purpose and
rename it accordingly.

Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
---
 include/linux/interrupt.h | 2 +-
 kernel/softirq.c          | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index bf82980f569d..2099fe3980bc 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -524,7 +524,7 @@  DECLARE_STATIC_KEY_FALSE(force_irqthreads_key);
 #endif
 
 #define local_softirq_pending()	(__this_cpu_read(local_softirq_pending_ref))
-#define set_softirq_pending(x)	(__this_cpu_write(local_softirq_pending_ref, (x)))
+#define reset_softirq_pending()	(__this_cpu_write(local_softirq_pending_ref, 0))
 #define or_softirq_pending(x)	(__this_cpu_or(local_softirq_pending_ref, (x)))
 
 #endif /* local_softirq_pending */
diff --git a/kernel/softirq.c b/kernel/softirq.c
index 623985f18833..1a3c3fe341ea 100644
--- a/kernel/softirq.c
+++ b/kernel/softirq.c
@@ -532,7 +532,7 @@  asmlinkage __visible void __softirq_entry __do_softirq(void)
 
 restart:
 	/* Reset the pending bitmask before enabling irqs */
-	set_softirq_pending(0);
+	reset_softirq_pending();
 
 	local_irq_enable();