aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2016-01-07 07:37:22 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2016-01-11 07:03:00 -0500
commitc2ab7282f0fcd11eea4d0ba45d1c65d89428c314 (patch)
tree83642948d0f2f154725b19a0eb7b61429b174822
parentbcb7825a77f41c7dd91da6f7ac10b928156a322e (diff)
s390/sclp: fix possible control register corruption
sclp_sync_wait() disables all external interrupt classes except for the service signal subclass. The static mask used for that however is wrong. It clears a couple of bits which shouldn't be cleared and on the other hand potentially does not clear bits which should be cleared. Fix this by using the same generic mask like we do it in our delay implementation. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r--drivers/s390/char/sclp.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/s390/char/sclp.c b/drivers/s390/char/sclp.c
index f58bf4c6c3ee..272898225dbb 100644
--- a/drivers/s390/char/sclp.c
+++ b/drivers/s390/char/sclp.c
@@ -579,9 +579,8 @@ sclp_sync_wait(void)
579 old_tick = local_tick_disable(); 579 old_tick = local_tick_disable();
580 trace_hardirqs_on(); 580 trace_hardirqs_on();
581 __ctl_store(cr0, 0, 0); 581 __ctl_store(cr0, 0, 0);
582 cr0_sync = cr0; 582 cr0_sync = cr0 & ~CR0_IRQ_SUBCLASS_MASK;
583 cr0_sync &= 0xffff00a0; 583 cr0_sync |= 1UL << (63 - 54);
584 cr0_sync |= 0x00000200;
585 __ctl_load(cr0_sync, 0, 0); 584 __ctl_load(cr0_sync, 0, 0);
586 __arch_local_irq_stosm(0x01); 585 __arch_local_irq_stosm(0x01);
587 /* Loop until driver state indicates finished request */ 586 /* Loop until driver state indicates finished request */