Skip to content

Commit b94b054

Browse files
Krishna chaitanya chundruwilldeacon
authored andcommitted
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: af9597a ("drivers/perf: add DesignWare PCIe PMU driver") Signed-off-by: Krishna chaitanya chundru <quic_krichai@quicinc.com> Reviewed-by: Yicong Yang <yangyicong@hisilicon.com> Link: https://lore.kernel.org/r/20240816-dwc_pmu_fix-v2-3-198b8ab1077c@quicinc.com Signed-off-by: Will Deacon <will@kernel.org>
1 parent 96a37ec commit b94b054

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

drivers/perf/dwc_pcie_pmu.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,6 @@ static struct platform_driver dwc_pcie_pmu_driver = {
726726
static int __init dwc_pcie_pmu_init(void)
727727
{
728728
struct pci_dev *pdev = NULL;
729-
bool found = false;
730729
int ret;
731730

732731
for_each_pci_dev(pdev) {
@@ -738,11 +737,7 @@ static int __init dwc_pcie_pmu_init(void)
738737
pci_dev_put(pdev);
739738
return ret;
740739
}
741-
742-
found = true;
743740
}
744-
if (!found)
745-
return -ENODEV;
746741

747742
ret = cpuhp_setup_state_multi(CPUHP_AP_ONLINE_DYN,
748743
"perf/dwc_pcie_pmu:online",

0 commit comments

Comments
 (0)