All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandru Elisei <alexandru.elisei@arm.com>
To: mark.rutland@arm.com, linux-arm-kernel@lists.infradead.org
Subject: [boot-wrapper PATCH] aarch64: Do not trap PMSNEVFR_EL1
Date: Tue, 17 Aug 2021 17:34:20 +0100	[thread overview]
Message-ID: <20210817163420.813631-1-alexandru.elisei@arm.com> (raw)

FEAT_PMUv1p2 adds a new register, PMSNEVFR_EL1, and a new MDCR_EL3 trap bit
for it, EnPMSN. Set the bit to 1 to allow lower exception levels direct
access to the register.

Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
---
 arch/aarch64/boot.S | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/arch/aarch64/boot.S b/arch/aarch64/boot.S
index 2215f7ed3a1f..8951f1e4676a 100644
--- a/arch/aarch64/boot.S
+++ b/arch/aarch64/boot.S
@@ -88,8 +88,12 @@ ASM_FUNC(_start)
 	cbz	x1, 1f
 
 	// Enable SPE for the non-secure world.
-	ldr	x1, =(0x3 << 12)
-	orr	x0, x0, x1
+	ldr	x2, =(0x3 << 12)
+	orr	x0, x0, x2
+	cmp	x1, #3
+	b.lt	1
+	// Do not trap PMSNEVFR_EL1.
+	orr	x0, x0, #(1 << 36)
 
 1:	mrs	x1, id_aa64dfr0_el1
 	ubfx	x1, x1, #44, #4
-- 
2.32.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2021-08-17 16:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-17 16:34 Alexandru Elisei [this message]
2021-08-18 14:12 ` [boot-wrapper PATCH] aarch64: Do not trap PMSNEVFR_EL1 Mark Rutland

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=20210817163420.813631-1-alexandru.elisei@arm.com \
    --to=alexandru.elisei@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mark.rutland@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.