Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ACPI: extlog: Trace CPER PCI Express Error Section

I/O Machine Check Architecture events may signal failing PCIe components
or links. The AER event contains details on what was happening on the wire
when the error was signaled.

Trace the CPER PCIe Error section (UEFI v2.11, Appendix N.2.7) reported
by the I/O MCA.

Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Signed-off-by: Fabio M. De Francesco <fabio.m.de.francesco@linux.intel.com>
Link: https://patch.msgid.link/20260114101543.85926-3-fabio.m.de.francesco@linux.intel.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

authored by

Fabio M. De Francesco and committed by
Rafael J. Wysocki
e778ffef a2995f7d

+35 -1
+34
drivers/acpi/acpi_extlog.c
··· 132 132 return 1; 133 133 } 134 134 135 + static void extlog_print_pcie(struct cper_sec_pcie *pcie_err, 136 + int severity) 137 + { 138 + #ifdef ACPI_APEI_PCIEAER 139 + struct aer_capability_regs *aer; 140 + struct pci_dev *pdev; 141 + unsigned int devfn; 142 + unsigned int bus; 143 + int aer_severity; 144 + int domain; 145 + 146 + if (!(pcie_err->validation_bits & CPER_PCIE_VALID_DEVICE_ID && 147 + pcie_err->validation_bits & CPER_PCIE_VALID_AER_INFO)) 148 + return; 149 + 150 + aer_severity = cper_severity_to_aer(severity); 151 + aer = (struct aer_capability_regs *)pcie_err->aer_info; 152 + domain = pcie_err->device_id.segment; 153 + bus = pcie_err->device_id.bus; 154 + devfn = PCI_DEVFN(pcie_err->device_id.device, 155 + pcie_err->device_id.function); 156 + pdev = pci_get_domain_bus_and_slot(domain, bus, devfn); 157 + if (!pdev) 158 + return; 159 + 160 + pci_print_aer(pdev, aer_severity, aer); 161 + pci_dev_put(pdev); 162 + #endif 163 + } 164 + 135 165 static int extlog_print(struct notifier_block *nb, unsigned long val, 136 166 void *data) 137 167 { ··· 213 183 if (gdata->error_data_length >= sizeof(*mem)) 214 184 trace_extlog_mem_event(mem, err_seq, fru_id, fru_text, 215 185 (u8)gdata->error_severity); 186 + } else if (guid_equal(sec_type, &CPER_SEC_PCIE)) { 187 + struct cper_sec_pcie *pcie_err = acpi_hest_get_payload(gdata); 188 + 189 + extlog_print_pcie(pcie_err, gdata->error_severity); 216 190 } else { 217 191 void *err = acpi_hest_get_payload(gdata); 218 192
+1 -1
drivers/pci/pcie/aer.c
··· 973 973 pcie_print_tlp_log(dev, &aer->header_log, info.level, 974 974 dev_fmt(" ")); 975 975 } 976 - EXPORT_SYMBOL_NS_GPL(pci_print_aer, "CXL"); 976 + EXPORT_SYMBOL_GPL(pci_print_aer); 977 977 978 978 /** 979 979 * add_error_device - list device to be handled