[S390] css: update descriptor after hibernate
authorSebastian Ott <sebott@linux.vnet.ibm.com>
Mon, 25 Oct 2010 14:10:32 +0000 (16:10 +0200)
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>
Mon, 25 Oct 2010 14:10:18 +0000 (16:10 +0200)
Update the channel path descriptors after hibernation.
This is done unlocked, since we are the only active
task at this time.

Note: chsc_determine_base_channel_path_desc is changed
to use spin_lock_irqsave, since it's called with
interrupts disabled in this case.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/cio/chsc.c
drivers/s390/cio/css.c

index 44d7cc2f9738dcf389c0dba5ad53bcd49730beb3..1aaddea673e07310e2db903c547a21a1ec36636e 100644 (file)
@@ -680,9 +680,10 @@ int chsc_determine_base_channel_path_desc(struct chp_id chpid,
 {
        struct chsc_response_struct *chsc_resp;
        struct chsc_scpd *scpd_area;
+       unsigned long flags;
        int ret;
 
-       spin_lock_irq(&chsc_page_lock);
+       spin_lock_irqsave(&chsc_page_lock, flags);
        scpd_area = chsc_page;
        ret = chsc_determine_channel_path_desc(chpid, 0, 0, 0, 0, scpd_area);
        if (ret)
@@ -690,7 +691,7 @@ int chsc_determine_base_channel_path_desc(struct chp_id chpid,
        chsc_resp = (void *)&scpd_area->response;
        memcpy(desc, &chsc_resp->data, sizeof(*desc));
 out:
-       spin_unlock_irq(&chsc_page_lock);
+       spin_unlock_irqrestore(&chsc_page_lock, flags);
        return ret;
 }
 
index 5e1235c6aba082d7812d97d5de175cf621721570..771576bb292871ba3429240e11d2b976b9179031 100644 (file)
@@ -1030,7 +1030,16 @@ subsys_initcall_sync(channel_subsystem_init_sync);
 
 void channel_subsystem_reinit(void)
 {
+       struct channel_path *chp;
+       struct chp_id chpid;
+
        chsc_enable_facility(CHSC_SDA_OC_MSS);
+       chp_id_for_each(&chpid) {
+               chp = chpid_to_chp(chpid);
+               if (!chp)
+                       continue;
+               chsc_determine_base_channel_path_desc(chpid, &chp->desc);
+       }
 }
 
 #ifdef CONFIG_PROC_FS