aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi/ghes.h
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2013-02-15 04:10:39 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-02-25 17:41:51 -0500
commit21480547c8b85be6c08c4d77ed514673b73eda8a (patch)
tree1ea79a66c55128e36cfc4334bd6f00db3593e9fc /include/acpi/ghes.h
parent40e064153814ce534a28714b25cb98259f107d96 (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.h27
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 {
27struct ghes_estatus_node { 27struct 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
32struct ghes_estatus_cache { 33struct 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
51void ghes_edac_report_mem_error(struct ghes *ghes, int sev,
52 struct cper_sec_mem_err *mem_err);
53
54int ghes_edac_register(struct ghes *ghes, struct device *dev);
55
56void ghes_edac_unregister(struct ghes *ghes);
57
58#else
59static inline void ghes_edac_report_mem_error(struct ghes *ghes, int sev,
60 struct cper_sec_mem_err *mem_err)
61{
62}
63
64static inline int ghes_edac_register(struct ghes *ghes, struct device *dev)
65{
66 return 0;
67}
68
69static inline void ghes_edac_unregister(struct ghes *ghes)
70{
71}
72#endif