|
12 | 12 | #include <linux/ratelimit.h> |
13 | 13 | #include <linux/edac.h> |
14 | 14 | #include <linux/ras.h> |
| 15 | +#include <cxl/event.h> |
15 | 16 | #include <acpi/ghes.h> |
16 | 17 | #include <asm/cpu.h> |
17 | 18 | #include <asm/mce.h> |
@@ -162,6 +163,23 @@ static void extlog_print_pcie(struct cper_sec_pcie *pcie_err, |
162 | 163 | #endif |
163 | 164 | } |
164 | 165 |
|
| 166 | +static void |
| 167 | +extlog_cxl_cper_handle_prot_err(struct cxl_cper_sec_prot_err *prot_err, |
| 168 | + int severity) |
| 169 | +{ |
| 170 | +#ifdef ACPI_APEI_PCIEAER |
| 171 | + struct cxl_cper_prot_err_work_data wd; |
| 172 | + |
| 173 | + if (cxl_cper_sec_prot_err_valid(prot_err)) |
| 174 | + return; |
| 175 | + |
| 176 | + if (cxl_cper_setup_prot_err_work_data(&wd, prot_err, severity)) |
| 177 | + return; |
| 178 | + |
| 179 | + cxl_cper_handle_prot_err(&wd); |
| 180 | +#endif |
| 181 | +} |
| 182 | + |
165 | 183 | static int extlog_print(struct notifier_block *nb, unsigned long val, |
166 | 184 | void *data) |
167 | 185 | { |
@@ -213,6 +231,12 @@ static int extlog_print(struct notifier_block *nb, unsigned long val, |
213 | 231 | if (gdata->error_data_length >= sizeof(*mem)) |
214 | 232 | trace_extlog_mem_event(mem, err_seq, fru_id, fru_text, |
215 | 233 | (u8)gdata->error_severity); |
| 234 | + } else if (guid_equal(sec_type, &CPER_SEC_CXL_PROT_ERR)) { |
| 235 | + struct cxl_cper_sec_prot_err *prot_err = |
| 236 | + acpi_hest_get_payload(gdata); |
| 237 | + |
| 238 | + extlog_cxl_cper_handle_prot_err(prot_err, |
| 239 | + gdata->error_severity); |
216 | 240 | } else if (guid_equal(sec_type, &CPER_SEC_PCIE)) { |
217 | 241 | struct cper_sec_pcie *pcie_err = acpi_hest_get_payload(gdata); |
218 | 242 |
|
|
0 commit comments