[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v3 17/22] target/arm: Split arm_ccnt_enabled into ge
From: |
Aaron Lindsay |
Subject: |
[Qemu-devel] [PATCH v3 17/22] target/arm: Split arm_ccnt_enabled into generic pmu_counter_enabled |
Date: |
Fri, 16 Mar 2018 16:31:15 -0400 |
Signed-off-by: Aaron Lindsay <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
---
target/arm/helper.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/target/arm/helper.c b/target/arm/helper.c
index f5e800e..2073d56 100644
--- a/target/arm/helper.c
+++ b/target/arm/helper.c
@@ -1009,17 +1009,22 @@ static CPAccessResult pmreg_access_ccntr(CPUARMState
*env,
return pmreg_access(env, ri, isread);
}
-static inline bool arm_ccnt_enabled(CPUARMState *env)
+static inline bool pmu_counter_enabled(CPUARMState *env, uint8_t counter)
{
/* Does not check PMCCFILTR_EL0, which is handled by pmu_counter_filtered
*/
-
- if (!(env->cp15.c9_pmcr & PMCRE) || !(env->cp15.c9_pmcnten & (1 << 31))) {
+ if (!(env->cp15.c9_pmcr & PMCRE) ||
+ !(env->cp15.c9_pmcnten & (1 << counter))) {
return false;
}
return true;
}
+static inline bool arm_ccnt_enabled(CPUARMState *env)
+{
+ return pmu_counter_enabled(env, 31);
+}
+
/* Returns true if the counter corresponding to the passed-in pmevtyper or
* pmccfiltr value is filtered using the current state */
static inline bool pmu_counter_filtered(CPUARMState *env, uint64_t pmxevtyper)
--
Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.
- [Qemu-devel] [PATCH v3 14/22] target/arm: Make PMOVSCLR 64 bits wide, (continued)
- [Qemu-devel] [PATCH v3 13/22] target/arm: Allow AArch32 access for PMCCFILTR, Aaron Lindsay, 2018/03/16
- [Qemu-devel] [PATCH v3 12/22] target/arm: Filter cycle counter based on PMCCFILTR_EL0, Aaron Lindsay, 2018/03/16
- [Qemu-devel] [PATCH v3 11/22] target/arm: Fix bitmask for PMCCFILTR writes, Aaron Lindsay, 2018/03/16
- [Qemu-devel] [PATCH v3 15/22] target/arm: Add ARM_FEATURE_V7VE for v7 Virtualization Extensions, Aaron Lindsay, 2018/03/16
- [Qemu-devel] [PATCH v3 18/22] target/arm: Add array for supported PMU events, generate PMCEID[01], Aaron Lindsay, 2018/03/16
- [Qemu-devel] [PATCH v3 17/22] target/arm: Split arm_ccnt_enabled into generic pmu_counter_enabled,
Aaron Lindsay <=
- [Qemu-devel] [PATCH v3 20/22] target/arm: PMU: Add instruction and cycle events, Aaron Lindsay, 2018/03/16
- [Qemu-devel] [PATCH v3 16/22] target/arm: Implement PMOVSSET, Aaron Lindsay, 2018/03/16
- [Qemu-devel] [PATCH v3 21/22] target/arm: PMU: Set PMCR.N to 4, Aaron Lindsay, 2018/03/16
- [Qemu-devel] [PATCH v3 22/22] target/arm: Implement PMSWINC, Aaron Lindsay, 2018/03/16
- [Qemu-devel] [PATCH v3 19/22] target/arm: Finish implementation of PM[X]EVCNTR and PM[X]EVTYPER, Aaron Lindsay, 2018/03/16
- Re: [Qemu-devel] [PATCH v3 00/22] More fully implement ARM PMUv3, no-reply, 2018/03/16