diff options
author | Philipp Hachtmann <phacht@linux.vnet.ibm.com> | 2014-04-07 12:25:23 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2014-05-20 02:58:42 -0400 |
commit | 6c8cd5bbda7e6be166cf2e2dd4be5890193e17ac (patch) | |
tree | 0245d1a206b04c2cd2b5b4914dfb696205673861 /arch/s390/lib/spinlock.c | |
parent | 5b3f683e694a835f5dfdab06102be1a50604c3b7 (diff) |
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.c | 4 |
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); | |||
27 | void arch_spin_lock_wait(arch_spinlock_t *lp) | 27 | void arch_spin_lock_wait(arch_spinlock_t *lp) |
28 | { | 28 | { |
29 | int count = spin_retry; | 29 | int count = spin_retry; |
30 | unsigned int cpu = ~smp_processor_id(); | 30 | unsigned int cpu = SPINLOCK_LOCKVAL; |
31 | unsigned int owner; | 31 | unsigned int owner; |
32 | 32 | ||
33 | while (1) { | 33 | while (1) { |
@@ -54,7 +54,7 @@ EXPORT_SYMBOL(arch_spin_lock_wait); | |||
54 | void arch_spin_lock_wait_flags(arch_spinlock_t *lp, unsigned long flags) | 54 | void arch_spin_lock_wait_flags(arch_spinlock_t *lp, unsigned long flags) |
55 | { | 55 | { |
56 | int count = spin_retry; | 56 | int count = spin_retry; |
57 | unsigned int cpu = ~smp_processor_id(); | 57 | unsigned int cpu = SPINLOCK_LOCKVAL; |
58 | unsigned int owner; | 58 | unsigned int owner; |
59 | 59 | ||
60 | local_irq_restore(flags); | 60 | local_irq_restore(flags); |