diff options
author | Hendrik Brueckner <brueckner@linux.vnet.ibm.com> | 2015-09-29 10:04:41 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2015-10-14 14:32:08 +0200 |
commit | b5510d9b68c33964abd938148f407ad3789e369f (patch) | |
tree | 7cf0eb3e5e74e861030f850c8c0894095ac70bc9 /arch/s390/kernel/early.c | |
parent | s390/mm: try to avoid storage key operation in ptep_set_access_flags (diff) | |
download | linux-b5510d9b68c33964abd938148f407ad3789e369f.tar.xz linux-b5510d9b68c33964abd938148f407ad3789e369f.zip |
s390/fpu: always enable the vector facility if it is available
If the kernel detects that the s390 hardware supports the vector
facility, it is enabled by default at an early stage. To force
it off, use the novx kernel parameter. Note that there is a small
time window, where the vector facility is enabled before it is
forced to be off.
With enabling the vector facility by default, the FPU save and
restore functions can be improved. They do not longer require
to manage expensive control register updates to enable or disable
the vector enablement control for particular processes.
Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/early.c')
-rw-r--r-- | arch/s390/kernel/early.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c index 311a2d6d48e4..3c31609df959 100644 --- a/arch/s390/kernel/early.c +++ b/arch/s390/kernel/early.c @@ -329,9 +329,19 @@ static __init void detect_machine_facilities(void) S390_lowcore.machine_flags |= MACHINE_FLAG_TE; if (test_facility(51)) S390_lowcore.machine_flags |= MACHINE_FLAG_TLB_LC; - if (test_facility(129)) + if (test_facility(129)) { S390_lowcore.machine_flags |= MACHINE_FLAG_VX; + __ctl_set_bit(0, 17); + } +} + +static int __init disable_vector_extension(char *str) +{ + S390_lowcore.machine_flags &= ~MACHINE_FLAG_VX; + __ctl_clear_bit(0, 17); + return 1; } +early_param("novx", disable_vector_extension); static int __init cad_setup(char *str) { |