From: Eric Auger <eric.auger@xxxxxxxxxx> SPE support is reported in the ID_AA64DFR0_EL1 register. Move the function get_id_aa64dfr0() from the pmu test to processor.h so it can be reused by the SPE tests. [ Alexandru E: Reworded commit ] Signed-off-by: Eric Auger <eric.auger@xxxxxxxxxx> Signed-off-by: Alexandru Elisei <alexandru.elisei@xxxxxxx> --- lib/arm64/asm/processor.h | 5 +++++ arm/pmu.c | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/arm64/asm/processor.h b/lib/arm64/asm/processor.h index 02665b84cc7e..11b756475494 100644 --- a/lib/arm64/asm/processor.h +++ b/lib/arm64/asm/processor.h @@ -88,6 +88,11 @@ static inline uint64_t get_mpidr(void) return read_sysreg(mpidr_el1); } +static inline uint64_t get_id_aa64dfr0(void) +{ + return read_sysreg(id_aa64dfr0_el1); +} + #define MPIDR_HWID_BITMASK 0xff00ffffff extern int mpidr_to_cpu(uint64_t mpidr); diff --git a/arm/pmu.c b/arm/pmu.c index 831fb6618279..5406ca3b31ed 100644 --- a/arm/pmu.c +++ b/arm/pmu.c @@ -167,7 +167,6 @@ static void test_overflow_interrupt(void) {} #define ID_DFR0_PMU_V3_8_5 0b0110 #define ID_DFR0_PMU_IMPDEF 0b1111 -static inline uint32_t get_id_aa64dfr0(void) { return read_sysreg(id_aa64dfr0_el1); } static inline uint32_t get_pmcr(void) { return read_sysreg(pmcr_el0); } static inline void set_pmcr(uint32_t v) { write_sysreg(v, pmcr_el0); } static inline uint64_t get_pmccntr(void) { return read_sysreg(pmccntr_el0); } -- 2.29.1