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

Revert "locking/local_lock: Make the empty local_lock_*() function a macro."

With volatile removed from arch_raw_cpu_ptr() the compiler no longer
creates the per-CPU reference. The usage of the macro can be reverted
now.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20220328145810.86783-3-bigeasy@linutronix.de

authored by

Sebastian Andrzej Siewior and committed by
Peter Zijlstra
2d2f8f08 1c1e7e3c

+3 -3
+3 -3
include/linux/local_lock_internal.h
··· 44 44 } 45 45 #else /* CONFIG_DEBUG_LOCK_ALLOC */ 46 46 # define LOCAL_LOCK_DEBUG_INIT(lockname) 47 - # define local_lock_acquire(__ll) do { typecheck(local_lock_t *, __ll); } while (0) 48 - # define local_lock_release(__ll) do { typecheck(local_lock_t *, __ll); } while (0) 49 - # define local_lock_debug_init(__ll) do { typecheck(local_lock_t *, __ll); } while (0) 47 + static inline void local_lock_acquire(local_lock_t *l) { } 48 + static inline void local_lock_release(local_lock_t *l) { } 49 + static inline void local_lock_debug_init(local_lock_t *l) { } 50 50 #endif /* !CONFIG_DEBUG_LOCK_ALLOC */ 51 51 52 52 #define INIT_LOCAL_LOCK(lockname) { LOCAL_LOCK_DEBUG_INIT(lockname) }