All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: linux-arm-kernel@lists.infradead.org,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>,
	Oliver Upton <oliver.upton@linux.dev>,
	Mark Brown <broonie@kernel.org>,
	Ryan Roberts <ryan.roberts@arm.com>,
	kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/4] arm64/sysreg: Add TCR_EL2 register
Date: Tue, 19 Aug 2025 09:29:07 +0100	[thread overview]
Message-ID: <87tt23k94c.wl-maz@kernel.org> (raw)
In-Reply-To: <bea0e6b4-4b9e-45c7-b42a-fde93d627cba@arm.com>

On Tue, 19 Aug 2025 06:58:51 +0100,
Anshuman Khandual <anshuman.khandual@arm.com> wrote:
> 
> On 18/08/25 9:13 PM, Marc Zyngier wrote:
> > On Mon, 18 Aug 2025 05:57:58 +0100,
> > Anshuman Khandual <anshuman.khandual@arm.com> wrote:
> >>
> >> Add TCR_EL2 register fields as per the latest ARM ARM DDI 0487 7.B in tools
> > 
> > 7.B??? My copy of the published ARM ARM has L.B as the version suffix.
> 
> Right, the version is L.B instead.
> > 
> > Also, if you got the registers from the ARM ARM, please stop doing
> > so. This is terribly error prone, and likely to be incomplete, given
> > that the ARM ARM lags about a year behind the published architecture.
> > 
> > You have the BSD-licensed MRS at your disposal, please make use of it.
> 
> I guess you are suggesting the latest layout from the XML. Sure will refer
> the layout from the following description.
> 
> https://developer.arm.com/documentation/ddi0601/2025-06/AArch64-Registers/TCR-EL2--Translation-Control-Register--EL2-

This not what I have said. Read this for a start:

https://developer.arm.com/documentation/ddi0601/2025-06/Proprietary-Notice?lang=en

The XML is *NOT* usable to generate Linux descriptions, full stop. If
you don't believe me, ask your favourite legal department.

What I'm asking you to do is to:

- Download https://developer.arm.com/-/cdn-downloads/permalink/Exploration-Tools-OS-Machine-Readable-Data/AARCHMRS_BSD/AARCHMRS_OPENSOURCE_A_profile-2025-06.tar.gz
  (which is BSD-licensed)

- Parse the JSON files to *extract* the information -- not copy/paste
  it or write it by hand. See
  https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/getting-started-aarchmrs-features-json-python
  as an example

- If you can't be bothered to write your own script, have a look at:
  git://git.kernel.org/pub/scm/linux/kernel/git/maz/AARCHMRS (the
  'tooling' branch).

[...]

> > This is only the E2H==0 version of TCR_EL2. IF you are going to
> > describe this register in a useful manner, then add both formats so
> > that we know what we are dealing with.
> 
> IIUC two different runtime layouts for TCR_EL2 is not possible to be
> defined in current tools sysreg format.

Then the tool is broken. Fix the tool. You have the same problem with
CNTHCTL_EL2, for example, and turning a blind eye is not going to
help.

> Also one layout is not just a larger extension of the other - in
> which cases we could have just defined the larger layout.
>
> But curious do we have use cases for bits from the other layout now ?

I don't. But given what you suggested in your reply to patch #2, this
would become an absolute requirement.

	M.

-- 
Jazz isn't dead. It just smells funny.

  reply	other threads:[~2025-08-19  8:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-18  4:57 [PATCH 0/4] arm64/sysreg: Clean up TCR_XXX field macros Anshuman Khandual
2025-08-18  4:57 ` [PATCH 1/4] arm64/sysreg: Update TCR_EL1 register Anshuman Khandual
2025-08-18  9:11   ` Mark Rutland
2025-08-19  3:43     ` Anshuman Khandual
2025-08-18  4:57 ` [PATCH 2/4] arm64/sysreg: Replace TCR_EL1 field macros Anshuman Khandual
2025-08-18 15:46   ` Marc Zyngier
2025-08-19  6:46     ` Anshuman Khandual
2025-08-19  8:12       ` Marc Zyngier
2025-08-18  4:57 ` [PATCH 3/4] arm64/sysreg: Add TCR_EL2 register Anshuman Khandual
2025-08-18  9:17   ` Mark Rutland
2025-08-19  3:46     ` Anshuman Khandual
2025-08-18 15:43   ` Marc Zyngier
2025-08-19  5:58     ` Anshuman Khandual
2025-08-19  8:29       ` Marc Zyngier [this message]
2025-08-18  4:57 ` [PATCH 4/4] arm64/sysreg: Add VTCR_EL2 register Anshuman Khandual
2025-08-18  9:22   ` Mark Rutland
2025-08-19  4:24     ` Anshuman Khandual
2025-08-19  8:35       ` Marc Zyngier

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=87tt23k94c.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=anshuman.khandual@arm.com \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oliver.upton@linux.dev \
    --cc=ryan.roberts@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 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.