Hi all,
This set adds basic support for using the Flit Logging capability
introduced in PCIe v6.0.
The work was started by Avadhut, and I took over after he left AMD.
Design Notes and Limitations:
* Only enabled for ports using a service driver.
* Other device types can and do support this capability.
* The interrupt is managed per-device. So each driver would need to add
their own support. In other words, there isn't a centralized handling
flow as currently described in the spec.
* A future Flit Logging capability revision will use a centralized flow
similar to AER. But that is not covered in this set.
* Included ratelimiting for messages.
* Initial thought was to do "interrupt storm handling" similar to MCA.
* It's not clear to me if that's necessary, so I went with a similar
solution to AER.
* Flit logging CPER decoding is not covered.
* There is a proposed change to include DPC and Flit data in the PCIe
CPER section format. This would be used in FW-First handling.
* IIRC, the format still isn't settled, so I left it out of this set.
AI Assistance Notes:
* Patch 2 was originally written by Avadhut, and I made a few fixups.
* The code in patch 3 was originally written by me.
* Patches 1, 4, and 5 were written with AI assistance.
* AI assistance was used for squashing, splitting, refactoring, and
reviewing the patches.
Thanks,
Yazen
Avadhut Naik (1):
PCI/FLIT: Add support for Flit Logging Extended Capability
Yazen Ghannam (4):
PCI/portdrv: Group PCI Exp Cap services into a single mask
PCI/FLIT: Negotiate _OSC control for Flit Error Logging
PCI/FLIT: Add trace event for flit errors
PCI/FLIT: Ratelimit flit error logging
drivers/acpi/pci_root.c | 6 +
drivers/pci/pci-sysfs.c | 3 +
drivers/pci/pci.h | 7 +
drivers/pci/pcie/Kconfig | 11 ++
drivers/pci/pcie/Makefile | 1 +
drivers/pci/pcie/flit.c | 283 ++++++++++++++++++++++++++++++++++
drivers/pci/pcie/portdrv.c | 23 ++-
drivers/pci/pcie/portdrv.h | 10 +-
drivers/pci/probe.c | 2 +
include/linux/acpi.h | 1 +
include/linux/pci.h | 7 +
include/ras/ras_event.h | 48 ++++++
include/uapi/linux/pci_regs.h | 14 +-
13 files changed, 409 insertions(+), 7 deletions(-)
create mode 100644 drivers/pci/pcie/flit.c
base-commit: 5d9f1dd3b3e7bd64ac7ddedf28fcb7db81053819
--
2.53.0