kvmarm.lists.cs.columbia.edu archive mirror
 help / color / mirror / Atom feed
From: Alexandru Elisei <alexandru.elisei@arm.com>
To: kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu
Cc: pbonzini@redhat.com
Subject: [kvm-unit-tests RFC PATCH v2 1/5] arm64: Move get_id_aa64dfr0() in processor.h
Date: Tue, 27 Oct 2020 17:19:40 +0000	[thread overview]
Message-ID: <20201027171944.13933-2-alexandru.elisei@arm.com> (raw)
In-Reply-To: <20201027171944.13933-1-alexandru.elisei@arm.com>

From: Eric Auger <eric.auger@redhat.com>

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@redhat.com>
Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
---
 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

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

  reply	other threads:[~2020-10-27 17:19 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-27 17:19 [kvm-unit-tests RFC PATCH v2 0/5] arm64: Statistical Profiling Extension Tests Alexandru Elisei
2020-10-27 17:19 ` Alexandru Elisei [this message]
2020-10-27 17:19 ` [kvm-unit-tests RFC PATCH v2 2/5] lib/{bitops, alloc_page}.h: Add missing headers Alexandru Elisei
2020-10-30 15:29   ` Auger Eric
2020-10-30 15:58     ` Alexandru Elisei
2020-10-27 17:19 ` [kvm-unit-tests RFC PATCH v2 3/5] arm64: spe: Add introspection test Alexandru Elisei
2020-10-30 15:29   ` Auger Eric
2020-10-30 15:59     ` Alexandru Elisei
2020-10-30 17:09       ` Auger Eric
2020-10-30 17:50         ` Alexandru Elisei
2020-10-30 17:52           ` Auger Eric
2020-11-02 10:47           ` Andrew Jones
2020-10-27 17:19 ` [kvm-unit-tests RFC PATCH v2 4/5] lib: arm/arm64: Add function to unmap a page Alexandru Elisei
2020-10-30 15:46   ` Auger Eric
2020-10-30 16:00     ` Alexandru Elisei
2020-10-27 17:19 ` [kvm-unit-tests RFC PATCH v2 5/5] am64: spe: Add buffer test Alexandru Elisei
2020-10-30 17:59   ` Auger Eric
2020-10-30 16:02 ` [kvm-unit-tests RFC PATCH v2 0/5] arm64: Statistical Profiling Extension Tests Alexandru Elisei
2020-10-30 18:17 ` Auger Eric
2020-10-30 22:31   ` Alexandru Elisei
2020-11-02 12:19     ` 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=20201027171944.13933-2-alexandru.elisei@arm.com \
    --to=alexandru.elisei@arm.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=pbonzini@redhat.com \
    /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).