diff options
-rw-r--r-- | arch/s390/lib/Makefile | 3 | ||||
-rw-r--r-- | arch/s390/lib/spinlock.c | 7 | ||||
-rw-r--r-- | kernel/sysctl.c | 2 |
3 files changed, 3 insertions, 9 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 | ||
5 | EXTRA_AFLAGS := -traditional | 5 | EXTRA_AFLAGS := -traditional |
6 | 6 | ||
7 | lib-y += delay.o string.o spinlock.o | 7 | lib-y += delay.o string.o |
8 | lib-y += $(if $(CONFIG_64BIT),uaccess64.o,uaccess.o) | 8 | lib-y += $(if $(CONFIG_64BIT),uaccess64.o,uaccess.o) |
9 | lib-$(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 | ||
16 | atomic_t spin_retry_counter; | ||
17 | int spin_retry = 1000; | 16 | int 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 | } |
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 62d4d9566876..f5d69b6e29f5 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -648,7 +648,7 @@ static ctl_table kern_table[] = { | |||
648 | .mode = 0644, | 648 | .mode = 0644, |
649 | .proc_handler = &proc_dointvec, | 649 | .proc_handler = &proc_dointvec, |
650 | }, | 650 | }, |
651 | #if defined(CONFIG_S390) | 651 | #if defined(CONFIG_S390) && defined(CONFIG_SMP) |
652 | { | 652 | { |
653 | .ctl_name = KERN_SPIN_RETRY, | 653 | .ctl_name = KERN_SPIN_RETRY, |
654 | .procname = "spin_retry", | 654 | .procname = "spin_retry", |