]> git.karo-electronics.de Git - karo-tx-linux.git/commit
s390/spinlock: Implement ticket locks (8 Bit tickets)
authorPhilipp Hachtmann <phacht@linux.vnet.ibm.com>
Mon, 7 Apr 2014 16:25:23 +0000 (18:25 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 17 Apr 2014 10:46:47 +0000 (12:46 +0200)
commit227f65819521d1ca28b9ddb2260a5537cd1373a5
tree8fbbc2e1082625b9bb7f94c4631c10f010951d38
parentcd4aba877fc6892f8ed35480f3b46290654ee5e6
s390/spinlock: Implement ticket locks (8 Bit tickets)

This patch adds a ticket lock spinlock implementation to s390.
It is controlled by CONFIG_S390_TICKET_SPINLOCK.

The size of arch_spinlock_t is kept (32 bit). Therefore the lock tickets
can have only 8 bits each. Therefore the lock implementation stops to
be fair when the lock is taken and more than 253 CPUs are waiting for it.
But this can be considered a rare case.

[ 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>
arch/s390/Kconfig
arch/s390/include/asm/spinlock.h
arch/s390/include/asm/spinlock_types.h
arch/s390/lib/spinlock.c