diff options
| author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-01-19 15:59:25 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-01-19 15:59:25 -0800 |
| commit | 8a4f2189be5c5c1fe13bc68810da0163f1c8ff88 (patch) | |
| tree | 687299c0aca77d0117d11d659d24d75fe6a1ea6d /kernel/spinlock.c | |
| parent | 9472e348190603fffed9a32e19c54a5cf17e4bcc (diff) | |
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
Diffstat (limited to 'kernel/spinlock.c')
| -rw-r--r-- | kernel/spinlock.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/kernel/spinlock.c b/kernel/spinlock.c index beacf8b7cee7..b485593430ec 100644 --- a/kernel/spinlock.c +++ b/kernel/spinlock.c @@ -173,7 +173,7 @@ EXPORT_SYMBOL(_write_lock); * (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) \ { \ preempt_disable(); \ @@ -183,8 +183,7 @@ void __lockfunc _##op##_lock(locktype *lock) \ preempt_enable(); \ if (!(lock)->break_lock) \ (lock)->break_lock = 1; \ - while (is_locked_fn(lock) && (lock)->break_lock) \ - cpu_relax(); \ + cpu_relax(); \ preempt_disable(); \ } \ } \ @@ -205,8 +204,7 @@ unsigned long __lockfunc _##op##_lock_irqsave(locktype *lock) \ preempt_enable(); \ if (!(lock)->break_lock) \ (lock)->break_lock = 1; \ - while (is_locked_fn(lock) && (lock)->break_lock) \ - cpu_relax(); \ + cpu_relax(); \ preempt_disable(); \ } \ return flags; \ @@ -246,9 +244,9 @@ EXPORT_SYMBOL(_##op##_lock_bh) * _[spin|read|write]_lock_irqsave() * _[spin|read|write]_lock_bh() */ -BUILD_LOCK_OPS(spin, spinlock_t, spin_is_locked); -BUILD_LOCK_OPS(read, rwlock_t, rwlock_is_locked); -BUILD_LOCK_OPS(write, rwlock_t, spin_is_locked); +BUILD_LOCK_OPS(spin, spinlock_t); +BUILD_LOCK_OPS(read, rwlock_t); +BUILD_LOCK_OPS(write, rwlock_t); #endif /* CONFIG_PREEMPT */ |
