linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tools/perf/arch/powerpc: Add register mask for power11 PVR in extended regs
@ 2024-12-06 13:56 Athira Rajeev
  2024-12-11 12:02 ` kajoljain
  0 siblings, 1 reply; 5+ messages in thread
From: Athira Rajeev @ 2024-12-06 13:56 UTC (permalink / raw)
  To: acme, jolsa, adrian.hunter, irogers, namhyung
  Cc: linux-kernel, linux-perf-users, linuxppc-dev, maddy, atrajeev,
	kjain, disgoel, hbathini

Perf tools side uses extended mask to display the platform
supported register names (with -I? option) to the user
and also send this mask to the kernel to capture the extended registers
as part of each sample. This mask value is decided based on
the processor version ( from PVR ).

Add PVR value for power11 to enable capturing the extended regs
as part of sample in power11.

Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
---

 tools/perf/arch/powerpc/util/perf_regs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/perf/arch/powerpc/util/perf_regs.c b/tools/perf/arch/powerpc/util/perf_regs.c
index e8e6e6fc6f17..bd36cfd420a2 100644
--- a/tools/perf/arch/powerpc/util/perf_regs.c
+++ b/tools/perf/arch/powerpc/util/perf_regs.c
@@ -16,6 +16,7 @@
 
 #define PVR_POWER9		0x004E
 #define PVR_POWER10		0x0080
+#define PVR_POWER11		0x0082
 
 static const struct sample_reg sample_reg_masks[] = {
 	SMPL_REG(r0, PERF_REG_POWERPC_R0),
@@ -207,7 +208,7 @@ uint64_t arch__intr_reg_mask(void)
 	version = (((mfspr(SPRN_PVR)) >>  16) & 0xFFFF);
 	if (version == PVR_POWER9)
 		extended_mask = PERF_REG_PMU_MASK_300;
-	else if (version == PVR_POWER10)
+	else if ((version == PVR_POWER10) || (version == PVR_POWER11))
 		extended_mask = PERF_REG_PMU_MASK_31;
 	else
 		return mask;
-- 
2.43.5



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

* Re: [PATCH] tools/perf/arch/powerpc: Add register mask for power11 PVR in extended regs
  2024-12-06 13:56 [PATCH] tools/perf/arch/powerpc: Add register mask for power11 PVR in extended regs Athira Rajeev
@ 2024-12-11 12:02 ` kajoljain
  2024-12-16 10:02   ` Athira Rajeev
  0 siblings, 1 reply; 5+ messages in thread
From: kajoljain @ 2024-12-11 12:02 UTC (permalink / raw)
  To: Athira Rajeev, acme, jolsa, adrian.hunter, irogers, namhyung
  Cc: linux-kernel, linux-perf-users, linuxppc-dev, maddy, disgoel,
	hbathini



On 12/6/24 19:26, Athira Rajeev wrote:
> Perf tools side uses extended mask to display the platform
> supported register names (with -I? option) to the user
> and also send this mask to the kernel to capture the extended registers
> as part of each sample. This mask value is decided based on
> the processor version ( from PVR ).
> 
> Add PVR value for power11 to enable capturing the extended regs
> as part of sample in power11.

Patch looks fine to me.

Reviewed-by: Kajol Jain <kjain@linux.ibm.com>


> 
> Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
> ---
> 
>  tools/perf/arch/powerpc/util/perf_regs.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/perf/arch/powerpc/util/perf_regs.c b/tools/perf/arch/powerpc/util/perf_regs.c
> index e8e6e6fc6f17..bd36cfd420a2 100644
> --- a/tools/perf/arch/powerpc/util/perf_regs.c
> +++ b/tools/perf/arch/powerpc/util/perf_regs.c
> @@ -16,6 +16,7 @@
>  
>  #define PVR_POWER9		0x004E
>  #define PVR_POWER10		0x0080
> +#define PVR_POWER11		0x0082
>  
>  static const struct sample_reg sample_reg_masks[] = {
>  	SMPL_REG(r0, PERF_REG_POWERPC_R0),
> @@ -207,7 +208,7 @@ uint64_t arch__intr_reg_mask(void)
>  	version = (((mfspr(SPRN_PVR)) >>  16) & 0xFFFF);
>  	if (version == PVR_POWER9)
>  		extended_mask = PERF_REG_PMU_MASK_300;
> -	else if (version == PVR_POWER10)
> +	else if ((version == PVR_POWER10) || (version == PVR_POWER11))
>  		extended_mask = PERF_REG_PMU_MASK_31;
>  	else
>  		return mask;



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

* Re: [PATCH] tools/perf/arch/powerpc: Add register mask for power11 PVR in extended regs
  2024-12-11 12:02 ` kajoljain
@ 2024-12-16 10:02   ` Athira Rajeev
  2024-12-16 16:45     ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 5+ messages in thread
From: Athira Rajeev @ 2024-12-16 10:02 UTC (permalink / raw)
  To: kajoljain, Arnaldo Carvalho de Melo, Namhyung Kim, Ian Rogers
  Cc: acme, jolsa, adrian.hunter, irogers, namhyung, linux-kernel,
	linux-perf-users, linuxppc-dev, maddy, disgoel, hbathini



> On 11 Dec 2024, at 5:32 PM, kajoljain <kjain@linux.ibm.com> wrote:
> 
> 
> 
> On 12/6/24 19:26, Athira Rajeev wrote:
>> Perf tools side uses extended mask to display the platform
>> supported register names (with -I? option) to the user
>> and also send this mask to the kernel to capture the extended registers
>> as part of each sample. This mask value is decided based on
>> the processor version ( from PVR ).
>> 
>> Add PVR value for power11 to enable capturing the extended regs
>> as part of sample in power11.
> 
> Patch looks fine to me.
> 
> Reviewed-by: Kajol Jain <kjain@linux.ibm.com>

Hi

Can we please pull in this patch if it looks fine.

Thanks
Athira
> 
> 
>> 
>> Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
>> ---
>> 
>> tools/perf/arch/powerpc/util/perf_regs.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>> 
>> diff --git a/tools/perf/arch/powerpc/util/perf_regs.c b/tools/perf/arch/powerpc/util/perf_regs.c
>> index e8e6e6fc6f17..bd36cfd420a2 100644
>> --- a/tools/perf/arch/powerpc/util/perf_regs.c
>> +++ b/tools/perf/arch/powerpc/util/perf_regs.c
>> @@ -16,6 +16,7 @@
>> 
>> #define PVR_POWER9 0x004E
>> #define PVR_POWER10 0x0080
>> +#define PVR_POWER11 0x0082
>> 
>> static const struct sample_reg sample_reg_masks[] = {
>> SMPL_REG(r0, PERF_REG_POWERPC_R0),
>> @@ -207,7 +208,7 @@ uint64_t arch__intr_reg_mask(void)
>> version = (((mfspr(SPRN_PVR)) >>  16) & 0xFFFF);
>> if (version == PVR_POWER9)
>> extended_mask = PERF_REG_PMU_MASK_300;
>> - else if (version == PVR_POWER10)
>> + else if ((version == PVR_POWER10) || (version == PVR_POWER11))
>> extended_mask = PERF_REG_PMU_MASK_31;
>> else
>> return mask;
> 



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

* Re: [PATCH] tools/perf/arch/powerpc: Add register mask for power11 PVR in extended regs
  2024-12-16 10:02   ` Athira Rajeev
@ 2024-12-16 16:45     ` Arnaldo Carvalho de Melo
  2024-12-17  6:27       ` Athira Rajeev
  0 siblings, 1 reply; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2024-12-16 16:45 UTC (permalink / raw)
  To: Athira Rajeev
  Cc: kajoljain, Namhyung Kim, Ian Rogers, jolsa, adrian.hunter,
	linux-kernel, linux-perf-users, linuxppc-dev, maddy, disgoel,
	hbathini

On Mon, Dec 16, 2024 at 03:32:12PM +0530, Athira Rajeev wrote:
> > On 11 Dec 2024, at 5:32 PM, kajoljain <kjain@linux.ibm.com> wrote:
> > On 12/6/24 19:26, Athira Rajeev wrote:
> >> Perf tools side uses extended mask to display the platform
> >> supported register names (with -I? option) to the user
> >> and also send this mask to the kernel to capture the extended registers
> >> as part of each sample. This mask value is decided based on
> >> the processor version ( from PVR ).

> >> Add PVR value for power11 to enable capturing the extended regs
> >> as part of sample in power11.

> > Patch looks fine to me.

> > Reviewed-by: Kajol Jain <kjain@linux.ibm.com>
 
> Can we please pull in this patch if it looks fine.

Sure,

Thanks, applied to perf-tools-next,

- Arnaldo


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

* Re: [PATCH] tools/perf/arch/powerpc: Add register mask for power11 PVR in extended regs
  2024-12-16 16:45     ` Arnaldo Carvalho de Melo
@ 2024-12-17  6:27       ` Athira Rajeev
  0 siblings, 0 replies; 5+ messages in thread
From: Athira Rajeev @ 2024-12-17  6:27 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: kajoljain, Namhyung Kim, Ian Rogers, jolsa, adrian.hunter,
	linux-kernel, linux-perf-users, linuxppc-dev, maddy, disgoel,
	hbathini



> On 16 Dec 2024, at 10:15 PM, Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> 
> On Mon, Dec 16, 2024 at 03:32:12PM +0530, Athira Rajeev wrote:
>>> On 11 Dec 2024, at 5:32 PM, kajoljain <kjain@linux.ibm.com> wrote:
>>> On 12/6/24 19:26, Athira Rajeev wrote:
>>>> Perf tools side uses extended mask to display the platform
>>>> supported register names (with -I? option) to the user
>>>> and also send this mask to the kernel to capture the extended registers
>>>> as part of each sample. This mask value is decided based on
>>>> the processor version ( from PVR ).
> 
>>>> Add PVR value for power11 to enable capturing the extended regs
>>>> as part of sample in power11.
> 
>>> Patch looks fine to me.
> 
>>> Reviewed-by: Kajol Jain <kjain@linux.ibm.com>
> 
>> Can we please pull in this patch if it looks fine.
> 
> Sure,
> 
> Thanks, applied to perf-tools-next,
> 
> - Arnaldo
Thanks Arnaldo for pulling this in 

Athira




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

end of thread, other threads:[~2024-12-17  6:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-06 13:56 [PATCH] tools/perf/arch/powerpc: Add register mask for power11 PVR in extended regs Athira Rajeev
2024-12-11 12:02 ` kajoljain
2024-12-16 10:02   ` Athira Rajeev
2024-12-16 16:45     ` Arnaldo Carvalho de Melo
2024-12-17  6:27       ` Athira Rajeev

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