Commit 8a4f2189 authored by Linus Torvalds's avatar Linus Torvalds

Revert "Don't busy-lock-loop in preemptable spinlocks" patch

The locking tests were wrong, and the fixes are up in the air. In the
meantime, the get-it-working patch is to just not do this.

Cset exclude: mingo@elte.hu[torvalds]|ChangeSet|20050115174045|30241
parent 9472e348
...@@ -173,7 +173,7 @@ EXPORT_SYMBOL(_write_lock); ...@@ -173,7 +173,7 @@ EXPORT_SYMBOL(_write_lock);
* (We do this in a function because inlining it would be excessive.) * (We do this in a function because inlining it would be excessive.)
*/ */
#define BUILD_LOCK_OPS(op, locktype, is_locked_fn) \ #define BUILD_LOCK_OPS(op, locktype) \
void __lockfunc _##op##_lock(locktype *lock) \ void __lockfunc _##op##_lock(locktype *lock) \
{ \ { \
preempt_disable(); \ preempt_disable(); \
...@@ -183,7 +183,6 @@ void __lockfunc _##op##_lock(locktype *lock) \ ...@@ -183,7 +183,6 @@ void __lockfunc _##op##_lock(locktype *lock) \
preempt_enable(); \ preempt_enable(); \
if (!(lock)->break_lock) \ if (!(lock)->break_lock) \
(lock)->break_lock = 1; \ (lock)->break_lock = 1; \
while (is_locked_fn(lock) && (lock)->break_lock) \
cpu_relax(); \ cpu_relax(); \
preempt_disable(); \ preempt_disable(); \
} \ } \
...@@ -205,7 +204,6 @@ unsigned long __lockfunc _##op##_lock_irqsave(locktype *lock) \ ...@@ -205,7 +204,6 @@ unsigned long __lockfunc _##op##_lock_irqsave(locktype *lock) \
preempt_enable(); \ preempt_enable(); \
if (!(lock)->break_lock) \ if (!(lock)->break_lock) \
(lock)->break_lock = 1; \ (lock)->break_lock = 1; \
while (is_locked_fn(lock) && (lock)->break_lock) \
cpu_relax(); \ cpu_relax(); \
preempt_disable(); \ preempt_disable(); \
} \ } \
...@@ -246,9 +244,9 @@ EXPORT_SYMBOL(_##op##_lock_bh) ...@@ -246,9 +244,9 @@ EXPORT_SYMBOL(_##op##_lock_bh)
* _[spin|read|write]_lock_irqsave() * _[spin|read|write]_lock_irqsave()
* _[spin|read|write]_lock_bh() * _[spin|read|write]_lock_bh()
*/ */
BUILD_LOCK_OPS(spin, spinlock_t, spin_is_locked); BUILD_LOCK_OPS(spin, spinlock_t);
BUILD_LOCK_OPS(read, rwlock_t, rwlock_is_locked); BUILD_LOCK_OPS(read, rwlock_t);
BUILD_LOCK_OPS(write, rwlock_t, spin_is_locked); BUILD_LOCK_OPS(write, rwlock_t);
#endif /* CONFIG_PREEMPT */ #endif /* CONFIG_PREEMPT */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment