hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/kernel/locking/spinlock.c
....@@ -22,6 +22,13 @@
2222 #include <linux/debug_locks.h>
2323 #include <linux/export.h>
2424
25
+#ifdef CONFIG_MMIOWB
26
+#ifndef arch_mmiowb_state
27
+DEFINE_PER_CPU(struct mmiowb_state, __mmiowb_state);
28
+EXPORT_PER_CPU_SYMBOL(__mmiowb_state);
29
+#endif
30
+#endif
31
+
2532 /*
2633 * If lockdep is enabled then we use the non-preemption spin-ops
2734 * even on CONFIG_PREEMPT, because lockdep assumes that interrupts are
....@@ -117,8 +124,11 @@
117124 * __[spin|read|write]_lock_bh()
118125 */
119126 BUILD_LOCK_OPS(spin, raw_spinlock);
127
+
128
+#ifndef CONFIG_PREEMPT_RT
120129 BUILD_LOCK_OPS(read, rwlock);
121130 BUILD_LOCK_OPS(write, rwlock);
131
+#endif
122132
123133 #endif
124134
....@@ -201,6 +211,8 @@
201211 }
202212 EXPORT_SYMBOL(_raw_spin_unlock_bh);
203213 #endif
214
+
215
+#ifndef CONFIG_PREEMPT_RT
204216
205217 #ifndef CONFIG_INLINE_READ_TRYLOCK
206218 int __lockfunc _raw_read_trylock(rwlock_t *lock)
....@@ -346,6 +358,8 @@
346358 EXPORT_SYMBOL(_raw_write_unlock_bh);
347359 #endif
348360
361
+#endif /* !PREEMPT_RT */
362
+
349363 #ifdef CONFIG_DEBUG_LOCK_ALLOC
350364
351365 void __lockfunc _raw_spin_lock_nested(raw_spinlock_t *lock, int subclass)