Skip to content

Commit 43b3bed

Browse files
rananta468oupton
authored andcommitted
KVM: selftests: aarch64: Remove unused functions from vpmu test
vpmu_counter_access's disable_counter() carries a bug that disables all the counters that are enabled, instead of just the requested one. Fortunately, it's not an issue as there are no callers of it. Hence, instead of fixing it, remove the definition entirely. Remove enable_counter() as it's unused as well. Signed-off-by: Raghavendra Rao Ananta <[email protected]> Reviewed-by: Zenghui Yu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Oliver Upton <[email protected]>
1 parent 75841d8 commit 43b3bed

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

tools/testing/selftests/kvm/aarch64/vpmu_counter_access.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -93,22 +93,6 @@ static inline void write_sel_evtyper(int sel, unsigned long val)
9393
isb();
9494
}
9595

96-
static inline void enable_counter(int idx)
97-
{
98-
uint64_t v = read_sysreg(pmcntenset_el0);
99-
100-
write_sysreg(BIT(idx) | v, pmcntenset_el0);
101-
isb();
102-
}
103-
104-
static inline void disable_counter(int idx)
105-
{
106-
uint64_t v = read_sysreg(pmcntenset_el0);
107-
108-
write_sysreg(BIT(idx) | v, pmcntenclr_el0);
109-
isb();
110-
}
111-
11296
static void pmu_disable_reset(void)
11397
{
11498
uint64_t pmcr = read_sysreg(pmcr_el0);

0 commit comments

Comments
 (0)