]> Pileus Git - ~andy/linux/blobdiff - kernel/spinlock.c
Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
[~andy/linux] / kernel / spinlock.c
index 84c7d96918bf44b8b155d4c72afbd35e6a3bd6cd..4b082b5cac9eedfd7c31daef7e8dd02974eedbed 100644 (file)
 #else
 #define raw_read_can_lock(l)   read_can_lock(l)
 #define raw_write_can_lock(l)  write_can_lock(l)
+
+/*
+ * Some architectures can relax in favour of the CPU owning the lock.
+ */
+#ifndef arch_read_relax
+# define arch_read_relax(l)    cpu_relax()
+#endif
+#ifndef arch_write_relax
+# define arch_write_relax(l)   cpu_relax()
+#endif
+#ifndef arch_spin_relax
+# define arch_spin_relax(l)    cpu_relax()
+#endif
+
 /*
  * We build the __lock_function inlines here. They are too large for
  * inlining all over the place, but here is only one user per function
@@ -163,7 +177,7 @@ void __lockfunc _raw_spin_lock_bh(raw_spinlock_t *lock)
 EXPORT_SYMBOL(_raw_spin_lock_bh);
 #endif
 
-#ifndef CONFIG_INLINE_SPIN_UNLOCK
+#ifdef CONFIG_UNINLINE_SPIN_UNLOCK
 void __lockfunc _raw_spin_unlock(raw_spinlock_t *lock)
 {
        __raw_spin_unlock(lock);