summaryrefslogtreecommitdiff
path: root/arch/s390/include/asm/spinlock.h
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2016-12-04 16:36:04 +0300
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2017-09-28 08:29:44 +0300
commit8153380379ecc8381f6d55f6497de31a36c75aa5 (patch)
tree37dd4e46216cd29ebcecd564cfb9f29e58fcb801 /arch/s390/include/asm/spinlock.h
parent1887aa07b6765d345dd79f26017aa2d15d49d7af (diff)
downloadlinux-8153380379ecc8381f6d55f6497de31a36c75aa5.tar.xz
s390/spinlock: use the cpu number +1 as spinlock value
The queued spinlock code will come out simpler if the encoding of the CPU that holds the spinlock is (cpu+1) instead of (~cpu). Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/spinlock.h')
-rw-r--r--arch/s390/include/asm/spinlock.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/include/asm/spinlock.h b/arch/s390/include/asm/spinlock.h
index 8182b521c42f..6727cc30d59b 100644
--- a/arch/s390/include/asm/spinlock.h
+++ b/arch/s390/include/asm/spinlock.h
@@ -48,7 +48,7 @@ static inline void arch_spin_relax(arch_spinlock_t *lock)
static inline u32 arch_spin_lockval(int cpu)
{
- return ~cpu;
+ return cpu + 1;
}
static inline int arch_spin_value_unlocked(arch_spinlock_t lock)