All of lore.kernel.org
 help / color / mirror / Atom feed
* [RESEND] [PATCH] perf/x86/intel/uncore: Use boot_cpu_data.phys_proc_id instead of hardcorded phy id 0
@ 2018-09-10 14:47 Masayoshi Mizuma
  2018-09-18 13:28 ` Masayoshi Mizuma
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Masayoshi Mizuma @ 2018-09-10 14:47 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86
  Cc: Masayoshi Mizuma, Masayoshi Mizuma, linux-kernel

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);
 
 	if (bdx_uncore_cbox.num_boxes > boot_cpu_data.x86_max_cores)
 		bdx_uncore_cbox.num_boxes = boot_cpu_data.x86_max_cores;
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [RESEND] [PATCH] perf/x86/intel/uncore: Use boot_cpu_data.phys_proc_id instead of hardcorded phy id 0
  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-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
  2 siblings, 0 replies; 6+ messages in thread
From: Masayoshi Mizuma @ 2018-09-18 13:28 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86
  Cc: Masayoshi Mizuma, linux-kernel

Ping...

On Mon, Sep 10, 2018 at 10:47:50AM -0400, Masayoshi Mizuma wrote:
> 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);
>  
>  	if (bdx_uncore_cbox.num_boxes > boot_cpu_data.x86_max_cores)
>  		bdx_uncore_cbox.num_boxes = boot_cpu_data.x86_max_cores;
> -- 
> 2.18.0
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RESEND] [PATCH] perf/x86/intel/uncore: Use boot_cpu_data.phys_proc_id instead of hardcorded phy id 0
  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-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
  2 siblings, 1 reply; 6+ messages in thread
From: Thomas Gleixner @ 2018-09-20 20:55 UTC (permalink / raw)
  To: Masayoshi Mizuma
  Cc: Ingo Molnar, H. Peter Anvin, x86, Masayoshi Mizuma, LKML, Kan Liang

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

Looks correct.

>  	if (bdx_uncore_cbox.num_boxes > boot_cpu_data.x86_max_cores)
>  		bdx_uncore_cbox.num_boxes = boot_cpu_data.x86_max_cores;
> -- 
> 2.18.0
> 
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RESEND] [PATCH] perf/x86/intel/uncore: Use boot_cpu_data.phys_proc_id instead of hardcorded phy id 0
  2018-09-20 20:55 ` Thomas Gleixner
@ 2018-09-20 21:10   ` Liang, Kan
  2018-09-21  0:10     ` Masayoshi Mizuma
  0 siblings, 1 reply; 6+ messages in thread
From: Liang, Kan @ 2018-09-20 21:10 UTC (permalink / raw)
  To: Thomas Gleixner, Masayoshi Mizuma
  Cc: Ingo Molnar, H. Peter Anvin, x86, Masayoshi Mizuma, LKML, Kan Liang



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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [RESEND] [PATCH] perf/x86/intel/uncore: Use boot_cpu_data.phys_proc_id instead of hardcorded phy id 0
  2018-09-20 21:10   ` Liang, Kan
@ 2018-09-21  0:10     ` Masayoshi Mizuma
  0 siblings, 0 replies; 6+ messages in thread
From: Masayoshi Mizuma @ 2018-09-21  0:10 UTC (permalink / raw)
  To: Liang, Kan
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86,
	Masayoshi Mizuma, LKML, Kan Liang

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [tip:perf/core] perf/x86/intel/uncore: Use boot_cpu_data.phys_proc_id instead of hardcorded physical package ID 0
  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-10-02 10:00 ` tip-bot for Masayoshi Mizuma
  2 siblings, 0 replies; 6+ messages in thread
From: tip-bot for Masayoshi Mizuma @ 2018-10-02 10:00 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: alexander.shishkin, vincent.weaver, peterz, hpa, jolsa, acme,
	linux-kernel, msys.mizuma, torvalds, mingo, eranian, tglx,
	m.mizuma

Commit-ID:  6265adb9726098b7f4f7ca70bc51992b25fdd9d6
Gitweb:     https://git.kernel.org/tip/6265adb9726098b7f4f7ca70bc51992b25fdd9d6
Author:     Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
AuthorDate: Mon, 10 Sep 2018 10:47:50 -0400
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Tue, 2 Oct 2018 09:37:58 +0200

perf/x86/intel/uncore: Use boot_cpu_data.phys_proc_id instead of hardcorded physical package ID 0

Physical package id 0 doesn't always exist, we should use
boot_cpu_data.phys_proc_id here.

Signed-off-by: Masayoshi Mizuma <m.mizuma@jp.fujitsu.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Masayoshi Mizuma <msys.mizuma@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Link: http://lkml.kernel.org/r/20180910144750.6782-1-msys.mizuma@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 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 51d7c117e3c7..53b981dcdb42 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);
 
 	if (bdx_uncore_cbox.num_boxes > boot_cpu_data.x86_max_cores)
 		bdx_uncore_cbox.num_boxes = boot_cpu_data.x86_max_cores;

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-10-02 10:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.