diff options
author | Chen, Gong <gong.chen@linux.intel.com> | 2013-12-06 01:17:08 -0500 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2013-12-11 12:06:47 -0500 |
commit | c700f013adb0ec57518a7fe0163e3117659ce249 (patch) | |
tree | 6912ad9bc257178853c1f1c7e7c643391227dde7 | |
parent | 545104dd2ba0feb62544284ee1d6c98fe6ef8245 (diff) |
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>
-rw-r--r-- | Documentation/kernel-parameters.txt | 8 | ||||
-rw-r--r-- | drivers/edac/edac_stub.c | 19 | ||||
-rw-r--r-- | include/linux/edac.h | 28 |
3 files changed, 55 insertions, 0 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 50680a59a2ff..453092c822f1 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -881,6 +881,14 @@ bytes respectively. Such letter suffixes can also be entirely omitted. | |||
881 | 881 | ||
882 | The xen output can only be used by Xen PV guests. | 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 | ekgdboc= [X86,KGDB] Allow early kernel console debugging | 892 | ekgdboc= [X86,KGDB] Allow early kernel console debugging |
885 | ekgdboc=kbd | 893 | ekgdboc=kbd |
886 | 894 | ||
diff --git a/drivers/edac/edac_stub.c b/drivers/edac/edac_stub.c index 351945fa2ecd..9d9e18aefaaa 100644 --- a/drivers/edac/edac_stub.c +++ b/drivers/edac/edac_stub.c | |||
@@ -29,6 +29,25 @@ EXPORT_SYMBOL_GPL(edac_err_assert); | |||
29 | 29 | ||
30 | static atomic_t edac_subsys_valid = ATOMIC_INIT(0); | 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 | * called to determine if there is an EDAC driver interested in | 52 | * called to determine if there is an EDAC driver interested in |
34 | * knowing an event (such as NMI) occurred | 53 | * knowing an event (such as NMI) occurred |
diff --git a/include/linux/edac.h b/include/linux/edac.h index dbdffe8d4469..8e6c20af11a2 100644 --- a/include/linux/edac.h +++ b/include/linux/edac.h | |||
@@ -35,6 +35,34 @@ extern void edac_atomic_assert_error(void); | |||
35 | extern struct bus_type *edac_get_sysfs_subsys(void); | 35 | extern struct bus_type *edac_get_sysfs_subsys(void); |
36 | extern void edac_put_sysfs_subsys(void); | 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 | static inline void opstate_init(void) | 66 | static inline void opstate_init(void) |
39 | { | 67 | { |
40 | switch (edac_op_state) { | 68 | switch (edac_op_state) { |