summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/arch/arm/pmu.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/arch/arm/pmu.cc b/src/arch/arm/pmu.cc
index 14b1b50a0..f1ff6cbbc 100644
--- a/src/arch/arm/pmu.cc
+++ b/src/arch/arm/pmu.cc
@@ -147,8 +147,10 @@ PMU::setMiscReg(int misc_reg, MiscReg val)
case MISCREG_PMSWINC:
for (int i = 0; i < counters.size(); ++i) {
CounterState &ctr(getCounter(i));
- if (ctr.enabled && (val & (1 << i)))
+ if (ctr.enabled && (val & (1 << i))
+ && ctr.eventId == ARCH_EVENT_SW_INCR ) {
++ctr.value;
+ }
}
break;