diff mbox series

[v2] bit_spinlock: Include <linux/processor.h>

Message ID efd8783178f9d15e6d57f10e2e5090a14d5bc923.1673381735.git.christophe.jaillet@wanadoo.fr
State New
Headers show
Series [v2] bit_spinlock: Include <linux/processor.h> | expand

Commit Message

Christophe JAILLET Jan. 10, 2023, 8:21 p.m. UTC
In an attempt to simplify some includes in <include/dcache.h>, it
appeared, when compiling fs/ecryptfs/dentry.c, that <linux/bit_spinlock.h>
was relying on other includes to get the definition of cpu_relax().
(see [1])

It broke on ARC.

Include <linux/processor.h> in <linux/bit_spinlock.h> to fix the issue.
This will help to remove some un-needed includes from <include/dcache.h>.

[1]: https://lore.kernel.org/all/202301082130.LXMj5qkD-lkp@intel.com/

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
Change in v2:
  - include <linux/processor.h> instead of <asm/processor.h>   (Andrew Morton)
  
v1:
https://lore.kernel.org/all/8b81101d59a31f4927016c17e49be96754a23380.1673204461.git.christophe.jaillet@wanadoo.fr/
---
 include/linux/bit_spinlock.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/include/linux/bit_spinlock.h b/include/linux/bit_spinlock.h
index bbc4730a6505..4e3b407963f6 100644
--- a/include/linux/bit_spinlock.h
+++ b/include/linux/bit_spinlock.h
@@ -4,9 +4,9 @@ 
 
 #include <linux/kernel.h>
 #include <linux/preempt.h>
+#include <linux/processor.h>
 #include <linux/atomic.h>
 #include <linux/bug.h>
-
 /*
  *  bit-based spin_lock()
  *