linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Rashmica Gupta <rashmica.g@gmail.com>
To: "Desnes A. Nunes do Rosario" <desnesn@linux.ibm.com>,
	 linuxppc-dev@lists.ozlabs.org
Cc: shuah@kernel.org, gromero@linux.ibm.com
Subject: Re: [PATCH, RESEND, 2/3] selftests/powerpc: enable performance alerts when freezing counters on cycles_with_freeze_test selftest
Date: Thu, 23 Apr 2020 15:47:28 +1000	[thread overview]
Message-ID: <c09a79e930c6ef1b5a2c8464614c619d2df07323.camel@gmail.com> (raw)
In-Reply-To: <20200408223543.21168-3-desnesn@linux.ibm.com>

On Wed, 2020-04-08 at 19:35 -0300, Desnes A. Nunes do Rosario wrote:
> From: Gustavo Romero <gromero@linux.ibm.com>
> 
> When disabling freezing counters by setting MMCR0 FC bit to 0, the
> MMCR0
> PMAE bit must also be enabled if a Performance Monitor Alert (and the
> cor-
> responding Performance Monitor Interrupt) is still desired to be
> received
> when an enabled condition or event occurs.
> 
> This is the case of the cycles_with_freeze_test selftest, since the
> test
> disables the MMCR0 PMAE due to the usage of PMU to trigger EBBs. This
> can
> make the test loop up to the point of being killed by the test
> harness
> timeout (2500 ms), since no other ebb event will happen because the
> MMCR0
> PMAE bit is disabled, and thus, no more increments to ebb_count
> occur.
> 
> Fixes: 3752e453f6bafd7 ("selftests/powerpc: Add tests of PMU EBBs")
> Signed-off-by: Gustavo Romero <gromero@linux.ibm.com>
> [desnesn: Only set MMCR0_PMAE when disabling MMCR0_FC, reflow
> comment]
> Signed-off-by: Desnes A. Nunes do Rosario <desnesn@linux.ibm.com>

Reviewed and Tested-by: Rashmica Gupta <rashmica.g@gmail.com>

> ---
>  .../testing/selftests/powerpc/pmu/ebb/cycles_with_freeze_test.c | 2
> +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git
> a/tools/testing/selftests/powerpc/pmu/ebb/cycles_with_freeze_test.c
> b/tools/testing/selftests/powerpc/pmu/ebb/cycles_with_freeze_test.c
> index 0f2089f6f82c..d368199144fb 100644
> ---
> a/tools/testing/selftests/powerpc/pmu/ebb/cycles_with_freeze_test.c
> +++
> b/tools/testing/selftests/powerpc/pmu/ebb/cycles_with_freeze_test.c
> @@ -81,7 +81,7 @@ int cycles_with_freeze(void)
>  	{
>  		counters_frozen = false;
>  		mb();
> -		mtspr(SPRN_MMCR0, mfspr(SPRN_MMCR0) & ~MMCR0_FC);
> +		mtspr(SPRN_MMCR0, (mfspr(SPRN_MMCR0) & ~MMCR0_FC) |
> MMCR0_PMAE);
>  
>  		FAIL_IF(core_busy_loop());
>  


  reply	other threads:[~2020-04-23  5:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-08 22:35 [PATCH, RESEND, 0/3] selftests/powerpc: A few fixes on powerpc selftests Desnes A. Nunes do Rosario
2020-04-08 22:35 ` [PATCH, RESEND, 1/3] selftests/powerpc: Use write_pmc instead of count_pmc to reset PMCs on ebb tests Desnes A. Nunes do Rosario
2020-04-23  5:45   ` Rashmica Gupta
2020-04-08 22:35 ` [PATCH, RESEND, 2/3] selftests/powerpc: enable performance alerts when freezing counters on cycles_with_freeze_test selftest Desnes A. Nunes do Rosario
2020-04-23  5:47   ` Rashmica Gupta [this message]
2020-04-08 22:35 ` [PATCH 3/3] selftests/powerpc: ensure PMC reads are set and ordered on count_pmc Desnes A. Nunes do Rosario
2020-04-23  5:54   ` Rashmica Gupta

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=c09a79e930c6ef1b5a2c8464614c619d2df07323.camel@gmail.com \
    --to=rashmica.g@gmail.com \
    --cc=desnesn@linux.ibm.com \
    --cc=gromero@linux.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=shuah@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).