s390/cio: reactivate cmf after hibernate
authorSebastian Ott <sebott@linux.vnet.ibm.com>
Wed, 9 Sep 2015 08:29:59 +0000 (10:29 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 14 Oct 2015 12:32:04 +0000 (14:32 +0200)
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: Sebastian Ott <sebott@linux.vnet.ibm.com>
Reviewed-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/cio/cmf.c
drivers/s390/cio/css.c
drivers/s390/cio/device.h

index de7074fc6a2cbd96a6bd0e5fca9651a234ce1864..b2afad5a5682b128fd665442fb987638aa7873c0 100644 (file)
@@ -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),
index 0268e5fd59b5522fe1d61dbf90ddf17ed4e2df1f..25b4ee1fb2f43cad1a2cc3b2e50eebead1da23c0 100644 (file)
@@ -1089,6 +1089,7 @@ void channel_subsystem_reinit(void)
                if (chp)
                        chp_update_desc(chp);
        }
+       cmf_reactivate();
 }
 
 #ifdef CONFIG_PROC_FS
index 8d1d298731722397d74fd0069ff3f6843df37bae..6b17119c99291be49d8c551d28308dce1c2e776e 100644 (file)
@@ -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