mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tanushree Shah <tshah@linux.ibm.com>
To: Matt Turner <mattst88@gmail.com>,
	Madhavan Srinivasan <maddy@linux.ibm.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Nicholas Piggin <npiggin@gmail.com>,
	"Christophe Leroy (CS GROUP)" <chleroy@kernel.org>,
	"Ritesh Harjani (IBM)" <ritesh.list@gmail.com>,
	Shrikanth Hegde <sshegde@linux.ibm.com>,
	Paul Mackerras <paulus@ozlabs.org>
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/8] powerpc/perf: mpc7450: Add the PMC6 L3 events to the alternatives table
Date: Tue, 17 Nov 2026 21:09:31 +0530	[thread overview]
Message-ID: <2a142695-8623-4904-93f7-ecee8303e86d@linux.ibm.com> (raw)
In-Reply-To: <20261109-ppc32-perf-v1-5-a6e8a55b3b48@gmail.com>


On 11/10/26 7:17 AM, Matt Turner wrote:
> PMC6 repeats five L3 events at a second select value that the
> alternatives table doesn't list:
>
>    0x61f  L3 hits, also 0x503 and 0x603
>    0x620  L3 misses, also 0x514 and 0x61e
>    0x621  L3 instruction misses, also 0x505 and 0x605
>    0x622  L3 data misses, also 0x507 and 0x607
>    0x625  L3 touch hits, also 0x50e and 0x60e
>
> Each is the same event as the PMC5 code, so add them to its row.  The
> scheduler can then move them to PMC5 when PMC6 is taken.
>
> Not tested on hardware with an L3; the 7448 has none.
>
> Signed-off-by: Matt Turner <mattst88@gmail.com>
Hi Matt,

I checked the five new PMC6 codes against MPC7450UM Rev. 5:

   0x61f  select 31, L3 cache hits          (same as 0x503 / 0x603)
   0x620  select 32, L3 cache misses        (same as 0x514 / 0x61e)
   0x621  select 33, L3 instruction misses  (same as 0x505 / 0x605)
   0x622  select 34, L3 data misses         (same as 0x507 / 0x607)
   0x625  select 37, L3 touch hits          (same as 0x50e / 0x60e)

The descriptions match the PMC5 and PMC6 entries they are grouped with.

The rows are now at most 3 entries, so they still fit MAX_ALT.

Reviewed-by: Tanushree Shah <tshah@linux.ibm.com>


Thanks
Tanushree Shah

> ---
>   arch/powerpc/perf/mpc7450-pmu.c | 10 +++++-----
>   1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/arch/powerpc/perf/mpc7450-pmu.c b/arch/powerpc/perf/mpc7450-pmu.c
> index 27337a03ebde..b2fe977cea16 100644
> --- a/arch/powerpc/perf/mpc7450-pmu.c
> +++ b/arch/powerpc/perf/mpc7450-pmu.c
> @@ -185,18 +185,18 @@ static int mpc7450_get_constraint(u64 event, unsigned long *maskp,
>   static const unsigned int event_alternatives[][MAX_ALT] = {
>   	{ 0x217, 0x317 },		/* PM_L1_DCACHE_MISS */
>   	{ 0x502, 0x602 },		/* PM_L2_HIT */
> -	{ 0x503, 0x603 },		/* PM_L3_HIT */
> +	{ 0x503, 0x603, 0x61f },	/* PM_L3_HIT */
>   	{ 0x504, 0x604 },		/* PM_L2_ICACHE_MISS */
> -	{ 0x505, 0x605 },		/* PM_L3_ICACHE_MISS */
> +	{ 0x505, 0x605, 0x621 },	/* PM_L3_ICACHE_MISS */
>   	{ 0x506, 0x606 },		/* PM_L2_DCACHE_MISS */
> -	{ 0x507, 0x607 },		/* PM_L3_DCACHE_MISS */
> +	{ 0x507, 0x607, 0x622 },	/* PM_L3_DCACHE_MISS */
>   	{ 0x50a, 0x623 },		/* PM_LD_HIT_L3 */
>   	{ 0x50b, 0x624 },		/* PM_ST_HIT_L3 */
>   	{ 0x50d, 0x60d },		/* PM_L2_TOUCH_HIT */
> -	{ 0x50e, 0x60e },		/* PM_L3_TOUCH_HIT */
> +	{ 0x50e, 0x60e, 0x625 },	/* PM_L3_TOUCH_HIT */
>   	{ 0x512, 0x612 },		/* PM_INT_LOCAL */
>   	{ 0x513, 0x61d },		/* PM_L2_MISS */
> -	{ 0x514, 0x61e },		/* PM_L3_MISS */
> +	{ 0x514, 0x61e, 0x620 },	/* PM_L3_MISS */
>   };
>   
>   /*
>

  reply	other threads:[~2026-11-17 15:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10  1:46 [PATCH 0/8] powerpc/perf: mpc7450: Event fixes, SIAR sampling and sysfs event names Matt Turner
2026-11-10  1:47 ` [PATCH 1/8] powerpc/perf: mpc7450: Event 0x30d does not use the threshold Matt Turner
2026-11-13 17:38   ` Tanushree Shah
2026-11-10  1:47 ` [PATCH 2/8] powerpc/perf: mpc7450: Event 0x634 counts L2 prefetches, not L1I Matt Turner
2026-11-17 15:25   ` Tanushree Shah
2026-11-10  1:47 ` [PATCH 3/8] powerpc/perf: mpc7450: Remove the snoop retry alternatives Matt Turner
2026-11-17 15:28   ` Tanushree Shah
2026-11-10  1:47 ` [PATCH 4/8] powerpc/perf: mpc7450: Fill in the L1 data cache events Matt Turner
2026-11-17 15:36   ` Tanushree Shah
2026-11-10  1:47 ` [PATCH 5/8] powerpc/perf: mpc7450: Add the PMC6 L3 events to the alternatives table Matt Turner
2026-11-17 15:39   ` Tanushree Shah [this message]
2026-11-10  1:47 ` [PATCH 6/8] powerpc/perf: mpc7450: Export the event format in sysfs Matt Turner
2026-11-10  1:47 ` [PATCH 7/8] powerpc/perf: Use SIAR for sample addresses on 32-bit Matt Turner
2026-11-17 16:11   ` Tanushree Shah
2026-11-10  1:47 ` [PATCH 8/8] powerpc/perf: mpc7450: Export event names in sysfs Matt Turner
2026-11-17 16:17   ` Tanushree Shah
2026-11-10  1:55 ` [PATCH 0/8] powerpc/perf: mpc7450: Event fixes, SIAR sampling and sysfs event names Matt Turner

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=2a142695-8623-4904-93f7-ecee8303e86d@linux.ibm.com \
    --to=tshah@linux.ibm.com \
    --cc=chleroy@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maddy@linux.ibm.com \
    --cc=mattst88@gmail.com \
    --cc=mpe@ellerman.id.au \
    --cc=npiggin@gmail.com \
    --cc=paulus@ozlabs.org \
    --cc=ritesh.list@gmail.com \
    --cc=sshegde@linux.ibm.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

all inboxes | Powered by JetHome®