public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Dapeng Mi <dapeng1.mi@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	Ian Rogers <irogers@google.com>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Kan Liang <kan.liang@linux.intel.com>,
	linux-kernel@vger.kernel.org, Andi Kleen <ak@linux.intel.com>,
	Zhenyu Wang <zhenyuw@linux.intel.com>,
	Yongwei Ma <yongwei.ma@intel.com>,
	Pawan Gupta <pawan.kumar.gupta@linux.intel.com>,
	Dapeng Mi <dapeng1.mi@intel.com>
Subject: Re: [PATCH 1/4] perf/x86: Refine hybrid_pmu_type defination
Date: Sat, 10 Aug 2024 23:35:35 +0200	[thread overview]
Message-ID: <20240810213535.GF11646@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <20240808140210.1666783-2-dapeng1.mi@linux.intel.com>

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@linux.intel.com>
> Tested-by: Yongwei Ma <yongwei.ma@intel.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..

>  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
> 

  reply	other threads:[~2024-08-10 21:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-08 14:02 [PATCH 0/4] Enable PMU for ArrowLake-H Dapeng Mi
2024-08-08 14:02 ` [PATCH 1/4] perf/x86: Refine hybrid_pmu_type defination Dapeng Mi
2024-08-10 21:35   ` Peter Zijlstra [this message]
2024-08-12  2:44     ` Mi, Dapeng
2024-08-08 14:02 ` [PATCH 2/4] x86/cpu/intel: Define helper to get CPU core native ID Dapeng Mi
2024-08-08 14:02 ` [PATCH 3/4] perf/x86/intel: Support hybrid PMU with multiple atom uarchs Dapeng Mi
2024-08-10 21:55   ` Peter Zijlstra
2024-08-12  3:18     ` Mi, Dapeng
2024-08-12  3:27       ` Zhenyu Wang
2024-08-16  3:54         ` Mi, Dapeng
2024-08-08 14:02 ` [PATCH 4/4] perf/x86/intel: Add PMU support for ArrowLake-H Dapeng Mi
2024-08-08 16:07 ` [PATCH 0/4] Enable PMU " Liang, Kan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240810213535.GF11646@noisy.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=dapeng1.mi@intel.com \
    --cc=dapeng1.mi@linux.intel.com \
    --cc=irogers@google.com \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=pawan.kumar.gupta@linux.intel.com \
    --cc=yongwei.ma@intel.com \
    --cc=zhenyuw@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox