Re: [kvm-unit-tests PATCH v2 1/2] arm: pmu: Declare pmu_stats as volatile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





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@xxxxxxx>
Signed-off-by: Eric Auger <eric.auger@xxxxxxxxxx>
Reviewed-by: Shaoqin Huang <shahuang@xxxxxxxxxx>
---
  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





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux