Message ID | 1467831301-17233-1-git-send-email-minyard@acm.org |
---|---|
State | Superseded |
Headers | show |
On 07/11/2016 12:34 PM, Steven Rostedt wrote: > On Wed, 6 Jul 2016 13:55:01 -0500 > minyard@acm.org wrote: > >> From: Corey Minyard <cminyard@mvista.com> >> >> On some x86 systems an MCE interrupt would come in before the kernel >> was ready for it. Looking at the latest RT code, it has similar >> (but not quite the same) code, except it adds a bool that tells if >> MCE handling is initialized. That was required because they had >> switched to use swork instead of a kernel thread. Here, just >> checking to see if the thread is NULL is good enough to see if >> MCE handling is initialized. >> >> Signed-off-by: Corey Minyard <cminyard@mvista.com> >> --- >> arch/x86/kernel/cpu/mcheck/mce.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c >> index aaf4b9b..cc70d98 100644 >> --- a/arch/x86/kernel/cpu/mcheck/mce.c >> +++ b/arch/x86/kernel/cpu/mcheck/mce.c >> @@ -1391,7 +1391,8 @@ static int mce_notify_work_init(void) >> >> static void mce_notify_work(void) >> { >> - wake_up_process(mce_notify_helper); >> + if (mce_notify_helper) >> + wake_up_process(mce_notify_helper); >> } >> #else >> static void mce_notify_work(void) > > Wait, is this all that's needed? Yes, that's it. > Also, Boris should be credited here somewhere. Indeed, he should. I'll issue V3. -corey > -- Steve -- To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index aaf4b9b..cc70d98 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/arch/x86/kernel/cpu/mcheck/mce.c @@ -1391,7 +1391,8 @@ static int mce_notify_work_init(void) static void mce_notify_work(void) { - wake_up_process(mce_notify_helper); + if (mce_notify_helper) + wake_up_process(mce_notify_helper); } #else static void mce_notify_work(void)