On Tue, Oct 01, 2024 at 12:52:33AM +0000, Smita Koralahalli wrote:
UEFI v2.10 section N.2.13 defines a CPER record for CXL Protocol errors.
Add GHES support to detect CXL CPER Protocol Error Record and Cache Error
Severity, Device ID, Device Serial number and CXL RAS capability struct in
struct cxl_cper_prot_err. Include this struct as a member of struct
cxl_cper_work_data.
Signed-off-by: Smita Koralahalli <Smita.KoralahalliChannabasappa@xxxxxxx>
---
v2:
Defined array of structures for Device ID and Serial number
comparison.
p_err -> rec/p_rec.
---
drivers/acpi/apei/ghes.c | 10 +++
drivers/firmware/efi/cper_cxl.c | 115 ++++++++++++++++++++++++++++++++
include/cxl/event.h | 26 ++++++++
3 files changed, 151 insertions(+)
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index ada93cfde9ba..9dcf0f78458f 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -717,6 +717,14 @@ static void cxl_cper_post_event(enum cxl_event_type event_type,
schedule_work(cxl_cper_work);
}
+static void cxl_cper_handle_prot_err(struct acpi_hest_generic_data *gdata)
+{
+ struct cxl_cper_work_data wd;
+
+ if (cxl_cper_handle_prot_err_info(gdata, &wd.p_rec))
+ return;
+}
Why we need a if here? It seems the function will return anyway.
Fan