Skip to content

Commit

Permalink
perf: dsu: Use signed field for dsu_pmu->num_counters
Browse files Browse the repository at this point in the history
We set dsu_pmu->num_counters to -1, when the DSU is allocated
but not initialised when none of the CPUs are active in the DSU.
However, we use an unsigned field for num_counters. Switch this
to a signed field.

Fixes: 7520fa9 ("perf: ARM DynamIQ Shared Unit PMU support")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
  • Loading branch information
Suzuki K Poulose authored and Catalin Marinas committed Jan 15, 2018
1 parent 67948af commit a22fde8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/perf/arm_dsu_pmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ struct dsu_pmu {
cpumask_t associated_cpus;
cpumask_t active_cpu;
struct hlist_node cpuhp_node;
u8 num_counters;
s8 num_counters;
int irq;
DECLARE_BITMAP(cpmceid_bitmap, DSU_PMU_MAX_COMMON_EVENTS);
};
Expand Down

0 comments on commit a22fde8

Please sign in to comment.