]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
bit_spinlock: Include missing <asm/processor.h>
authorMarco Elver <elver@google.com>
Fri, 19 Dec 2025 15:40:01 +0000 (16:40 +0100)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 5 Jan 2026 15:43:29 +0000 (16:43 +0100)
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
include/linux/bit_spinlock.h

index c0989b5b0407f4b016ca21b5b2358e17d00304ff..59e345f74b0e2f31ffa43656be0a4233d75b17b2 100644 (file)
@@ -7,6 +7,8 @@
 #include <linux/atomic.h>
 #include <linux/bug.h>
 
+#include <asm/processor.h>  /* for cpu_relax() */
+
 /*
  *  bit-based spin_lock()
  *