[PATCH v3] arm64: Don't read GMID_EL1 when MTE is disabled
Catalin Marinas
catalin.marinas at arm.com
Wed Aug 26 04:06:26 PDT 2026
On Tue, Aug 25, 2026 at 03:46:15PM +0100, Fuad Tabba wrote:
> On Tue, 25 Aug 2026 at 15:14, Will Deacon <will at kernel.org> 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
More information about the linux-arm-kernel
mailing list