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

Configure Feed

Select the types of activity you want to include in your feed.

bit_spinlock: Include missing <asm/processor.h>

Including <linux/bit_spinlock.h> into an empty TU will result in the
compiler complaining:

./include/linux/bit_spinlock.h:34:4: error: call to undeclared function 'cpu_relax'; <...>
34 | cpu_relax();
| ^
1 error generated.

Include <asm/processor.h> to allow including bit_spinlock.h where
<asm/processor.h> is not otherwise included.

Signed-off-by: Marco Elver <elver@google.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Link: https://patch.msgid.link/20251219154418.3592607-13-elver@google.com

authored by

Marco Elver and committed by
Peter Zijlstra
5f7ba059 8f8a55f4

+2
+2
include/linux/bit_spinlock.h
··· 7 7 #include <linux/atomic.h> 8 8 #include <linux/bug.h> 9 9 10 + #include <asm/processor.h> /* for cpu_relax() */ 11 + 10 12 /* 11 13 * bit-based spin_lock() 12 14 *