Skip to content

Commit 5de97c9

Browse files
aeglIngo Molnar
authored andcommitted
x86/mce: Factor out and deprecate the /dev/mcelog driver
Move all code relating to /dev/mcelog to a separate source file. /dev/mcelog driver can now operate from the machine check notifier with lowest prio. Signed-off-by: Tony Luck <[email protected]> [ Move the mce_helper and trigger functionality behind CONFIG_X86_MCELOG_LEGACY. ] Signed-off-by: Borislav Petkov <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: linux-edac <[email protected]> Link: http://lkml.kernel.org/r/[email protected] [ Renamed CONFIG_X86_MCELOG to CONFIG_X86_MCELOG_LEGACY. ] Signed-off-by: Ingo Molnar <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
1 parent 011d826 commit 5de97c9

File tree

6 files changed

+426
-364
lines changed

6 files changed

+426
-364
lines changed

arch/x86/Kconfig

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1043,6 +1043,14 @@ config X86_MCE
10431043
The action the kernel takes depends on the severity of the problem,
10441044
ranging from warning messages to halting the machine.
10451045

1046+
config X86_MCELOG_LEGACY
1047+
bool "Support for deprecated /dev/mcelog character device"
1048+
depends on X86_MCE
1049+
---help---
1050+
Enable support for /dev/mcelog which is needed by the old mcelog
1051+
userspace logging daemon. Consider switching to the new generation
1052+
rasdaemon solution.
1053+
10461054
config X86_MCE_INTEL
10471055
def_bool y
10481056
prompt "Intel MCE features"
@@ -1072,7 +1080,7 @@ config X86_MCE_THRESHOLD
10721080
def_bool y
10731081

10741082
config X86_MCE_INJECT
1075-
depends on X86_MCE && X86_LOCAL_APIC
1083+
depends on X86_MCE && X86_LOCAL_APIC && X86_MCELOG_LEGACY
10761084
tristate "Machine check injector support"
10771085
---help---
10781086
Provide support for injecting machine checks for testing purposes.

arch/x86/include/asm/mce.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ enum mce_notifier_prios {
196196
MCE_PRIO_EXTLOG = INT_MAX - 2,
197197
MCE_PRIO_NFIT = INT_MAX - 3,
198198
MCE_PRIO_EDAC = INT_MAX - 4,
199+
MCE_PRIO_MCELOG = 1,
199200
MCE_PRIO_LOWEST = 0,
200201
};
201202

arch/x86/kernel/cpu/mcheck/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ obj-$(CONFIG_X86_MCE_INJECT) += mce-inject.o
99
obj-$(CONFIG_X86_THERMAL_VECTOR) += therm_throt.o
1010

1111
obj-$(CONFIG_ACPI_APEI) += mce-apei.o
12+
13+
obj-$(CONFIG_X86_MCELOG_LEGACY) += dev-mcelog.o

0 commit comments

Comments
 (0)