Merge to Fedora kernel-2.6.18-1.2224_FC5 patched with stable patch-2.6.18.1-vs2.0...
[linux-2.6.git] / drivers / s390 / s390mach.c
index f99e553..5399c5d 100644 (file)
@@ -8,12 +8,12 @@
  *              Martin Schwidefsky (schwidefsky@de.ibm.com)
  */
 
-#include <linux/config.h>
 #include <linux/init.h>
 #include <linux/sched.h>
 #include <linux/errno.h>
 #include <linux/workqueue.h>
 #include <linux/time.h>
+#include <linux/kthread.h>
 
 #include <asm/lowcore.h>
 
@@ -56,8 +56,6 @@ s390_collect_crw_info(void *param)
        unsigned int chain;
 
        sem = (struct semaphore *)param;
-       /* Set a nice name. */
-       daemonize("kmcheck");
 repeat:
        down_interruptible(sem);
        slow = 0;
@@ -113,6 +111,16 @@ repeat:
                        break;
                case CRW_RSC_CPATH:
                        pr_debug("source is channel path %02X\n", crw[0].rsid);
+                       /*
+                        * Check for solicited machine checks. These are
+                        * created by reset channel path and need not be
+                        * reported to the common I/O layer.
+                        */
+                       if (crw[chain].slct) {
+                               DBG(KERN_INFO"solicited machine check for "
+                                   "channel path %02X\n", crw[0].rsid);
+                               break;
+                       }
                        switch (crw[0].erc) {
                        case CRW_ERC_IPARM: /* Path has come. */
                                ret = chp_process_crw(crw[0].rsid, 1);
@@ -380,6 +388,8 @@ s390_do_machine_check(struct pt_regs *regs)
        struct mcck_struct *mcck;
        int umode;
 
+       lockdep_off();
+
        mci = (struct mci *) &S390_lowcore.mcck_interruption_code;
        mcck = &__get_cpu_var(cpu_mcck);
        umode = user_mode(regs);
@@ -484,6 +494,7 @@ s390_do_machine_check(struct pt_regs *regs)
                mcck->warning = 1;
                set_thread_flag(TIF_MCCK_PENDING);
        }
+       lockdep_on();
 }
 
 /*
@@ -516,7 +527,7 @@ arch_initcall(machine_check_init);
 static int __init
 machine_check_crw_init (void)
 {
-       kernel_thread(s390_collect_crw_info, &m_sem, CLONE_FS|CLONE_FILES);
+       kthread_run(s390_collect_crw_info, &m_sem, "kmcheck");
        ctl_set_bit(14, 28);    /* enable channel report MCH */
        return 0;
 }