From: Mark Brown <broonie@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>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Mike Leach <mike.leach@linaro.org>, Marc Zyngier <maz@kernel.org>,
linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev,
coresight@lists.linaro.org
Subject: Re: [PATCH] arm64/sysreg: Convert TRBE registers to automatic generation
Date: Wed, 31 May 2023 12:46:31 +0100 [thread overview]
Message-ID: <b14abfc9-e6ae-4075-95da-d06947c70db0@sirena.org.uk> (raw)
In-Reply-To: <20230531055524.16562-1-anshuman.khandual@arm.com>
[-- Attachment #1: Type: text/plain, Size: 2324 bytes --]
On Wed, May 31, 2023 at 11:25:24AM +0530, Anshuman Khandual wrote:
> This converts all TRBE related registers to automatic generation and update
> the driver as required. This does not cause any functional change.
> arch/arm64/include/asm/el2_setup.h | 2 +-
> arch/arm64/include/asm/sysreg.h | 49 ----------------
> arch/arm64/kvm/debug.c | 2 +-
> arch/arm64/kvm/hyp/nvhe/debug-sr.c | 2 +-
> arch/arm64/tools/sysreg | 59 ++++++++++++++++++++
> drivers/hwtracing/coresight/coresight-trbe.c | 33 +++++------
> drivers/hwtracing/coresight/coresight-trbe.h | 38 +++++--------
> 7 files changed, 94 insertions(+), 91 deletions(-)
These changes are easier to review if split up a bit, for example
separating the renames of constants from the actual conversion (and
doing different renames separately, though it looks like this only does
the addition of _EL1) or splitting things up by register so that the
registers that are OK don't need to be re-reviewed.
> +Sysreg TRBLIMITR_EL1 3 0 9 11 0
> +Field 63:12 LIMIT
> +Res0 11:6
In DDI0601 2023-03 bit 6 is allocated to a field called XE.
> +Field 5 NVM
nVM.
> +Enum 4:3 TRIG_MODE
> + 0b00 STOP
> + 0b01 IRQ
> + 0b11 IGNR
> +EndEnum
This is documented as TM.
> +Enum 2:1 FILL_MODE
> + 0b00 FILL
> + 0b01 WRAP
> + 0b11 CBUF
> +EndEnum
This is documented as FM.
> +Field 0 ENABLE
This is documented as E.
> +Sysreg TRBSR_EL1 3 0 9 11 3
> +Res0 63:32
In DDI0601 2023-03 MSS2 is allocated in this region from 55:32.
> +Field 31:26 EC
> +Res0 25:23
In DDI0601 2023-03 DAT is allocated in this region at bit 23.
> +Field 17 STOP
This is called S.
> +Res0 15:6
> +Field 5:0 BSC
In DDI0601 2023-03 bits 15:0 are a field MSS which has BSC allocated as
a subfield within it for some events, implementation defined events
could use a different encoding though. We don't represent things like
this (or the various codes in ESR) within the scripting language yet.
> +Sysreg TRBMAR_EL1 3 0 9 11 4
> +Res0 63:10
> +Field 9:8 SH
> +Field 7:0 ATTR
> +EndSysreg
DDI0601 2023-03 has a field PAS at bits 11:10.
> +Sysreg TRBIDR_EL1 3 0 9 11 7
> +Res0 63:6
DDI0601 2023-03 has a field EA from bits 11:8.
> +Field 5 FLAG
This is documented as F.
> +Field 4 PROG
This is documented as P.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2023-05-31 11:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-31 5:55 Anshuman Khandual
2023-05-31 11:46 ` Mark Brown [this message]
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=b14abfc9-e6ae-4075-95da-d06947c70db0@sirena.org.uk \
--to=broonie@kernel.org \
--cc=anshuman.khandual@arm.com \
--cc=catalin.marinas@arm.com \
--cc=coresight@lists.linaro.org \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=mike.leach@linaro.org \
--cc=suzuki.poulose@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
all inboxes | Powered by JetHome®