[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180921001008.juiscfeq32blygi5@gabell>
Date: Thu, 20 Sep 2018 20:10:09 -0400
From: Masayoshi Mizuma <msys.mizuma@...il.com>
To: "Liang, Kan" <kan.liang@...ux.intel.com>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
Masayoshi Mizuma <m.mizuma@...fujitsu.com>,
LKML <linux-kernel@...r.kernel.org>,
Kan Liang <kan.liang@...el.com>
Subject: Re: [RESEND] [PATCH] perf/x86/intel/uncore: Use
boot_cpu_data.phys_proc_id instead of hardcorded phy id 0
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@...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@...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
Powered by blists - more mailing lists