Skip to content

Commit 454be2a

Browse files
mosalterarndb
authored andcommitted
drivers: CCI: fix used_mask init in validate_group()
Currently in validate_group(), there is a static initializer for fake_pmu.used_mask which is based on CPU_BITS_NONE but the used_mask array size is based on CCI_PMU_MAX_HW_EVENTS. CCI_PMU_MAX_HW_EVENTS is not based on NR_CPUS, so CPU_BITS_NONE is not correct and will cause a build failure if NR_CPUS is set high enough to make CPU_BITS_NONE larger than used_mask. Reviewed-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Mark Salter <msalter@redhat.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
1 parent bd1a6e7 commit 454be2a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/bus/arm-cci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ validate_group(struct perf_event *event)
660660
* Initialise the fake PMU. We only need to populate the
661661
* used_mask for the purposes of validation.
662662
*/
663-
.used_mask = CPU_BITS_NONE,
663+
.used_mask = { 0 },
664664
};
665665

666666
if (!validate_event(event->pmu, &fake_pmu, leader))

0 commit comments

Comments
 (0)