]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86_64/kernel/signal.c
x86_64: support poll() on /dev/mcelog
[linux-2.6-omap-h63xx.git] / arch / x86_64 / kernel / signal.c
index 290f5d8037cd804e6fedbc9e1b7b602e5db10b58..4886afcd628746c2f78b0516754de3e47eadad50 100644 (file)
@@ -26,6 +26,7 @@
 #include <asm/i387.h>
 #include <asm/proto.h>
 #include <asm/ia32_unistd.h>
+#include <asm/mce.h>
 
 /* #define DEBUG_SIG 1 */
 
@@ -472,6 +473,12 @@ do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags)
                clear_thread_flag(TIF_SINGLESTEP);
        }
 
+#ifdef CONFIG_X86_MCE
+       /* notify userspace of pending MCEs */
+       if (thread_info_flags & _TIF_MCE_NOTIFY)
+               mce_notify_user();
+#endif /* CONFIG_X86_MCE */
+
        /* deal with pending signal delivery */
        if (thread_info_flags & (_TIF_SIGPENDING|_TIF_RESTORE_SIGMASK))
                do_signal(regs);