Re: [PATCH V2 3/4] arm64/perf: Assert all platform event flags are within PERF_EVENT_FLAG_ARCH

From: Anshuman Khandual
Date: Mon Sep 05 2022 - 22:58:03 EST




On 9/5/22 14:40, James Clark wrote:
>> --- a/include/linux/perf/arm_pmu.h
>> +++ b/include/linux/perf/arm_pmu.h
>> @@ -24,10 +24,11 @@
>> /*
>> * ARM PMU hw_event flags
>> */
>> -/* Event uses a 64bit counter */
>> -#define ARMPMU_EVT_64BIT 1
>> -/* Event uses a 47bit counter */
>> -#define ARMPMU_EVT_47BIT 2
>> +#define ARMPMU_EVT_64BIT 0x00001 /* Event uses a 64bit counter */
>> +#define ARMPMU_EVT_47BIT 0x00002 /* Event uses a 47bit counter */
>> +
> Minor nit:
>
> I don't think changing the definitions to hex adds anything except more
> noise in the git blame.

The idea here was just to make these five digit hex, in accordance with
PERF_EVENT_FLAG_ARCH mask like the existing x86 platform event flags.