提交 137a14f4 编写于 作者: S Sebastian Ott 提交者: Martin Schwidefsky

s390/cio: fix irq stats for early interrupts on ccw consoles

Interrupts which happen on ccw consoles prior to their registration
with the driver core are not accounted to the respective device
driver. Fix this by setting the proper interrupt class during
initialization of ccw consoles.
Reviewed-by: NPeter Oberparleiter <oberpar@linux.vnet.ibm.com>
Signed-off-by: NSebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 1e532096
...@@ -1571,6 +1571,18 @@ static int io_subchannel_sch_event(struct subchannel *sch, int process) ...@@ -1571,6 +1571,18 @@ static int io_subchannel_sch_event(struct subchannel *sch, int process)
return rc; return rc;
} }
static void ccw_device_set_int_class(struct ccw_device *cdev)
{
struct ccw_driver *cdrv = cdev->drv;
/* Note: we interpret class 0 in this context as an uninitialized
* field since it translates to a non-I/O interrupt class. */
if (cdrv->int_class != 0)
cdev->private->int_class = cdrv->int_class;
else
cdev->private->int_class = IRQIO_CIO;
}
#ifdef CONFIG_CCW_CONSOLE #ifdef CONFIG_CCW_CONSOLE
int __init ccw_device_enable_console(struct ccw_device *cdev) int __init ccw_device_enable_console(struct ccw_device *cdev)
{ {
...@@ -1635,6 +1647,7 @@ struct ccw_device * __init ccw_device_create_console(struct ccw_driver *drv) ...@@ -1635,6 +1647,7 @@ struct ccw_device * __init ccw_device_create_console(struct ccw_driver *drv)
} }
cdev->drv = drv; cdev->drv = drv;
set_io_private(sch, io_priv); set_io_private(sch, io_priv);
ccw_device_set_int_class(cdev);
return cdev; return cdev;
} }
...@@ -1732,15 +1745,8 @@ ccw_device_probe (struct device *dev) ...@@ -1732,15 +1745,8 @@ ccw_device_probe (struct device *dev)
int ret; int ret;
cdev->drv = cdrv; /* to let the driver call _set_online */ cdev->drv = cdrv; /* to let the driver call _set_online */
/* Note: we interpret class 0 in this context as an uninitialized ccw_device_set_int_class(cdev);
* field since it translates to a non-I/O interrupt class. */
if (cdrv->int_class != 0)
cdev->private->int_class = cdrv->int_class;
else
cdev->private->int_class = IRQIO_CIO;
ret = cdrv->probe ? cdrv->probe(cdev) : -ENODEV; ret = cdrv->probe ? cdrv->probe(cdev) : -ENODEV;
if (ret) { if (ret) {
cdev->drv = NULL; cdev->drv = NULL;
cdev->private->int_class = IRQIO_CIO; cdev->private->int_class = IRQIO_CIO;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册