Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[cascardo/linux.git] / arch / x86 / kernel / cpu / mcheck / mce.c
index 8cf60e2..292d025 100644 (file)
@@ -60,8 +60,6 @@ static DEFINE_MUTEX(mce_chrdev_read_mutex);
 
 int mce_disabled __read_mostly;
 
-#define MISC_MCELOG_MINOR      227
-
 #define SPINUNIT 100   /* 100ns */
 
 atomic_t mce_entry;
@@ -1196,6 +1194,7 @@ void mce_notify_process(void)
 {
        unsigned long pfn;
        struct mce_info *mi = mce_find_info();
+       int flags = MF_ACTION_REQUIRED;
 
        if (!mi)
                mce_panic("Lost physical address for unconsumed uncorrectable error", NULL, NULL);
@@ -1210,8 +1209,9 @@ void mce_notify_process(void)
         * doomed. We still need to mark the page as poisoned and alert any
         * other users of the page.
         */
-       if (memory_failure(pfn, MCE_VECTOR, MF_ACTION_REQUIRED) < 0 ||
-                          mi->restartable == 0) {
+       if (!mi->restartable)
+               flags |= MF_MUST_KILL;
+       if (memory_failure(pfn, MCE_VECTOR, flags) < 0) {
                pr_err("Memory error not recovered");
                force_sig(SIGBUS, current);
        }
@@ -2381,7 +2381,7 @@ static __init int mcheck_init_device(void)
 
        return err;
 }
-device_initcall(mcheck_init_device);
+device_initcall_sync(mcheck_init_device);
 
 /*
  * Old style boot options parsing. Only for compatibility.