]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/s390/s390mach.c
[S390] ETR support.
[linux-2.6-omap-h63xx.git] / drivers / s390 / s390mach.c
index 442d63470428bd3a5432e2231dcbbb12ec4a4418..806bb1a921eb99e83822a9b2668ba150b26eecf3 100644 (file)
@@ -15,7 +15,7 @@
 #include <linux/time.h>
 #include <linux/device.h>
 #include <linux/kthread.h>
-
+#include <asm/etr.h>
 #include <asm/lowcore.h>
 #include <asm/cio.h>
 #include "cio/cio.h"
@@ -466,6 +466,19 @@ s390_do_machine_check(struct pt_regs *regs)
                        s390_handle_damage("unable to revalidate registers.");
        }
 
+       if (mci->cd) {
+               /* Timing facility damage */
+               s390_handle_damage("TOD clock damaged");
+       }
+
+       if (mci->ed && mci->ec) {
+               /* External damage */
+               if (S390_lowcore.external_damage_code & (1U << ED_ETR_SYNC))
+                       etr_sync_check();
+               if (S390_lowcore.external_damage_code & (1U << ED_ETR_SWITCH))
+                       etr_switch_to_local();
+       }
+
        if (mci->se)
                /* Storage error uncorrected */
                s390_handle_damage("received storage error uncorrected "
@@ -504,7 +517,7 @@ static int
 machine_check_init(void)
 {
        init_MUTEX_LOCKED(&m_sem);
-       ctl_clear_bit(14, 25);  /* disable external damage MCH */
+       ctl_set_bit(14, 25);    /* enable external damage MCH */
        ctl_set_bit(14, 27);    /* enable system recovery MCH */
 #ifdef CONFIG_MACHCHK_WARNING
        ctl_set_bit(14, 24);    /* enable warning MCH */