linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masayoshi Mizuma <msys.mizuma@gmail.com>
To: "Liang, Kan" <kan.liang@linux.intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Kan Liang <kan.liang@intel.com>
Subject: Re: [RESEND] [PATCH] perf/x86/intel/uncore: Use boot_cpu_data.phys_proc_id instead of hardcorded phy id 0
Date: Thu, 20 Sep 2018 20:10:09 -0400	[thread overview]
Message-ID: <20180921001008.juiscfeq32blygi5@gabell> (raw)
In-Reply-To: <7fb7e563-d911-d325-ec48-8b153bece071@linux.intel.com>

On Thu, Sep 20, 2018 at 05:10:18PM -0400, Liang, Kan wrote:
> 
> 
> On 9/20/2018 4:55 PM, Thomas Gleixner wrote:
> > On Mon, 10 Sep 2018, Masayoshi Mizuma wrote:
> > 
> > CC+ Kan
> > 
> > > From: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
> > > 
> > > Physical package id 0 is not always exists. We should use
> > > boot_cpu_data.phys_proc_id here.
> > > 
> > > Signed-off-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
> > > ---
> > >   arch/x86/events/intel/uncore_snbep.c | 2 +-
> > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/arch/x86/events/intel/uncore_snbep.c b/arch/x86/events/intel/uncore_snbep.c
> > > index 51d7c11..53b981d 100644
> > > --- a/arch/x86/events/intel/uncore_snbep.c
> > > +++ b/arch/x86/events/intel/uncore_snbep.c
> > > @@ -3061,7 +3061,7 @@ static struct event_constraint bdx_uncore_pcu_constraints[] = {
> > >   void bdx_uncore_cpu_init(void)
> > >   {
> > > -	int pkg = topology_phys_to_logical_pkg(0);
> > > +	int pkg = topology_phys_to_logical_pkg(boot_cpu_data.phys_proc_id);
> 
> I think it's better to use logical_proc_id directly.
> 
> +	int pkg = boot_cpu_data.logical_proc_id;

Thanks! I'll send the v2.

- Masa

  reply	other threads:[~2018-09-21  0:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-10 14:47 [RESEND] [PATCH] perf/x86/intel/uncore: Use boot_cpu_data.phys_proc_id instead of hardcorded phy id 0 Masayoshi Mizuma
2018-09-18 13:28 ` Masayoshi Mizuma
2018-09-20 20:55 ` Thomas Gleixner
2018-09-20 21:10   ` Liang, Kan
2018-09-21  0:10     ` Masayoshi Mizuma [this message]
2018-10-02 10:00 ` [tip:perf/core] perf/x86/intel/uncore: Use boot_cpu_data.phys_proc_id instead of hardcorded physical package ID 0 tip-bot for Masayoshi Mizuma

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=20180921001008.juiscfeq32blygi5@gabell \
    --to=msys.mizuma@gmail.com \
    --cc=hpa@zytor.com \
    --cc=kan.liang@intel.com \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.mizuma@jp.fujitsu.com \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).