UPSTREAM: perf: pmuv3: Change GENMASK to GENMASK_ULL

GENMASK macro uses "unsigned long" (32-bit wide on arm and 64-bit
on arm64), This causes build issues when enabling PMUv3 on arm as
it tries to access bits > 31. This patch switches the GENMASK to
GENMASK_ULL, which uses "unsigned long long" (64-bit on both arm
and arm64).

Change-Id: I44e30f5326202a4e691bf70ce15ac5c946cca19a
Signed-off-by: Zaid Al-Bassam <zalbassam@google.com>
Acked-by: Marc Zyngier <maz@kernel.org>
Tested-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20230317195027.3746949-6-zalbassam@google.com
Signed-off-by: Will Deacon <will@kernel.org>
(cherry picked from commit b3a070869f)
Signed-off-by: Danesh Petigara <danesh.petigara@broadcom.com>
This commit is contained in:
Zaid Al-Bassam
2023-03-17 15:50:24 -04:00
committed by Pierre Couillaud
parent ab26945ffd
commit 9d0a91c993

View File

@@ -493,7 +493,7 @@ static bool armv8pmu_event_needs_bias(struct perf_event *event)
static u64 armv8pmu_bias_long_counter(struct perf_event *event, u64 value) static u64 armv8pmu_bias_long_counter(struct perf_event *event, u64 value)
{ {
if (armv8pmu_event_needs_bias(event)) if (armv8pmu_event_needs_bias(event))
value |= GENMASK(63, 32); value |= GENMASK_ULL(63, 32);
return value; return value;
} }
@@ -501,7 +501,7 @@ static u64 armv8pmu_bias_long_counter(struct perf_event *event, u64 value)
static u64 armv8pmu_unbias_long_counter(struct perf_event *event, u64 value) static u64 armv8pmu_unbias_long_counter(struct perf_event *event, u64 value)
{ {
if (armv8pmu_event_needs_bias(event)) if (armv8pmu_event_needs_bias(event))
value &= ~GENMASK(63, 32); value &= ~GENMASK_ULL(63, 32);
return value; return value;
} }