Re: [PATCH v2 0/3] Add support for RAS DES feature in PCIe DW controller

From: Manivannan Sadhasivam
Date: Thu Nov 30 2023 - 11:55:29 EST


On Thu, Nov 30, 2023 at 05:20:41PM +0530, Shradha Todi wrote:
> DesignWare controller provides a vendor specific extended capability
> called RASDES as an IP feature. This extended capability provides
> hardware information like:
> - Debug registers to know the state of the link or controller.
> - Error injection mechanisms to inject various PCIe errors including
> sequence number, CRC
> - Statistical counters to know how many times a particular event
> occurred
>
> However, in Linux we do not have any generic or custom support to be
> able to use this feature in an efficient manner. This is the reason we
> are proposing this framework. Debug and bring up time of high-speed IPs
> are highly dependent on costlier hardware analyzers and this solution
> will in some ways help to reduce the HW analyzer usage.
>
> The debugfs entries can be used to get information about underlying
> hardware and can be shared with user space. Separate debugfs entries has
> been created to cater to all the DES hooks provided by the controller.
> The debugfs entries interacts with the RASDES registers in the required
> sequence and provides the meaningful data to the user. This eases the
> effort to understand and use the register information for debugging.
>
> v1 version was posted long back and for some reasons I couldn't work on
> it. I apologize for the long break. I'm restarting this activity and
> have taken care of all previous review comments shared.
> v1: https://lore.kernel.org/all/20210518174618.42089-1-shradha.t@xxxxxxxxxxx/T/
>

There is already a series floating to add similar functionality via perf
subsystem: https://lore.kernel.org/linux-pci/20231121013400.18367-1-xueshuai@xxxxxxxxxxxxxxxxx/

- Mani

> Shradha Todi (3):
> PCI: dwc: Add support for vendor specific capability search
> PCI: debugfs: Add support for RASDES framework in DWC
> PCI: dwc: Create debugfs files in DWC driver
>
> drivers/pci/controller/dwc/Kconfig | 8 +
> drivers/pci/controller/dwc/Makefile | 1 +
> .../controller/dwc/pcie-designware-debugfs.c | 476 ++++++++++++++++++
> .../controller/dwc/pcie-designware-debugfs.h | 0
> drivers/pci/controller/dwc/pcie-designware.c | 20 +
> drivers/pci/controller/dwc/pcie-designware.h | 18 +
> 6 files changed, 523 insertions(+)
> create mode 100644 drivers/pci/controller/dwc/pcie-designware-debugfs.c
> create mode 100644 drivers/pci/controller/dwc/pcie-designware-debugfs.h
>
> --
> 2.17.1
>

--
மணிவண்ணன் சதாசிவம்