summaryrefslogtreecommitdiff
path: root/include/acpi
diff options
context:
space:
mode:
authorJia He <justin.he@arm.com>2022-10-10 05:35:54 +0300
committerBorislav Petkov <bp@suse.de>2022-10-20 14:25:53 +0300
commit8e40612f6146da1333e9bb5cfd9af7511c063d93 (patch)
treee1621b95206741060abf52e2aac483a99b9675d9 /include/acpi
parent5012524eb051fccbb9f8729f0de1df7b7783333b (diff)
downloadlinux-8e40612f6146da1333e9bb5cfd9af7511c063d93.tar.xz
EDAC/ghes: Add a notifier for reporting memory errors
In order to make it a proper module and disentangle it from facilities, add a notifier for reporting memory errors. Use an atomic notifier because calls sites like ghes_proc_in_irq() run in interrupt context. [ bp: Massage commit message. ] Suggested-by: Borislav Petkov <bp@alien8.de> Signed-off-by: Jia He <justin.he@arm.com> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lore.kernel.org/r/20221010023559.69655-3-justin.he@arm.com
Diffstat (limited to 'include/acpi')
-rw-r--r--include/acpi/ghes.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/include/acpi/ghes.h b/include/acpi/ghes.h
index 34fb3431a8f3..5cbd38b6e4e1 100644
--- a/include/acpi/ghes.h
+++ b/include/acpi/ghes.h
@@ -76,18 +76,11 @@ int ghes_estatus_pool_init(int num_ghes);
/* From drivers/edac/ghes_edac.c */
#ifdef CONFIG_EDAC_GHES
-void ghes_edac_report_mem_error(int sev, struct cper_sec_mem_err *mem_err);
-
int ghes_edac_register(struct ghes *ghes, struct device *dev);
void ghes_edac_unregister(struct ghes *ghes);
#else
-static inline void ghes_edac_report_mem_error(int sev,
- struct cper_sec_mem_err *mem_err)
-{
-}
-
static inline int ghes_edac_register(struct ghes *ghes, struct device *dev)
{
return -ENODEV;
@@ -145,4 +138,7 @@ int ghes_notify_sea(void);
static inline int ghes_notify_sea(void) { return -ENOENT; }
#endif
+struct notifier_block;
+extern void ghes_register_report_chain(struct notifier_block *nb);
+extern void ghes_unregister_report_chain(struct notifier_block *nb);
#endif /* GHES_H */