|
@@ -13,7 +13,6 @@
|
|
#include <linux/init.h>
|
|
#include <linux/init.h>
|
|
#include <asm/io.h>
|
|
#include <asm/io.h>
|
|
|
|
|
|
-atomic_t spin_retry_counter;
|
|
|
|
int spin_retry = 1000;
|
|
int spin_retry = 1000;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -45,7 +44,6 @@ _raw_spin_lock_wait(raw_spinlock_t *lp, unsigned int pc)
|
|
_diag44();
|
|
_diag44();
|
|
count = spin_retry;
|
|
count = spin_retry;
|
|
}
|
|
}
|
|
- atomic_inc(&spin_retry_counter);
|
|
|
|
if (_raw_compare_and_swap(&lp->lock, 0, pc) == 0)
|
|
if (_raw_compare_and_swap(&lp->lock, 0, pc) == 0)
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -58,7 +56,6 @@ _raw_spin_trylock_retry(raw_spinlock_t *lp, unsigned int pc)
|
|
int count = spin_retry;
|
|
int count = spin_retry;
|
|
|
|
|
|
while (count-- > 0) {
|
|
while (count-- > 0) {
|
|
- atomic_inc(&spin_retry_counter);
|
|
|
|
if (_raw_compare_and_swap(&lp->lock, 0, pc) == 0)
|
|
if (_raw_compare_and_swap(&lp->lock, 0, pc) == 0)
|
|
return 1;
|
|
return 1;
|
|
}
|
|
}
|
|
@@ -77,7 +74,6 @@ _raw_read_lock_wait(raw_rwlock_t *rw)
|
|
_diag44();
|
|
_diag44();
|
|
count = spin_retry;
|
|
count = spin_retry;
|
|
}
|
|
}
|
|
- atomic_inc(&spin_retry_counter);
|
|
|
|
old = rw->lock & 0x7fffffffU;
|
|
old = rw->lock & 0x7fffffffU;
|
|
if (_raw_compare_and_swap(&rw->lock, old, old + 1) == old)
|
|
if (_raw_compare_and_swap(&rw->lock, old, old + 1) == old)
|
|
return;
|
|
return;
|
|
@@ -92,7 +88,6 @@ _raw_read_trylock_retry(raw_rwlock_t *rw)
|
|
int count = spin_retry;
|
|
int count = spin_retry;
|
|
|
|
|
|
while (count-- > 0) {
|
|
while (count-- > 0) {
|
|
- atomic_inc(&spin_retry_counter);
|
|
|
|
old = rw->lock & 0x7fffffffU;
|
|
old = rw->lock & 0x7fffffffU;
|
|
if (_raw_compare_and_swap(&rw->lock, old, old + 1) == old)
|
|
if (_raw_compare_and_swap(&rw->lock, old, old + 1) == old)
|
|
return 1;
|
|
return 1;
|
|
@@ -111,7 +106,6 @@ _raw_write_lock_wait(raw_rwlock_t *rw)
|
|
_diag44();
|
|
_diag44();
|
|
count = spin_retry;
|
|
count = spin_retry;
|
|
}
|
|
}
|
|
- atomic_inc(&spin_retry_counter);
|
|
|
|
if (_raw_compare_and_swap(&rw->lock, 0, 0x80000000) == 0)
|
|
if (_raw_compare_and_swap(&rw->lock, 0, 0x80000000) == 0)
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -124,7 +118,6 @@ _raw_write_trylock_retry(raw_rwlock_t *rw)
|
|
int count = spin_retry;
|
|
int count = spin_retry;
|
|
|
|
|
|
while (count-- > 0) {
|
|
while (count-- > 0) {
|
|
- atomic_inc(&spin_retry_counter);
|
|
|
|
if (_raw_compare_and_swap(&rw->lock, 0, 0x80000000) == 0)
|
|
if (_raw_compare_and_swap(&rw->lock, 0, 0x80000000) == 0)
|
|
return 1;
|
|
return 1;
|
|
}
|
|
}
|