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

s390/cio: reactivate cmf after hibernate

During resume from hibernate we already reenable measurement block
updates on a per device basis. In addition to that we also need to
activate channel measurement globally using the set channel monitor
instruction.
Signed-off-by: NSebastian Ott <sebott@linux.vnet.ibm.com>
Reviewed-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
Reviewed-by: NCornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 45bf4b96
......@@ -1312,6 +1312,19 @@ int cmf_reenable(struct ccw_device *cdev)
return cmbops->set(cdev, 2);
}
/**
* cmf_reactivate() - reactivate measurement block updates
*
* Use this during resume from hibernate.
*/
void cmf_reactivate(void)
{
spin_lock(&cmb_area.lock);
if (!list_empty(&cmb_area.list))
cmf_activate(cmb_area.mem, 1);
spin_unlock(&cmb_area.lock);
}
static int __init init_cmbe(void)
{
cmbe_cache = kmem_cache_create("cmbe_cache", sizeof(struct cmbe),
......
......@@ -1089,6 +1089,7 @@ void channel_subsystem_reinit(void)
if (chp)
chp_update_desc(chp);
}
cmf_reactivate();
}
#ifdef CONFIG_PROC_FS
......
......@@ -145,6 +145,7 @@ void ccw_device_set_timeout(struct ccw_device *, int);
void retry_set_schib(struct ccw_device *cdev);
void cmf_retry_copy_block(struct ccw_device *);
int cmf_reenable(struct ccw_device *);
void cmf_reactivate(void);
int ccw_set_cmf(struct ccw_device *cdev, int enable);
extern struct device_attribute dev_attr_cmb_enable;
#endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册