diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2017-03-24 17:00:45 +0100 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2017-04-12 08:43:33 +0200 |
commit | b13de4b7adeb7a5e37a5aa78d5a4926c3cd4e131 (patch) | |
tree | 472c2bdb751e5529b403dd297b76ae08f25a7d9a /arch/s390/kernel | |
parent | 02c503ff237cdcd8e012a122a638295550db10a5 (diff) | |
download | linux-b13de4b7adeb7a5e37a5aa78d5a4926c3cd4e131.tar.bz2 |
s390/spinlock: remove compare and delay instruction
The CAD instruction never worked quite as expected for the spinlock
code. It has been disabled by default with git commit 61b0b01686d48220,
if the "cad" kernel parameter is specified it is enabled for both user
space and the spinlock code. Leave the option to enable the instruction
for user space but remove it from the spinlock code.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r-- | arch/s390/kernel/early.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c index 251391e3f8bc..5d20182ee8ae 100644 --- a/arch/s390/kernel/early.c +++ b/arch/s390/kernel/early.c @@ -434,23 +434,16 @@ early_param("noexec", noexec_setup); static int __init cad_setup(char *str) { - int val; - - get_option(&str, &val); - if (val && test_facility(128)) - S390_lowcore.machine_flags |= MACHINE_FLAG_CAD; - return 0; -} -early_param("cad", cad_setup); + bool enabled; + int rc; -static int __init cad_init(void) -{ - if (MACHINE_HAS_CAD) + rc = kstrtobool(str, &enabled); + if (!rc && enabled && test_facility(128)) /* Enable problem state CAD. */ __ctl_set_bit(2, 3); - return 0; + return rc; } -early_initcall(cad_init); +early_param("cad", cad_setup); static __init void memmove_early(void *dst, const void *src, size_t n) { |