]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
genirq/generic-chip: Make locking unconditional
authorThomas Gleixner <tglx@linutronix.de>
Thu, 13 Mar 2025 14:31:15 +0000 (15:31 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Mon, 7 Apr 2025 07:43:19 +0000 (09:43 +0200)
The SMP conditional wrappers around raw_spin_[un]lock() have no real
value. On !SMP kernels the lock operations are NOOPs except for a
preempt_disable/enable() pair on PREEMPT enabled kernels, which are not
really worth to optimize for. Aside of that this evades lockdep on !SMP
kernels.

Remove the !SMP stubs and make it unconditional.

No functional change.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20250313142524.011345765@linutronix.de
include/linux/irq.h

index dd5df1e2d032d8b857b4d952ba860116215ecfa1..5007729432078835773fd199d7e63b7713ddce13 100644 (file)
@@ -1222,7 +1222,6 @@ static inline struct irq_chip_type *irq_data_get_chip_type(struct irq_data *d)
 
 #define IRQ_MSK(n) (u32)((n) < 32 ? ((1 << (n)) - 1) : UINT_MAX)
 
-#ifdef CONFIG_SMP
 static inline void irq_gc_lock(struct irq_chip_generic *gc)
 {
        raw_spin_lock(&gc->lock);
@@ -1232,10 +1231,6 @@ static inline void irq_gc_unlock(struct irq_chip_generic *gc)
 {
        raw_spin_unlock(&gc->lock);
 }
-#else
-static inline void irq_gc_lock(struct irq_chip_generic *gc) { }
-static inline void irq_gc_unlock(struct irq_chip_generic *gc) { }
-#endif
 
 /*
  * The irqsave variants are for usage in non interrupt code. Do not use