[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>

authored by Martin Schwidefsky and committed by Linus Torvalds 0152fb37 68c11917

+3 -9
+2 -1
arch/s390/lib/Makefile
··· 4 4 5 5 EXTRA_AFLAGS := -traditional 6 6 7 - lib-y += delay.o string.o spinlock.o 7 + lib-y += delay.o string.o 8 8 lib-y += $(if $(CONFIG_64BIT),uaccess64.o,uaccess.o) 9 + lib-$(CONFIG_SMP) += spinlock.o
-7
arch/s390/lib/spinlock.c
··· 13 13 #include <linux/init.h> 14 14 #include <asm/io.h> 15 15 16 - atomic_t spin_retry_counter; 17 16 int spin_retry = 1000; 18 17 19 18 /** ··· 44 45 _diag44(); 45 46 count = spin_retry; 46 47 } 47 - atomic_inc(&spin_retry_counter); 48 48 if (_raw_compare_and_swap(&lp->lock, 0, pc) == 0) 49 49 return; 50 50 } ··· 56 58 int count = spin_retry; 57 59 58 60 while (count-- > 0) { 59 - atomic_inc(&spin_retry_counter); 60 61 if (_raw_compare_and_swap(&lp->lock, 0, pc) == 0) 61 62 return 1; 62 63 } ··· 74 77 _diag44(); 75 78 count = spin_retry; 76 79 } 77 - atomic_inc(&spin_retry_counter); 78 80 old = rw->lock & 0x7fffffffU; 79 81 if (_raw_compare_and_swap(&rw->lock, old, old + 1) == old) 80 82 return; ··· 88 92 int count = spin_retry; 89 93 90 94 while (count-- > 0) { 91 - atomic_inc(&spin_retry_counter); 92 95 old = rw->lock & 0x7fffffffU; 93 96 if (_raw_compare_and_swap(&rw->lock, old, old + 1) == old) 94 97 return 1; ··· 106 111 _diag44(); 107 112 count = spin_retry; 108 113 } 109 - atomic_inc(&spin_retry_counter); 110 114 if (_raw_compare_and_swap(&rw->lock, 0, 0x80000000) == 0) 111 115 return; 112 116 } ··· 118 124 int count = spin_retry; 119 125 120 126 while (count-- > 0) { 121 - atomic_inc(&spin_retry_counter); 122 127 if (_raw_compare_and_swap(&rw->lock, 0, 0x80000000) == 0) 123 128 return 1; 124 129 }
+1 -1
kernel/sysctl.c
··· 648 648 .mode = 0644, 649 649 .proc_handler = &proc_dointvec, 650 650 }, 651 - #if defined(CONFIG_S390) 651 + #if defined(CONFIG_S390) && defined(CONFIG_SMP) 652 652 { 653 653 .ctl_name = KERN_SPIN_RETRY, 654 654 .procname = "spin_retry",