lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2ec2023e-953f-4496-a27a-f604d1782243@linux.intel.com>
Date: Mon, 12 Aug 2024 10:44:34 +0800
From: "Mi, Dapeng" <dapeng1.mi@...ux.intel.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Ingo Molnar <mingo@...hat.com>, Arnaldo Carvalho de Melo
 <acme@...nel.org>, Namhyung Kim <namhyung@...nel.org>,
 Ian Rogers <irogers@...gle.com>, Adrian Hunter <adrian.hunter@...el.com>,
 Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
 Kan Liang <kan.liang@...ux.intel.com>, linux-kernel@...r.kernel.org,
 Andi Kleen <ak@...ux.intel.com>, Zhenyu Wang <zhenyuw@...ux.intel.com>,
 Yongwei Ma <yongwei.ma@...el.com>,
 Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>,
 Dapeng Mi <dapeng1.mi@...el.com>
Subject: Re: [PATCH 1/4] perf/x86: Refine hybrid_pmu_type defination


On 8/11/2024 5:35 AM, Peter Zijlstra wrote:
> On Thu, Aug 08, 2024 at 02:02:07PM +0000, Dapeng Mi wrote:
>> Use macros instead of magic number to define hybrid_pmu_type and remove
>> X86_HYBRID_NUM_PMUS since it's never used.
>>
>> Signed-off-by: Dapeng Mi <dapeng1.mi@...ux.intel.com>
>> Tested-by: Yongwei Ma <yongwei.ma@...el.com>
>> ---
>>  arch/x86/events/perf_event.h | 11 ++++-------
>>  1 file changed, 4 insertions(+), 7 deletions(-)
>>
>> diff --git a/arch/x86/events/perf_event.h b/arch/x86/events/perf_event.h
>> index ac1182141bf6..5d1677844e04 100644
>> --- a/arch/x86/events/perf_event.h
>> +++ b/arch/x86/events/perf_event.h
>> @@ -674,19 +674,16 @@ enum hybrid_cpu_type {
>>  	HYBRID_INTEL_CORE	= 0x40,
>>  };
>>  
>> +#define X86_HYBRID_PMU_ATOM_IDX		0
>> +#define X86_HYBRID_PMU_CORE_IDX		1
> There wants to be some whitespace here..

Sure. Thanks.


>
>>  enum hybrid_pmu_type {
>>  	not_hybrid,
>> -	hybrid_small		= BIT(0),
>> -	hybrid_big		= BIT(1),
>> +	hybrid_small		= BIT(X86_HYBRID_PMU_ATOM_IDX),
>> +	hybrid_big		= BIT(X86_HYBRID_PMU_CORE_IDX),
>>  
>>  	hybrid_big_small	= hybrid_big | hybrid_small, /* only used for matching */
>>  };
>>  
>> -#define X86_HYBRID_PMU_ATOM_IDX		0
>> -#define X86_HYBRID_PMU_CORE_IDX		1
>> -
>> -#define X86_HYBRID_NUM_PMUS		2
>> -
>>  struct x86_hybrid_pmu {
>>  	struct pmu			pmu;
>>  	const char			*name;
>> -- 
>> 2.40.1
>>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ