Skip to content

Commit ff7e3bc

Browse files
Krishna chaitanya chundruopsiff
authored andcommitted
perf/dwc_pcie: Always register for PCIe bus notifier
[ Upstream commit b94b054 ] 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> [ Backport from v6.11 ] Suggested-by: Wentao Guan <guanwentao@uniontech.com> Signed-off-by: WangYuli <wangyuli@uniontech.com>
1 parent 04ebbc2 commit ff7e3bc

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
@@ -728,7 +728,6 @@ static struct platform_driver dwc_pcie_pmu_driver = {
728728
static int __init dwc_pcie_pmu_init(void)
729729
{
730730
struct pci_dev *pdev = NULL;
731-
bool found = false;
732731
int ret;
733732

734733
for_each_pci_dev(pdev) {
@@ -740,11 +739,7 @@ static int __init dwc_pcie_pmu_init(void)
740739
pci_dev_put(pdev);
741740
return ret;
742741
}
743-
744-
found = true;
745742
}
746-
if (!found)
747-
return -ENODEV;
748743

749744
ret = cpuhp_setup_state_multi(CPUHP_AP_ONLINE_DYN,
750745
"perf/dwc_pcie_pmu:online",

0 commit comments

Comments
 (0)