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