Skip to content

Commit 3939280

Browse files
rmurphy-armgregkh
authored andcommitted
perf/arm-cmn: Initialise cmn->cpu earlier
commit 597704e201068db3d104de3c7a4d447ff8209127 upstream. For all the complexity of handling affinity for CPU hotplug, what we've apparently managed to overlook is that arm_cmn_init_irqs() has in fact always been setting the *initial* affinity of all IRQs to CPU 0, not the CPU we subsequently choose for event scheduling. Oh dear. Cc: [email protected] Fixes: 0ba6477 ("perf: Add Arm CMN-600 PMU driver") Signed-off-by: Robin Murphy <[email protected]> Reviewed-by: Ilkka Koskinen <[email protected]> Link: https://lore.kernel.org/r/b12fccba6b5b4d2674944f59e4daad91cd63420b.1747069914.git.robin.murphy@arm.com Signed-off-by: Will Deacon <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 05b21a5 commit 3939280

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/perf/arm-cmn.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2313,6 +2313,7 @@ static int arm_cmn_probe(struct platform_device *pdev)
23132313

23142314
cmn->dev = &pdev->dev;
23152315
cmn->part = (unsigned long)device_get_match_data(cmn->dev);
2316+
cmn->cpu = cpumask_local_spread(0, dev_to_node(cmn->dev));
23162317
platform_set_drvdata(pdev, cmn);
23172318

23182319
if (cmn->part == PART_CMN600 && has_acpi_companion(cmn->dev)) {
@@ -2340,7 +2341,6 @@ static int arm_cmn_probe(struct platform_device *pdev)
23402341
if (err)
23412342
return err;
23422343

2343-
cmn->cpu = cpumask_local_spread(0, dev_to_node(cmn->dev));
23442344
cmn->pmu = (struct pmu) {
23452345
.module = THIS_MODULE,
23462346
.attr_groups = arm_cmn_attr_groups,

0 commit comments

Comments
 (0)