mbox series

[v2,0/4] perf/dwc_pcie: Fix registration issue in multi PCIe controller instances

Message ID 20240816-dwc_pmu_fix-v2-0-198b8ab1077c@quicinc.com
Headers show
Series perf/dwc_pcie: Fix registration issue in multi PCIe controller instances | expand

Message

Krishna Chaitanya Chundru Aug. 16, 2024, 3:17 p.m. UTC
When there are multiple of instances of PCIe controllers, registration
to perf driver fails with this error. This is because of having same
bdf value for devices under two different controllers.

Update the logic to use sbdf which is a unique number in case of
multi instance also.

When the PCIe devices are discovered late, the driver can't find
the PCIe devices and returns in the init without registering with
the bus notifier. Due to that the devices which are discovered late
the driver can't register for this.

Register for bus notifier & driver even if the device is not found in init.

Update the vendor table with QCOM PCIe vendorid to support QCOM devices.

Signed-off-by: Krishna chaitanya chundru <quic_krichai@quicinc.com>
---
Changes in v2:
- Use platform dev id for instead of encoding again (Yicong Yang).
- Register for driver always along with bus notifier(Yicong Yang).
- Link to v1: https://lore.kernel.org/r/20240731-dwc_pmu_fix-v1-0-ca47d153e5b2@quicinc.com

---
Krishna chaitanya chundru (4):
      perf/dwc_pcie: Fix registration issue in multi PCIe controller instances
      Documentation: dwc_pcie_pmu: Update bdf to sbdf
      perf/dwc_pcie: Always register for PCIe bus notifier
      perf/dwc_pcie: Add support for QCOM vendor devices

 Documentation/admin-guide/perf/dwc_pcie_pmu.rst | 16 ++++++++--------
 drivers/perf/dwc_pcie_pmu.c                     | 22 +++++++++-------------
 2 files changed, 17 insertions(+), 21 deletions(-)
---
base-commit: b236787b0da563e3bad0dab1b4b9a5bb54eabd39
change-id: 20240731-dwc_pmu_fix-3729bd3657fe
prerequisite-change-id: 20240728-mhi_runtime_pm-2383b74c71ed:v1
prerequisite-patch-id: 90e73ba7ee4538c67f21f7f23ae4d931cb6e9967

Best regards,

Comments

Will Deacon Aug. 23, 2024, 5:02 p.m. UTC | #1
On Fri, 16 Aug 2024 20:47:19 +0530, Krishna chaitanya chundru wrote:
> When there are multiple of instances of PCIe controllers, registration
> to perf driver fails with this error. This is because of having same
> bdf value for devices under two different controllers.
> 
> Update the logic to use sbdf which is a unique number in case of
> multi instance also.
> 
> [...]

Applied to will (for-next/perf), thanks!

[1/4] perf/dwc_pcie: Fix registration issue in multi PCIe controller instances
      https://git.kernel.org/will/c/e669388537c4
[2/4] Documentation: dwc_pcie_pmu: Update bdf to sbdf
      https://git.kernel.org/will/c/96a37ec98664
[3/4] perf/dwc_pcie: Always register for PCIe bus notifier
      https://git.kernel.org/will/c/b94b05478fb6
[4/4] perf/dwc_pcie: Add support for QCOM vendor devices
      https://git.kernel.org/will/c/db9e7a83d308

Cheers,