提交 c2ab7282 编写于 作者: H Heiko Carstens 提交者: Martin Schwidefsky

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: NHeiko Carstens <heiko.carstens@de.ibm.com>
Reviewed-by: NGerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 bcb7825a
...@@ -579,9 +579,8 @@ sclp_sync_wait(void) ...@@ -579,9 +579,8 @@ sclp_sync_wait(void)
old_tick = local_tick_disable(); old_tick = local_tick_disable();
trace_hardirqs_on(); trace_hardirqs_on();
__ctl_store(cr0, 0, 0); __ctl_store(cr0, 0, 0);
cr0_sync = cr0; cr0_sync = cr0 & ~CR0_IRQ_SUBCLASS_MASK;
cr0_sync &= 0xffff00a0; cr0_sync |= 1UL << (63 - 54);
cr0_sync |= 0x00000200;
__ctl_load(cr0_sync, 0, 0); __ctl_load(cr0_sync, 0, 0);
__arch_local_irq_stosm(0x01); __arch_local_irq_stosm(0x01);
/* Loop until driver state indicates finished request */ /* Loop until driver state indicates finished request */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册