diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/kernel/perf_event.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c index 24e2347be6b1..e508066d3d64 100644 --- a/arch/arm/kernel/perf_event.c +++ b/arch/arm/kernel/perf_event.c | |||
@@ -343,8 +343,14 @@ validate_group(struct perf_event *event) | |||
343 | { | 343 | { |
344 | struct perf_event *sibling, *leader = event->group_leader; | 344 | struct perf_event *sibling, *leader = event->group_leader; |
345 | struct pmu_hw_events fake_pmu; | 345 | struct pmu_hw_events fake_pmu; |
346 | DECLARE_BITMAP(fake_used_mask, ARMPMU_MAX_HWEVENTS); | ||
346 | 347 | ||
347 | memset(&fake_pmu, 0, sizeof(fake_pmu)); | 348 | /* |
349 | * Initialise the fake PMU. We only need to populate the | ||
350 | * used_mask for the purposes of validation. | ||
351 | */ | ||
352 | memset(fake_used_mask, 0, sizeof(fake_used_mask)); | ||
353 | fake_pmu.used_mask = fake_used_mask; | ||
348 | 354 | ||
349 | if (!validate_event(&fake_pmu, leader)) | 355 | if (!validate_event(&fake_pmu, leader)) |
350 | return -ENOSPC; | 356 | return -ENOSPC; |