aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2015-01-14 11:52:33 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2015-01-23 09:17:04 -0500
commit2c72a44ecdf2a7ceac73844226e97ed2d5dd1e82 (patch)
treea8475e1252115402a27b4c9a822943782085b151 /arch/s390/kernel
parent55b5eb75e7ccdfe94b6ea1be6bba0c21149abecf (diff)
s390/spinlock: add compare-and-delay to lock wait loops
Add the compare-and-delay instruction to the spin-lock and rw-lock retry loops. A CPU executing the compare-and-delay instruction stops until the lock value has changed. This is done to make the locking code for contended locks to behave better in regard to the multi- hreading facility. A thread of a core executing a compare-and-delay will allow the other threads of a core to get a larger share of the core resources. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r--arch/s390/kernel/early.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c
index 302ac1f7f8e7..70a329450901 100644
--- a/arch/s390/kernel/early.c
+++ b/arch/s390/kernel/early.c
@@ -393,9 +393,27 @@ static __init void detect_machine_facilities(void)
393 S390_lowcore.machine_flags |= MACHINE_FLAG_TLB_LC; 393 S390_lowcore.machine_flags |= MACHINE_FLAG_TLB_LC;
394 if (test_facility(129)) 394 if (test_facility(129))
395 S390_lowcore.machine_flags |= MACHINE_FLAG_VX; 395 S390_lowcore.machine_flags |= MACHINE_FLAG_VX;
396 if (test_facility(128))
397 S390_lowcore.machine_flags |= MACHINE_FLAG_CAD;
396#endif 398#endif
397} 399}
398 400
401static int __init nocad_setup(char *str)
402{
403 S390_lowcore.machine_flags &= ~MACHINE_FLAG_CAD;
404 return 0;
405}
406early_param("nocad", nocad_setup);
407
408static int __init cad_init(void)
409{
410 if (MACHINE_HAS_CAD)
411 /* Enable problem state CAD. */
412 __ctl_set_bit(2, 3);
413 return 0;
414}
415early_initcall(cad_init);
416
399static __init void rescue_initrd(void) 417static __init void rescue_initrd(void)
400{ 418{
401#ifdef CONFIG_BLK_DEV_INITRD 419#ifdef CONFIG_BLK_DEV_INITRD