提交 e77737e8 编写于 作者: Z Zhang Zekun 提交者: Zhong Jinghua

driver: Add CONFIG_ACPI_APEI_GHES_TS_CORE for code isolation

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I6HRGK

-------------------------------------------------

Add CONFIG_ACPI_APEI_GHES_TS_CORE to isolate code introduced in
01dbadfe.
Signed-off-by: NZhang Zekun <zhangzekun11@huawei.com>
上级 afb172d7
......@@ -721,6 +721,7 @@ CONFIG_ACPI_HMAT=y
CONFIG_HAVE_ACPI_APEI=y
CONFIG_ACPI_APEI=y
CONFIG_ACPI_APEI_GHES=y
CONFIG_ACPI_APEI_GHES_TS_CORE=y
CONFIG_ACPI_APEI_PCIEAER=y
CONFIG_ACPI_APEI_SEA=y
CONFIG_ACPI_APEI_MEMORY_FAILURE=y
......
......@@ -33,6 +33,13 @@ config ACPI_APEI_GHES
by firmware to produce more valuable hardware error
information for Linux.
config ACPI_APEI_GHES_TS_CORE
bool "Support ts core ras process for ascend"
depends on ARM64 && ACPI_APEI_GHES
default n
help
Enable the support for ts core ras process for ascend.
config ACPI_APEI_PCIEAER
bool "APEI PCIe AER logging/recovering support"
depends on ACPI_APEI && PCIEAER
......
......@@ -118,8 +118,10 @@ module_param_named(disable, ghes_disable, bool, 0);
static LIST_HEAD(ghes_hed);
static DEFINE_MUTEX(ghes_list_mutex);
#ifdef CONFIG_ACPI_APEI_GHES_TS_CORE
BLOCKING_NOTIFIER_HEAD(ghes_ts_err_chain);
EXPORT_SYMBOL(ghes_ts_err_chain);
#endif
/*
* Because the memory area used to transfer hardware error information
......@@ -657,10 +659,12 @@ static bool ghes_do_proc(struct ghes *ghes,
}
else if (guid_equal(sec_type, &CPER_SEC_PROC_ARM)) {
queued = ghes_handle_arm_hw_error(gdata, sev);
#ifdef CONFIG_ACPI_APEI_GHES_TS_CORE
}
else if (guid_equal(sec_type, &CPER_SEC_TS_CORE)) {
blocking_notifier_call_chain(&ghes_ts_err_chain,
0, acpi_hest_get_payload(gdata));
#endif
} else {
void *err = acpi_hest_get_payload(gdata);
......
......@@ -145,6 +145,8 @@ int ghes_notify_sea(void);
static inline int ghes_notify_sea(void) { return -ENOENT; }
#endif
#ifdef CONFIG_ACPI_APEI_GHES_TS_CORE
extern struct blocking_notifier_head ghes_ts_err_chain;
#endif
#endif /* GHES_H */
......@@ -197,10 +197,13 @@ enum {
#define CPER_SEC_DMAR_IOMMU \
GUID_INIT(0x036F84E1, 0x7F37, 0x428c, 0xA7, 0x9E, 0x57, 0x5F, \
0xDF, 0xAA, 0x84, 0xEC)
#ifdef CONFIG_ACPI_APEI_GHES_TS_CORE
/* HISI ts core */
#define CPER_SEC_TS_CORE \
GUID_INIT(0xeb4c71f8, 0xbc76, 0x4c46, 0xbd, 0x9, 0xd0, 0xd3, \
0x45, 0x0, 0x5a, 0x92)
#endif
#define CPER_PROC_VALID_TYPE 0x0001
#define CPER_PROC_VALID_ISA 0x0002
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册