All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: James Clark <james.clark@linaro.org>
Cc: Anshuman Khandual <anshuman.khandual@arm.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [boot-wrapper PATCH V2] aarch64: Enable access into FEAT_SPE_FDS register from EL2 and below
Date: Mon, 9 Jun 2025 14:36:49 +0100	[thread overview]
Message-ID: <aEbjcQLBKG7TepPg@J2N7QTR9R3> (raw)
In-Reply-To: <c7c97edf-8e2b-4196-9660-a15b86061c96@linaro.org>

On Fri, Jun 06, 2025 at 09:49:07AM +0100, James Clark wrote:
> On 06/06/2025 6:26 am, Anshuman Khandual wrote:
> > FEAT_SPE_FDS adds system register PMSDSFR_EL1. But accessing that system
> > register from EL2 and below exception levels, will trap into EL3 unless
> > MDCR_EL3.EnPMS3 is set.
> > 
> > Enable access to FEAT_SPE_FDS registers when they are implemented.
> > 
> > Cc: James Clark <james.clark@linaro.org>
> > Cc: Mark Rutland <mark.rutland@arm.com>
> > Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>

> > +	/*
> > +	 * PMSIDR_EL1 register is present, only when FEAT_SPE
> > +	 * feature is implemeneted. Otherwise direct accesses
> > +	 * to PMSIDR_EL1 are UNDEFINED.
> > +	 */
> > +	if ((mrs_field(ID_AA64DFR0_EL1, PMSVER) >= 1) &&
> > +	    (mrs_field(PMSIDR_EL1, FDS)))
> 
> Minor nit, but the extra brackets on the second condition are unnecessary.
> Probably not worth a second version for though.

I don't think they're necessary for either condition, so when I apply
this I'll simplify this to:

	if (mrs_field(ID_AA64DFR0_EL1, PMSVER) >= 1 && 
	    mrs_field(PMSIDR_EL1, FDS))

... and drop the comment.

Mark.


  reply	other threads:[~2025-06-09 13:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-06  5:26 [boot-wrapper PATCH V2] aarch64: Enable access into FEAT_SPE_FDS register from EL2 and below Anshuman Khandual
2025-06-06  8:49 ` James Clark
2025-06-09 13:36   ` Mark Rutland [this message]
2025-06-10  7:40     ` Anshuman Khandual
2025-06-10 17:17     ` 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=aEbjcQLBKG7TepPg@J2N7QTR9R3 \
    --to=mark.rutland@arm.com \
    --cc=anshuman.khandual@arm.com \
    --cc=james.clark@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.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 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.