EXTRA_AFLAGS := -traditional
 
-lib-y += delay.o string.o spinlock.o
+lib-y += delay.o string.o
 lib-y += $(if $(CONFIG_64BIT),uaccess64.o,uaccess.o)
+lib-$(CONFIG_SMP) += spinlock.o
\ No newline at end of file
 
 #include <linux/init.h>
 #include <asm/io.h>
 
-atomic_t spin_retry_counter;
 int spin_retry = 1000;
 
 /**
                        _diag44();
                        count = spin_retry;
                }
-               atomic_inc(&spin_retry_counter);
                if (_raw_compare_and_swap(&lp->lock, 0, pc) == 0)
                        return;
        }
        int count = spin_retry;
 
        while (count-- > 0) {
-               atomic_inc(&spin_retry_counter);
                if (_raw_compare_and_swap(&lp->lock, 0, pc) == 0)
                        return 1;
        }
                        _diag44();
                        count = spin_retry;
                }
-               atomic_inc(&spin_retry_counter);
                old = rw->lock & 0x7fffffffU;
                if (_raw_compare_and_swap(&rw->lock, old, old + 1) == old)
                        return;
        int count = spin_retry;
 
        while (count-- > 0) {
-               atomic_inc(&spin_retry_counter);
                old = rw->lock & 0x7fffffffU;
                if (_raw_compare_and_swap(&rw->lock, old, old + 1) == old)
                        return 1;
                        _diag44();
                        count = spin_retry;
                }
-               atomic_inc(&spin_retry_counter);
                if (_raw_compare_and_swap(&rw->lock, 0, 0x80000000) == 0)
                        return;
        }
        int count = spin_retry;
 
        while (count-- > 0) {
-               atomic_inc(&spin_retry_counter);
                if (_raw_compare_and_swap(&rw->lock, 0, 0x80000000) == 0)
                        return 1;
        }
 
                .mode           = 0644,
                .proc_handler   = &proc_dointvec,
        },
-#if defined(CONFIG_S390)
+#if defined(CONFIG_S390) && defined(CONFIG_SMP)
        {
                .ctl_name       = KERN_SPIN_RETRY,
                .procname       = "spin_retry",