Re: [PATCH v3] arm64: Don't read GMID_EL1 when MTE is disabled

From: Catalin Marinas

Date: Wed Aug 26 2026 - 07:07:05 EST


On Tue, Aug 25, 2026 at 03:46:15PM +0100, Fuad Tabba wrote:
> On Tue, 25 Aug 2026 at 15:14, Will Deacon <will@xxxxxxxxxx> wrote:
> ...
> > > > If you are worried about additional trapping of the MRS, we should go
> > > > for Will's improvement to always read the cached values in
> > > > __read_sysreg_by_encoding().
> > >
> > > Not worried :) __cpuinfo_store_cpu() has already read ID_AA64PFR1_EL1
> > > a few lines up.
> >
> > But if you go with __read_sysreg_by_encoding() then you'd still be
> > reading it (and trapping) twice, no?
>
> It would, and I'm fine with that on a CPU bring-up path.

For backports, yes. Going forward, I like Will's idea of reading the
cached value in __read_sysreg_by_encoding().

--
Catalin