OSDN Git Service

x86/mcheck: Split threshold_cpu_callback into two callbacks
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Thu, 10 Nov 2016 17:44:44 +0000 (18:44 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 16 Nov 2016 08:34:17 +0000 (09:34 +0100)
commit4d7b02d58c4000597d08930193d7aed81fba6b7c
treeb004920a6d86ae5924834478dbfe1eb9ccc351f3
parent7f34b935e8bf2f5304fce273a8fa98c63886d686
x86/mcheck: Split threshold_cpu_callback into two callbacks

The threshold_cpu_callback callbacks looks like one of the notifier and
its arguments are almost the same. Split this out and have one ONLINE
and one DEAD callback. This will come handy later once the main code
gets changed to use the callback mechanism.
Also, handle threshold_cpu_callback_online() return value so we don't
continue if the function fails.

Boris Petkov removed the callback pointer and replaced it with proper
functions.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: Borislav Petkov <bp@alien8.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: rt@linutronix.de
Cc: linux-edac@vger.kernel.org
Link: http://lkml.kernel.org/r/20161110174447.11848-5-bigeasy@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/include/asm/mce.h
arch/x86/kernel/cpu/mcheck/mce.c
arch/x86/kernel/cpu/mcheck/mce_amd.c