summaryrefslogtreecommitdiff
path: root/kernel/locking
diff options
context:
space:
mode:
authorDavid Laight <David.Laight@ACULAB.COM>2023-12-29 20:53:49 +0000
committerLinus Torvalds <torvalds@linux-foundation.org>2023-12-30 10:25:51 -0800
commit7c223098212957a1ecd8768e8e747ae2cf88e880 (patch)
tree5b971c46e74a4d0f405d2120e1c38bccff490773 /kernel/locking
parentf016f7547aeedefed9450499d002ba983b8fce15 (diff)
locking/osq_lock: Move the definition of optimistic_spin_node into osq_lock.c
struct optimistic_spin_node is private to the implementation. Move it into the C file to ensure nothing is accessing it. Signed-off-by: David Laight <david.laight@aculab.com> Acked-by: Waiman Long <longman@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/locking')
-rw-r--r--kernel/locking/osq_lock.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/locking/osq_lock.c b/kernel/locking/osq_lock.c
index d5610ad52b92..d414eef4bec6 100644
--- a/kernel/locking/osq_lock.c
+++ b/kernel/locking/osq_lock.c
@@ -11,6 +11,13 @@
* called from interrupt context and we have preemption disabled while
* spinning.
*/
+
+struct optimistic_spin_node {
+ struct optimistic_spin_node *next, *prev;
+ int locked; /* 1 if lock acquired */
+ int cpu; /* encoded CPU # + 1 value */
+};
+
static DEFINE_PER_CPU_SHARED_ALIGNED(struct optimistic_spin_node, osq_node);
/*