diff options
author | Martin Schwidefsky | 2017-10-12 13:24:45 +0200 |
---|---|---|
committer | Martin Schwidefsky | 2017-10-19 17:07:36 +0200 |
commit | ad3bc0ac1d2ed311ef3a9d6f2849948433a9f338 (patch) | |
tree | c29158815f1d0b56a938528bbd9f07b1baff3a7f /arch/s390/kernel/nmi.c | |
parent | 00a8f886dbdaeea1d93543d5311ddf3a2680bf2b (diff) |
s390/ctl_reg: use decoding unions in update_cr_regs
Add a decoding union for the bits in control registers 2 and use
'union ctlreg0' and 'union ctlreg2' in update_cr_regs to improve
readability.
Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Reviewed-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/nmi.c')
-rw-r--r-- | arch/s390/kernel/nmi.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/s390/kernel/nmi.c b/arch/s390/kernel/nmi.c index 15e28eefe7e9..eb3e702cee30 100644 --- a/arch/s390/kernel/nmi.c +++ b/arch/s390/kernel/nmi.c @@ -107,6 +107,7 @@ EXPORT_SYMBOL_GPL(s390_handle_mcck); */ static int notrace s390_validate_registers(union mci mci, int umode) { + union ctlreg2 cr2; int kill_task; u64 zero; void *fpt_save_area; @@ -231,7 +232,8 @@ static int notrace s390_validate_registers(union mci mci, int umode) kill_task = 1; } /* Validate guarded storage registers */ - if (MACHINE_HAS_GS && (S390_lowcore.cregs_save_area[2] & (1UL << 4))) { + cr2.val = S390_lowcore.cregs_save_area[2]; + if (cr2.gse) { if (!mci.gs) /* * Guarded storage register can't be restored and |