From: Eric Auger <eric.auger@redhat.com>
To: eric.auger.pro@gmail.com, eric.auger@redhat.com,
kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu,
qemu-devel@nongnu.org, drjones@redhat.com, andrew.murray@arm.com,
sudeep.holla@arm.com, maz@kernel.org, will@kernel.org,
haibo.xu@linaro.org
Subject: [kvm-unit-tests RFC 1/4] arm64: Move get_id_aa64dfr0() in processor.h
Date: Mon, 31 Aug 2020 21:34:11 +0200 [thread overview]
Message-ID: <20200831193414.6951-2-eric.auger@redhat.com> (raw)
In-Reply-To: <20200831193414.6951-1-eric.auger@redhat.com>
We plan to use get_id_aa64dfr0() for SPE tests.
So let's move this latter in processor.h header.
Signed-off-by: Eric Auger <eric.auger@redhat.com>
---
arm/pmu.c | 1 -
lib/arm64/asm/processor.h | 5 +++++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/arm/pmu.c b/arm/pmu.c
index cece53e..e2cb51e 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); }
diff --git a/lib/arm64/asm/processor.h b/lib/arm64/asm/processor.h
index 02665b8..11b7564 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);
--
2.21.3
next prev parent reply other threads:[~2020-08-31 19:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-31 19:34 [kvm-unit-tests RFC 0/4] KVM: arm64: Statistical Profiling Extension Tests Eric Auger
2020-08-31 19:34 ` Eric Auger [this message]
2020-08-31 19:34 ` [kvm-unit-tests RFC 2/4] spe: Probing and Introspection Test Eric Auger
2020-08-31 19:34 ` [kvm-unit-tests RFC 3/4] spe: Add profiling buffer test Eric Auger
2020-08-31 19:34 ` [kvm-unit-tests RFC 4/4] spe: Test Profiling Buffer Events Eric Auger
2020-09-01 7:34 ` Auger Eric
2020-09-01 9:24 ` [kvm-unit-tests RFC 0/4] KVM: arm64: Statistical Profiling Extension Tests Alexandru Elisei
2020-09-01 10:49 ` Auger Eric
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200831193414.6951-2-eric.auger@redhat.com \
--to=eric.auger@redhat.com \
--cc=andrew.murray@arm.com \
--cc=drjones@redhat.com \
--cc=eric.auger.pro@gmail.com \
--cc=haibo.xu@linaro.org \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=maz@kernel.org \
--cc=qemu-devel@nongnu.org \
--cc=sudeep.holla@arm.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).