Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

locking/spinlocks: Remove the unused spin_lock_bh_nested() API

The spin_lock_bh_nested() API is defined but is not used anywhere
in the kernel. So all spin_lock_bh_nested() and related APIs are
now removed.

Signed-off-by: Waiman Long <longman@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1483975612-16447-1-git-send-email-longman@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>

authored by

Waiman Long and committed by
Ingo Molnar
607904c3 ba836a6f

-19
-8
include/linux/spinlock.h
··· 180 180 #ifdef CONFIG_DEBUG_LOCK_ALLOC 181 181 # define raw_spin_lock_nested(lock, subclass) \ 182 182 _raw_spin_lock_nested(lock, subclass) 183 - # define raw_spin_lock_bh_nested(lock, subclass) \ 184 - _raw_spin_lock_bh_nested(lock, subclass) 185 183 186 184 # define raw_spin_lock_nest_lock(lock, nest_lock) \ 187 185 do { \ ··· 195 197 # define raw_spin_lock_nested(lock, subclass) \ 196 198 _raw_spin_lock(((void)(subclass), (lock))) 197 199 # define raw_spin_lock_nest_lock(lock, nest_lock) _raw_spin_lock(lock) 198 - # define raw_spin_lock_bh_nested(lock, subclass) _raw_spin_lock_bh(lock) 199 200 #endif 200 201 201 202 #if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK) ··· 312 315 #define spin_lock_nested(lock, subclass) \ 313 316 do { \ 314 317 raw_spin_lock_nested(spinlock_check(lock), subclass); \ 315 - } while (0) 316 - 317 - #define spin_lock_bh_nested(lock, subclass) \ 318 - do { \ 319 - raw_spin_lock_bh_nested(spinlock_check(lock), subclass);\ 320 318 } while (0) 321 319 322 320 #define spin_lock_nest_lock(lock, nest_lock) \
-2
include/linux/spinlock_api_smp.h
··· 22 22 void __lockfunc _raw_spin_lock(raw_spinlock_t *lock) __acquires(lock); 23 23 void __lockfunc _raw_spin_lock_nested(raw_spinlock_t *lock, int subclass) 24 24 __acquires(lock); 25 - void __lockfunc _raw_spin_lock_bh_nested(raw_spinlock_t *lock, int subclass) 26 - __acquires(lock); 27 25 void __lockfunc 28 26 _raw_spin_lock_nest_lock(raw_spinlock_t *lock, struct lockdep_map *map) 29 27 __acquires(lock);
-1
include/linux/spinlock_api_up.h
··· 57 57 58 58 #define _raw_spin_lock(lock) __LOCK(lock) 59 59 #define _raw_spin_lock_nested(lock, subclass) __LOCK(lock) 60 - #define _raw_spin_lock_bh_nested(lock, subclass) __LOCK(lock) 61 60 #define _raw_read_lock(lock) __LOCK(lock) 62 61 #define _raw_write_lock(lock) __LOCK(lock) 63 62 #define _raw_spin_lock_bh(lock) __LOCK_BH(lock)
-8
kernel/locking/spinlock.c
··· 363 363 } 364 364 EXPORT_SYMBOL(_raw_spin_lock_nested); 365 365 366 - void __lockfunc _raw_spin_lock_bh_nested(raw_spinlock_t *lock, int subclass) 367 - { 368 - __local_bh_disable_ip(_RET_IP_, SOFTIRQ_LOCK_OFFSET); 369 - spin_acquire(&lock->dep_map, subclass, 0, _RET_IP_); 370 - LOCK_CONTENDED(lock, do_raw_spin_trylock, do_raw_spin_lock); 371 - } 372 - EXPORT_SYMBOL(_raw_spin_lock_bh_nested); 373 - 374 366 unsigned long __lockfunc _raw_spin_lock_irqsave_nested(raw_spinlock_t *lock, 375 367 int subclass) 376 368 {