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

s390/hmcdrv: fix interrupt registration

The z/VM driver sets bit "63-22" in control register zero to one in order
to enable the CP Service interrupt (0x2603). However the irq subclass mask
that normally corresponds to the CP Service interrupt is
"63-54" (== "63-22-32").

So it looks like the author read the documentation with the 32 bit sized
cr0 register bit positions (== 22), but didn't realize that bit numbers
change, if applied to a 64 bit register (== 54) due to the numbering
scheme.

Also use irq_subclass_register() instead if ctl_set_bit() since multiple
services depend on the service signal subclass mask, which is the correct
bit. This also explains why nobody noticed the bug, since the bit is always
enabled anyway (e.g. pfault).
Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
Reviewed-by: NHendrik Brueckner <brueckner@linux.vnet.ibm.com>
Acked-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 89b1145e
...@@ -223,7 +223,7 @@ int diag_ftp_startup(void) ...@@ -223,7 +223,7 @@ int diag_ftp_startup(void)
if (rc) if (rc)
return rc; return rc;
ctl_set_bit(0, 63 - 22); irq_subclass_register(IRQ_SUBCLASS_SERVICE_SIGNAL);
return 0; return 0;
} }
...@@ -232,6 +232,6 @@ int diag_ftp_startup(void) ...@@ -232,6 +232,6 @@ int diag_ftp_startup(void)
*/ */
void diag_ftp_shutdown(void) void diag_ftp_shutdown(void)
{ {
ctl_clear_bit(0, 63 - 22); irq_subclass_unregister(IRQ_SUBCLASS_SERVICE_SIGNAL);
unregister_external_irq(EXT_IRQ_CP_SERVICE, diag_ftp_handler); unregister_external_irq(EXT_IRQ_CP_SERVICE, diag_ftp_handler);
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册