summaryrefslogtreecommitdiffstats
path: root/arch/s390/lib/spinlock.c
diff options
context:
space:
mode:
authorPhilipp Hachtmann <phacht@linux.vnet.ibm.com>2014-04-07 18:25:23 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2014-05-20 08:58:42 +0200
commit6c8cd5bbda7e6be166cf2e2dd4be5890193e17ac (patch)
tree0245d1a206b04c2cd2b5b4914dfb696205673861 /arch/s390/lib/spinlock.c
parent5b3f683e694a835f5dfdab06102be1a50604c3b7 (diff)
downloadlinux-6c8cd5bbda7e6be166cf2e2dd4be5890193e17ac.tar.gz
linux-6c8cd5bbda7e6be166cf2e2dd4be5890193e17ac.tar.bz2
linux-6c8cd5bbda7e6be166cf2e2dd4be5890193e17ac.zip
s390/spinlock: optimize spinlock code sequence
Use lowcore constant to improve the code generated for spinlocks. [ Martin Schwidefsky: patch breakdown and code beautification ] Signed-off-by: Philipp Hachtmann <phacht@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/lib/spinlock.c')
-rw-r--r--arch/s390/lib/spinlock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/s390/lib/spinlock.c b/arch/s390/lib/spinlock.c
index 4a3b33b2dbb9..3ca9de4d9cb9 100644
--- a/arch/s390/lib/spinlock.c
+++ b/arch/s390/lib/spinlock.c
@@ -27,7 +27,7 @@ __setup("spin_retry=", spin_retry_setup);
void arch_spin_lock_wait(arch_spinlock_t *lp)
{
int count = spin_retry;
- unsigned int cpu = ~smp_processor_id();
+ unsigned int cpu = SPINLOCK_LOCKVAL;
unsigned int owner;
while (1) {
@@ -54,7 +54,7 @@ EXPORT_SYMBOL(arch_spin_lock_wait);
void arch_spin_lock_wait_flags(arch_spinlock_t *lp, unsigned long flags)
{
int count = spin_retry;
- unsigned int cpu = ~smp_processor_id();
+ unsigned int cpu = SPINLOCK_LOCKVAL;
unsigned int owner;
local_irq_restore(flags);