Message ID | 20241217135358.9345-9-ilpo.jarvinen@linux.intel.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
Series | PCI: Consolidate TLP Log reading and printing | expand |
On Tue, Dec 17, 2024 at 03:53:58PM +0200, Ilpo Järvinen wrote: > Only part of the AER diagnostic printouts use "AER:" prefix because > they use low-level pci_printk() directly to allow selecting level. > > Add "AER:" prefix to lines that are printed with pci_printk(). > Can we please include the "HW_ERR" prefix also? IMO, it would make the kernel messages more consistent if all hardware error info had it. Thanks, Yazen
On Tue, 17 Dec 2024, Yazen Ghannam wrote: > On Tue, Dec 17, 2024 at 03:53:58PM +0200, Ilpo Järvinen wrote: > > Only part of the AER diagnostic printouts use "AER:" prefix because > > they use low-level pci_printk() directly to allow selecting level. > > > > Add "AER:" prefix to lines that are printed with pci_printk(). > > Can we please include the "HW_ERR" prefix also? IMO, it would make the > kernel messages more consistent if all hardware error info had it. While I'm not against your suggestion, it doesn't belong into this patch as there are other lines beyond those touched in this patch that would need to have HW_ERR as well. I think I'll just drop this patch from this series and move it into the pci_printk() series to avoid the inter-series conflict. Adding the HW_ERR change would conflict badly with Karolina Stolarek's series so I'm not sure if I want to pursue that change at this point (it's only my todo list so it won't get forgotten).
diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c index ece8cb88d110..1c251ac65d1b 100644 --- a/drivers/pci/pcie/aer.c +++ b/drivers/pci/pcie/aer.c @@ -686,8 +686,8 @@ static void __aer_print_error(struct pci_dev *dev, if (!errmsg) errmsg = "Unknown Error Bit"; - pci_printk(level, dev, " [%2d] %-22s%s\n", i, errmsg, - info->first_error == i ? " (First)" : ""); + pci_printk(level, dev, "%s [%2d] %-22s%s\n", dev_fmt(""), i, + errmsg, info->first_error == i ? " (First)" : ""); } pci_dev_aer_stats_incr(dev, info); } @@ -709,12 +709,12 @@ void aer_print_error(struct pci_dev *dev, struct aer_err_info *info) level = (info->severity == AER_CORRECTABLE) ? KERN_WARNING : KERN_ERR; - pci_printk(level, dev, "PCIe Bus Error: severity=%s, type=%s, (%s)\n", - aer_error_severity_string[info->severity], + pci_printk(level, dev, "%sPCIe Bus Error: severity=%s, type=%s, (%s)\n", + dev_fmt(""), aer_error_severity_string[info->severity], aer_error_layer[layer], aer_agent_string[agent]); - pci_printk(level, dev, " device [%04x:%04x] error status/mask=%08x/%08x\n", - dev->vendor, dev->device, info->status, info->mask); + pci_printk(level, dev, "%s device [%04x:%04x] error status/mask=%08x/%08x\n", + dev_fmt(""), dev->vendor, dev->device, info->status, info->mask); __aer_print_error(dev, info);