aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/lib
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2006-01-14 16:21:00 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-14 21:27:09 -0500
commit0152fb37603e3a776768794030b809ae77027aa4 (patch)
treedc1df7a4e474e6e8c4b6987a22e09c727bb97433 /arch/s390/lib
parent68c119177890afff4759abda8da2b4ff5e06efa1 (diff)
[PATCH] s390: spinlock fixes
Remove useless spin_retry_counter and fix compilation for UP kernels. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/s390/lib')
-rw-r--r--arch/s390/lib/Makefile3
-rw-r--r--arch/s390/lib/spinlock.c7
2 files changed, 2 insertions, 8 deletions
diff --git a/arch/s390/lib/Makefile b/arch/s390/lib/Makefile
index d9b97b3c597f..f20b51ff1d86 100644
--- a/arch/s390/lib/Makefile
+++ b/arch/s390/lib/Makefile
@@ -4,5 +4,6 @@
4 4
5EXTRA_AFLAGS := -traditional 5EXTRA_AFLAGS := -traditional
6 6
7lib-y += delay.o string.o spinlock.o 7lib-y += delay.o string.o
8lib-y += $(if $(CONFIG_64BIT),uaccess64.o,uaccess.o) 8lib-y += $(if $(CONFIG_64BIT),uaccess64.o,uaccess.o)
9lib-$(CONFIG_SMP) += spinlock.o \ No newline at end of file
diff --git a/arch/s390/lib/spinlock.c b/arch/s390/lib/spinlock.c
index 68d79c502081..60f80a4eed4e 100644
--- a/arch/s390/lib/spinlock.c
+++ b/arch/s390/lib/spinlock.c
@@ -13,7 +13,6 @@
13#include <linux/init.h> 13#include <linux/init.h>
14#include <asm/io.h> 14#include <asm/io.h>
15 15
16atomic_t spin_retry_counter;
17int spin_retry = 1000; 16int spin_retry = 1000;
18 17
19/** 18/**
@@ -45,7 +44,6 @@ _raw_spin_lock_wait(raw_spinlock_t *lp, unsigned int pc)
45 _diag44(); 44 _diag44();
46 count = spin_retry; 45 count = spin_retry;
47 } 46 }
48 atomic_inc(&spin_retry_counter);
49 if (_raw_compare_and_swap(&lp->lock, 0, pc) == 0) 47 if (_raw_compare_and_swap(&lp->lock, 0, pc) == 0)
50 return; 48 return;
51 } 49 }
@@ -58,7 +56,6 @@ _raw_spin_trylock_retry(raw_spinlock_t *lp, unsigned int pc)
58 int count = spin_retry; 56 int count = spin_retry;
59 57
60 while (count-- > 0) { 58 while (count-- > 0) {
61 atomic_inc(&spin_retry_counter);
62 if (_raw_compare_and_swap(&lp->lock, 0, pc) == 0) 59 if (_raw_compare_and_swap(&lp->lock, 0, pc) == 0)
63 return 1; 60 return 1;
64 } 61 }
@@ -77,7 +74,6 @@ _raw_read_lock_wait(raw_rwlock_t *rw)
77 _diag44(); 74 _diag44();
78 count = spin_retry; 75 count = spin_retry;
79 } 76 }
80 atomic_inc(&spin_retry_counter);
81 old = rw->lock & 0x7fffffffU; 77 old = rw->lock & 0x7fffffffU;
82 if (_raw_compare_and_swap(&rw->lock, old, old + 1) == old) 78 if (_raw_compare_and_swap(&rw->lock, old, old + 1) == old)
83 return; 79 return;
@@ -92,7 +88,6 @@ _raw_read_trylock_retry(raw_rwlock_t *rw)
92 int count = spin_retry; 88 int count = spin_retry;
93 89
94 while (count-- > 0) { 90 while (count-- > 0) {
95 atomic_inc(&spin_retry_counter);
96 old = rw->lock & 0x7fffffffU; 91 old = rw->lock & 0x7fffffffU;
97 if (_raw_compare_and_swap(&rw->lock, old, old + 1) == old) 92 if (_raw_compare_and_swap(&rw->lock, old, old + 1) == old)
98 return 1; 93 return 1;
@@ -111,7 +106,6 @@ _raw_write_lock_wait(raw_rwlock_t *rw)
111 _diag44(); 106 _diag44();
112 count = spin_retry; 107 count = spin_retry;
113 } 108 }
114 atomic_inc(&spin_retry_counter);
115 if (_raw_compare_and_swap(&rw->lock, 0, 0x80000000) == 0) 109 if (_raw_compare_and_swap(&rw->lock, 0, 0x80000000) == 0)
116 return; 110 return;
117 } 111 }
@@ -124,7 +118,6 @@ _raw_write_trylock_retry(raw_rwlock_t *rw)
124 int count = spin_retry; 118 int count = spin_retry;
125 119
126 while (count-- > 0) { 120 while (count-- > 0) {
127 atomic_inc(&spin_retry_counter);
128 if (_raw_compare_and_swap(&rw->lock, 0, 0x80000000) == 0) 121 if (_raw_compare_and_swap(&rw->lock, 0, 0x80000000) == 0)
129 return 1; 122 return 1;
130 } 123 }