Commit b94b0547 authored by Krishna chaitanya chundru's avatar Krishna chaitanya chundru Committed by Will Deacon

perf/dwc_pcie: Always register for PCIe bus notifier

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
as part of init.

Fixes: af9597ad ("drivers/perf: add DesignWare PCIe PMU driver")
Signed-off-by: default avatarKrishna chaitanya chundru <quic_krichai@quicinc.com>
Reviewed-by: default avatarYicong Yang <yangyicong@hisilicon.com>
Link: https://lore.kernel.org/r/20240816-dwc_pmu_fix-v2-3-198b8ab1077c@quicinc.comSigned-off-by: default avatarWill Deacon <will@kernel.org>
parent 96a37ec9
......@@ -726,7 +726,6 @@ static struct platform_driver dwc_pcie_pmu_driver = {
static int __init dwc_pcie_pmu_init(void)
{
struct pci_dev *pdev = NULL;
bool found = false;
int ret;
for_each_pci_dev(pdev) {
......@@ -738,11 +737,7 @@ static int __init dwc_pcie_pmu_init(void)
pci_dev_put(pdev);
return ret;
}
found = true;
}
if (!found)
return -ENODEV;
ret = cpuhp_setup_state_multi(CPUHP_AP_ONLINE_DYN,
"perf/dwc_pcie_pmu:online",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment