Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

EDAC: Add an edac_report parameter to EDAC

This new parameter is used to control how to report HW error reporting,
especially for newer Intel platform, like Ivybridge-EX, which contains
an enhanced error decoding functionality in the firmware, i.e. eMCA.

Signed-off-by: Chen, Gong <gong.chen@linux.intel.com>
Acked-by: Tony Luck <tony.luck@intel.com>
Link: http://lkml.kernel.org/r/1386310630-12529-2-git-send-email-gong.chen@linux.intel.com
[ Boris: massage commit message. ]
Signed-off-by: Borislav Petkov <bp@suse.de>

authored by

Chen, Gong and committed by
Borislav Petkov
c700f013 545104dd

+55
+8
Documentation/kernel-parameters.txt
··· 881 881 882 882 The xen output can only be used by Xen PV guests. 883 883 884 + edac_report= [HW,EDAC] Control how to report EDAC event 885 + Format: {"on" | "off" | "force"} 886 + on: enable EDAC to report H/W event. May be overridden 887 + by other higher priority error reporting module. 888 + off: disable H/W event reporting through EDAC. 889 + force: enforce the use of EDAC to report H/W event. 890 + default: on. 891 + 884 892 ekgdboc= [X86,KGDB] Allow early kernel console debugging 885 893 ekgdboc=kbd 886 894
+19
drivers/edac/edac_stub.c
··· 29 29 30 30 static atomic_t edac_subsys_valid = ATOMIC_INIT(0); 31 31 32 + int edac_report_status = EDAC_REPORTING_ENABLED; 33 + EXPORT_SYMBOL_GPL(edac_report_status); 34 + 35 + static int __init edac_report_setup(char *str) 36 + { 37 + if (!str) 38 + return -EINVAL; 39 + 40 + if (!strncmp(str, "on", 2)) 41 + set_edac_report_status(EDAC_REPORTING_ENABLED); 42 + else if (!strncmp(str, "off", 3)) 43 + set_edac_report_status(EDAC_REPORTING_DISABLED); 44 + else if (!strncmp(str, "force", 5)) 45 + set_edac_report_status(EDAC_REPORTING_FORCE); 46 + 47 + return 0; 48 + } 49 + __setup("edac_report=", edac_report_setup); 50 + 32 51 /* 33 52 * called to determine if there is an EDAC driver interested in 34 53 * knowing an event (such as NMI) occurred
+28
include/linux/edac.h
··· 35 35 extern struct bus_type *edac_get_sysfs_subsys(void); 36 36 extern void edac_put_sysfs_subsys(void); 37 37 38 + enum { 39 + EDAC_REPORTING_ENABLED, 40 + EDAC_REPORTING_DISABLED, 41 + EDAC_REPORTING_FORCE 42 + }; 43 + 44 + extern int edac_report_status; 45 + #ifdef CONFIG_EDAC 46 + static inline int get_edac_report_status(void) 47 + { 48 + return edac_report_status; 49 + } 50 + 51 + static inline void set_edac_report_status(int new) 52 + { 53 + edac_report_status = new; 54 + } 55 + #else 56 + static inline int get_edac_report_status(void) 57 + { 58 + return EDAC_REPORTING_DISABLED; 59 + } 60 + 61 + static inline void set_edac_report_status(int new) 62 + { 63 + } 64 + #endif 65 + 38 66 static inline void opstate_init(void) 39 67 { 40 68 switch (edac_op_state) {