diff mbox series

[07/10] perf: Define common uncore capabilities

Message ID 8496411b6ae9306b70cb90edafa4134b113a3cfe.1710257512.git.robin.murphy@arm.com (mailing list archive)
State New, archived
Headers show
Series perf: Clean up common uncore boilerplate | expand

Commit Message

Robin Murphy March 12, 2024, 5:34 p.m. UTC
Nearly all uncore/system PMUs share a common set of capbilities,
so let's wrap those up in a single macro for ease of use.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
---
 include/linux/perf_event.h | 3 +++
 1 file changed, 3 insertions(+)

Comments

James Clark March 13, 2024, 11:23 a.m. UTC | #1
On 12/03/2024 17:34, Robin Murphy wrote:
> Nearly all uncore/system PMUs share a common set of capbilities,
> so let's wrap those up in a single macro for ease of use.
> 
> Signed-off-by: Robin Murphy <robin.murphy@arm.com>
> ---
>  include/linux/perf_event.h | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
> index b1fd832ed8bf..5d5db122005b 100644
> --- a/include/linux/perf_event.h
> +++ b/include/linux/perf_event.h
> @@ -293,6 +293,9 @@ struct perf_event_pmu_context;
>  #define PERF_PMU_CAP_EXTENDED_HW_TYPE		0x0100
>  #define PERF_PMU_CAP_NO_COMMON_EVENTS		0x0200
>  
> +#define PERF_PMU_UNCORE_CAPS \
> +(PERF_PMU_CAP_NO_SAMPLING| PERF_PMU_CAP_NO_EXCLUDE | PERF_PMU_CAP_NO_COMMON_EVENTS)
> +

The most minor of nits: missing space before |. There is another one in
another commit that triggers checkpatch but that line gets deleted anyway.

>  struct perf_output_handle;
>  
>  #define PMU_NULL_DEV	((void *)(~0UL))
Robin Murphy March 13, 2024, 12:24 p.m. UTC | #2
On 2024-03-13 11:23 am, James Clark wrote:
> 
> 
> On 12/03/2024 17:34, Robin Murphy wrote:
>> Nearly all uncore/system PMUs share a common set of capbilities,
>> so let's wrap those up in a single macro for ease of use.
>>
>> Signed-off-by: Robin Murphy <robin.murphy@arm.com>
>> ---
>>   include/linux/perf_event.h | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
>> index b1fd832ed8bf..5d5db122005b 100644
>> --- a/include/linux/perf_event.h
>> +++ b/include/linux/perf_event.h
>> @@ -293,6 +293,9 @@ struct perf_event_pmu_context;
>>   #define PERF_PMU_CAP_EXTENDED_HW_TYPE		0x0100
>>   #define PERF_PMU_CAP_NO_COMMON_EVENTS		0x0200
>>   
>> +#define PERF_PMU_UNCORE_CAPS \
>> +(PERF_PMU_CAP_NO_SAMPLING| PERF_PMU_CAP_NO_EXCLUDE | PERF_PMU_CAP_NO_COMMON_EVENTS)
>> +
> 
> The most minor of nits: missing space before |. There is another one in
> another commit that triggers checkpatch but that line gets deleted anyway.

Bleh, thanks for the catch. And it seems that wasn't the only thing I 
inexplicably managed to mess up in the rename patch either... All fixed 
locally now.

Cheers,
Robin.

> 
>>   struct perf_output_handle;
>>   
>>   #define PMU_NULL_DEV	((void *)(~0UL))
diff mbox series

Patch

diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index b1fd832ed8bf..5d5db122005b 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -293,6 +293,9 @@  struct perf_event_pmu_context;
 #define PERF_PMU_CAP_EXTENDED_HW_TYPE		0x0100
 #define PERF_PMU_CAP_NO_COMMON_EVENTS		0x0200
 
+#define PERF_PMU_UNCORE_CAPS \
+(PERF_PMU_CAP_NO_SAMPLING| PERF_PMU_CAP_NO_EXCLUDE | PERF_PMU_CAP_NO_COMMON_EVENTS)
+
 struct perf_output_handle;
 
 #define PMU_NULL_DEV	((void *)(~0UL))