From 8719b3edb30945a1e5277a7d586d5069e3e3635b Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Tue, 26 Mar 2019 20:34:54 -0400 Subject: [PATCH] target/arm: make pmccntr_op_start/finish static These functions are not used outside helper.c Backports commit f2b2f53f6429b5abd7cd86bd65747f5f13e195eb from qemu --- qemu/aarch64.h | 2 -- qemu/aarch64eb.h | 2 -- qemu/arm.h | 2 -- qemu/armeb.h | 2 -- qemu/header_gen.py | 4 ---- qemu/target/arm/cpu.h | 11 ----------- qemu/target/arm/helper.c | 4 ++-- 7 files changed, 2 insertions(+), 25 deletions(-) diff --git a/qemu/aarch64.h b/qemu/aarch64.h index 1ea05fed..f0856cec 100644 --- a/qemu/aarch64.h +++ b/qemu/aarch64.h @@ -4344,8 +4344,6 @@ #define mls_op mls_op_aarch64 #define new_tmp_a64 new_tmp_a64_aarch64 #define new_tmp_a64_zero new_tmp_a64_zero_aarch64 -#define pmccntr_op_start pmccntr_op_start_aarch64 -#define pmccntr_op_finish pmccntr_op_finish_aarch64 #define pmu_op_start pmu_op_start_aarch64 #define pmu_op_finish pmu_op_finish_aarch64 #define pmu_pre_el_change pmu_pre_el_change_aarch64 diff --git a/qemu/aarch64eb.h b/qemu/aarch64eb.h index 6e928cdb..f57b03ed 100644 --- a/qemu/aarch64eb.h +++ b/qemu/aarch64eb.h @@ -4344,8 +4344,6 @@ #define mls_op mls_op_aarch64eb #define new_tmp_a64 new_tmp_a64_aarch64eb #define new_tmp_a64_zero new_tmp_a64_zero_aarch64eb -#define pmccntr_op_start pmccntr_op_start_aarch64eb -#define pmccntr_op_finish pmccntr_op_finish_aarch64eb #define pmu_op_start pmu_op_start_aarch64eb #define pmu_op_finish pmu_op_finish_aarch64eb #define pmu_pre_el_change pmu_pre_el_change_aarch64eb diff --git a/qemu/arm.h b/qemu/arm.h index d6d5cbca..ecc5bf33 100644 --- a/qemu/arm.h +++ b/qemu/arm.h @@ -3352,8 +3352,6 @@ #define pmu_init pmu_init_arm #define mla_op mla_op_arm #define mls_op mls_op_arm -#define pmccntr_op_start pmccntr_op_start_arm -#define pmccntr_op_finish pmccntr_op_finish_arm #define pmu_op_start pmu_op_start_arm #define pmu_op_finish pmu_op_finish_arm #define pmu_pre_el_change pmu_pre_el_change_arm diff --git a/qemu/armeb.h b/qemu/armeb.h index fc5bfd8c..621dab13 100644 --- a/qemu/armeb.h +++ b/qemu/armeb.h @@ -3352,8 +3352,6 @@ #define pmu_init pmu_init_armeb #define mla_op mla_op_armeb #define mls_op mls_op_armeb -#define pmccntr_op_start pmccntr_op_start_armeb -#define pmccntr_op_finish pmccntr_op_finish_armeb #define pmu_op_start pmu_op_start_armeb #define pmu_op_finish pmu_op_finish_armeb #define pmu_pre_el_change pmu_pre_el_change_armeb diff --git a/qemu/header_gen.py b/qemu/header_gen.py index a6246ecf..006f89ad 100644 --- a/qemu/header_gen.py +++ b/qemu/header_gen.py @@ -3361,8 +3361,6 @@ arm_symbols = ( 'pmu_init', 'mla_op', 'mls_op', - 'pmccntr_op_start', - 'pmccntr_op_finish', 'pmu_op_start', 'pmu_op_finish', 'pmu_pre_el_change', @@ -4400,8 +4398,6 @@ aarch64_symbols = ( 'mls_op', 'new_tmp_a64', 'new_tmp_a64_zero', - 'pmccntr_op_start', - 'pmccntr_op_finish', 'pmu_op_start', 'pmu_op_finish', 'pmu_pre_el_change', diff --git a/qemu/target/arm/cpu.h b/qemu/target/arm/cpu.h index 093a9dc9..ae0a6bf8 100644 --- a/qemu/target/arm/cpu.h +++ b/qemu/target/arm/cpu.h @@ -940,17 +940,6 @@ static inline bool is_a64(CPUARMState *env) int cpu_arm_signal_handler(int host_signum, void *pinfo, void *puc); -/** - * pmccntr_op_start/finish - * @env: CPUARMState - * - * Convert the counter in the PMCCNTR between its delta form (the typical mode - * when it's enabled) and the guest-visible value. These two calls must always - * surround any action which might affect the counter. - */ -void pmccntr_op_start(CPUARMState *env); -void pmccntr_op_finish(CPUARMState *env); - /** * pmu_op_start/finish * @env: CPUARMState diff --git a/qemu/target/arm/helper.c b/qemu/target/arm/helper.c index 79285e32..7bdf3dae 100644 --- a/qemu/target/arm/helper.c +++ b/qemu/target/arm/helper.c @@ -1196,7 +1196,7 @@ static void pmu_update_irq(CPUARMState *env) * etc. can be done logically. This is essentially a no-op if the counter is * not enabled at the time of the call. */ -void pmccntr_op_start(CPUARMState *env) +static void pmccntr_op_start(CPUARMState *env) { uint64_t cycles = cycles_get_count(env); @@ -1226,7 +1226,7 @@ void pmccntr_op_start(CPUARMState *env) * guest-visible count. A call to pmccntr_op_finish should follow every call to * pmccntr_op_start. */ -void pmccntr_op_finish(CPUARMState *env) +static void pmccntr_op_finish(CPUARMState *env) { if (pmu_counter_enabled(env, 31)) { uint64_t prev_cycles = env->cp15.c15_ccnt_delta;