diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-02-15 04:10:39 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-02-25 17:41:51 -0500 |
commit | 21480547c8b85be6c08c4d77ed514673b73eda8a (patch) | |
tree | 1ea79a66c55128e36cfc4334bd6f00db3593e9fc /include/acpi/ghes.h | |
parent | 40e064153814ce534a28714b25cb98259f107d96 (diff) |
ghes: add the needed hooks for EDAC error report
In order to allow reporting errors via EDAC, add hooks for:
1) register an EDAC driver;
2) unregister an EDAC driver;
3) report errors via EDAC.
As the EDAC driver will need to access the ghes structure, adds it
as one of the parameters for ghes_do_proc.
Acked-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/acpi/ghes.h')
-rw-r--r-- | include/acpi/ghes.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/include/acpi/ghes.h b/include/acpi/ghes.h index 3eb8dc483449..720446cb243e 100644 --- a/include/acpi/ghes.h +++ b/include/acpi/ghes.h | |||
@@ -27,6 +27,7 @@ struct ghes { | |||
27 | struct ghes_estatus_node { | 27 | struct ghes_estatus_node { |
28 | struct llist_node llnode; | 28 | struct llist_node llnode; |
29 | struct acpi_hest_generic *generic; | 29 | struct acpi_hest_generic *generic; |
30 | struct ghes *ghes; | ||
30 | }; | 31 | }; |
31 | 32 | ||
32 | struct ghes_estatus_cache { | 33 | struct ghes_estatus_cache { |
@@ -43,3 +44,29 @@ enum { | |||
43 | GHES_SEV_RECOVERABLE = 0x2, | 44 | GHES_SEV_RECOVERABLE = 0x2, |
44 | GHES_SEV_PANIC = 0x3, | 45 | GHES_SEV_PANIC = 0x3, |
45 | }; | 46 | }; |
47 | |||
48 | /* From drivers/edac/ghes_edac.c */ | ||
49 | |||
50 | #ifdef CONFIG_EDAC_GHES | ||
51 | void ghes_edac_report_mem_error(struct ghes *ghes, int sev, | ||
52 | struct cper_sec_mem_err *mem_err); | ||
53 | |||
54 | int ghes_edac_register(struct ghes *ghes, struct device *dev); | ||
55 | |||
56 | void ghes_edac_unregister(struct ghes *ghes); | ||
57 | |||
58 | #else | ||
59 | static inline void ghes_edac_report_mem_error(struct ghes *ghes, int sev, | ||
60 | struct cper_sec_mem_err *mem_err) | ||
61 | { | ||
62 | } | ||
63 | |||
64 | static inline int ghes_edac_register(struct ghes *ghes, struct device *dev) | ||
65 | { | ||
66 | return 0; | ||
67 | } | ||
68 | |||
69 | static inline void ghes_edac_unregister(struct ghes *ghes) | ||
70 | { | ||
71 | } | ||
72 | #endif | ||