kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shaoqin Huang <shahuang@redhat.com>
To: Eric Auger <eric.auger@redhat.com>,
	eric.auger.pro@gmail.com, kvm@vger.kernel.org,
	kvmarm@lists.linux.dev, andrew.jones@linux.dev, maz@kernel.org,
	oliver.upton@linux.dev, alexandru.elisei@arm.com
Cc: jarichte@redhat.com
Subject: Re: [kvm-unit-tests PATCH v2 1/2] arm: pmu: Declare pmu_stats as volatile
Date: Tue, 14 Nov 2023 11:08:37 +0800	[thread overview]
Message-ID: <00f7b062-e967-f1ed-bf2e-f0b86be60287@redhat.com> (raw)
In-Reply-To: <20231113174316.341630-2-eric.auger@redhat.com>



On 11/14/23 01:42, Eric Auger wrote:
> Declare pmu_stats as volatile in order to prevent the compiler
> from caching previously read values. This actually fixes
> pmu-overflow-interrupt failures on some HW.
> 
> Reported-by: Alexandru Elisei <alexandru.elisei@arm.com>
> Signed-off-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Shaoqin Huang <shahuang@redhat.com>
> ---
>   arm/pmu.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arm/pmu.c b/arm/pmu.c
> index a91a7b1f..86199577 100644
> --- a/arm/pmu.c
> +++ b/arm/pmu.c
> @@ -328,7 +328,7 @@ asm volatile(
>   	: "x9", "x10", "cc");
>   }
>   
> -static struct pmu_stats pmu_stats;
> +static volatile struct pmu_stats pmu_stats;
>   
>   static void irq_handler(struct pt_regs *regs)
>   {

-- 
Shaoqin


  reply	other threads:[~2023-11-14  3:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-13 17:42 [kvm-unit-tests PATCH v2 0/2] arm: pmu-overflow-interrupt: Fix failures on Amberwing Eric Auger
2023-11-13 17:42 ` [kvm-unit-tests PATCH v2 1/2] arm: pmu: Declare pmu_stats as volatile Eric Auger
2023-11-14  3:08   ` Shaoqin Huang [this message]
2023-11-20 17:28   ` Alexandru Elisei
2023-11-13 17:42 ` [kvm-unit-tests PATCH v2 2/2] arm: pmu-overflow-interrupt: Increase count values Eric Auger
2023-11-14  3:09   ` Shaoqin Huang
2023-11-21 11:45 ` [kvm-unit-tests PATCH v2 0/2] arm: pmu-overflow-interrupt: Fix failures on Amberwing Andrew Jones

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=00f7b062-e967-f1ed-bf2e-f0b86be60287@redhat.com \
    --to=shahuang@redhat.com \
    --cc=alexandru.elisei@arm.com \
    --cc=andrew.jones@linux.dev \
    --cc=eric.auger.pro@gmail.com \
    --cc=eric.auger@redhat.com \
    --cc=jarichte@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.linux.dev \
    --cc=maz@kernel.org \
    --cc=oliver.upton@linux.dev \
    /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).