From 6c8cd5bbda7e6be166cf2e2dd4be5890193e17ac Mon Sep 17 00:00:00 2001 From: Philipp Hachtmann Date: Mon, 7 Apr 2014 18:25:23 +0200 Subject: 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 Signed-off-by: Martin Schwidefsky --- arch/s390/lib/spinlock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/s390/lib') 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); -- cgit v1.2.3