Skip to content

Commit 50650e5

Browse files
jic23willdeacon
authored andcommitted
perf/riscv: Assign parents for event_source devices
Currently all these devices appear directly under /sys/devices/ Only root busses should appear there, so instead assign the pmu->dev parents to be the appropriate platform devices. Link: https://lore.kernel.org/linux-cxl/[email protected]/ Cc: Atish Patra <[email protected]> CC: Anup Patel <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent ecb79c2 commit 50650e5

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

drivers/perf/riscv_pmu_legacy.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ static int pmu_legacy_device_probe(struct platform_device *pdev)
136136
pmu = riscv_pmu_alloc();
137137
if (!pmu)
138138
return -ENOMEM;
139+
pmu->pmu.parent = &pdev->dev;
139140
pmu_legacy_init(pmu);
140141

141142
return 0;

drivers/perf/riscv_pmu_sbi.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,6 +1080,7 @@ static int pmu_sbi_device_probe(struct platform_device *pdev)
10801080
}
10811081

10821082
pmu->pmu.attr_groups = riscv_pmu_attr_groups;
1083+
pmu->pmu.parent = &pdev->dev;
10831084
pmu->cmask = cmask;
10841085
pmu->ctr_start = pmu_sbi_ctr_start;
10851086
pmu->ctr_stop = pmu_sbi_ctr_stop;

0 commit comments

Comments
 (0)