Merge branch 'linux_next' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
[pandora-kernel.git] / arch / x86 / kernel / cpu / mcheck / mce.c
index 707165d..18cc425 100644 (file)
@@ -36,6 +36,7 @@
 #include <linux/fs.h>
 #include <linux/mm.h>
 #include <linux/debugfs.h>
+#include <linux/edac_mce.h>
 
 #include <asm/processor.h>
 #include <asm/hw_irq.h>
@@ -168,6 +169,15 @@ void mce_log(struct mce *mce)
        for (;;) {
                entry = rcu_dereference_check_mce(mcelog.next);
                for (;;) {
+                       /*
+                        * If edac_mce is enabled, it will check the error type
+                        * and will process it, if it is a known error.
+                        * Otherwise, the error will be sent through mcelog
+                        * interface
+                        */
+                       if (edac_mce_parse(mce))
+                               return;
+
                        /*
                         * When the buffer fills up discard new entries.
                         * Assume that the earlier errors are the more