From 6441c1fe05beb41b3d786c9de47f03395486e682 Mon Sep 17 00:00:00 2001 From: Xu Qiang Date: Thu, 7 Nov 2019 17:28:15 +0800 Subject: [PATCH] driver: support ts core ras process ascend inclusion category: feature bugzilla: NA CVE: NA ------------ Support ts core ras process for ascend. Signed-off-by: Xu Qiang Signed-off-by: Lijun Fang Reviewed-by: Hanjun Guo Signed-off-by: Yang Yingliang --- drivers/acpi/apei/ghes.c | 6 ++++++ include/acpi/ghes.h | 2 ++ include/linux/cper.h | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index c7062203fdfd..622a988b6973 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@ -112,6 +112,9 @@ static DEFINE_MUTEX(ghes_list_mutex); ATOMIC_NOTIFIER_HEAD(ghes_mem_err_chain); EXPORT_SYMBOL(ghes_mem_err_chain); +BLOCKING_NOTIFIER_HEAD(ghes_ts_err_chain); +EXPORT_SYMBOL(ghes_ts_err_chain); + /* * Because the memory area used to transfer hardware error information * from BIOS to Linux can be determined only in NMI, IRQ or timer @@ -509,6 +512,9 @@ static void ghes_do_proc(struct ghes *ghes, struct cper_sec_proc_arm *err = acpi_hest_get_payload(gdata); ghes_arm_process_error(ghes, err); + } else if (guid_equal(sec_type, &CPER_SEC_TS_CORE)) { + blocking_notifier_call_chain(&ghes_ts_err_chain, + 0, acpi_hest_get_payload(gdata)); } else { void *err = acpi_hest_get_payload(gdata); diff --git a/include/acpi/ghes.h b/include/acpi/ghes.h index c058516785e0..4c536a2638df 100644 --- a/include/acpi/ghes.h +++ b/include/acpi/ghes.h @@ -134,4 +134,6 @@ struct ghes_mem_err { extern struct atomic_notifier_head ghes_mem_err_chain; +extern struct blocking_notifier_head ghes_ts_err_chain; + #endif /* GHES_H */ diff --git a/include/linux/cper.h b/include/linux/cper.h index 9c703a0abe6e..63bf54d0e14c 100644 --- a/include/linux/cper.h +++ b/include/linux/cper.h @@ -214,6 +214,10 @@ enum { #define CPER_SEC_DMAR_IOMMU \ GUID_INIT(0x036F84E1, 0x7F37, 0x428c, 0xA7, 0x9E, 0x57, 0x5F, \ 0xDF, 0xAA, 0x84, 0xEC) +/* HISI ts core */ +#define CPER_SEC_TS_CORE \ + GUID_INIT(0xeb4c71f8, 0xbc76, 0x4c46, 0xbd, 0x9, 0xd0, 0xd3, \ + 0x45, 0x0, 0x5a, 0x92) #define CPER_PROC_VALID_TYPE 0x0001 #define CPER_PROC_VALID_ISA 0x0002 -- GitLab