[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200123173456.GA20475@arm.com>
Date: Thu, 23 Jan 2020 17:34:56 +0000
From: Ionela Voinescu <ionela.voinescu@....com>
To: Valentin Schneider <valentin.schneider@....com>
Cc: catalin.marinas@....com, will@...nel.org, mark.rutland@....com,
maz@...nel.org, suzuki.poulose@....com, sudeep.holla@....com,
dietmar.eggemann@....com, peterz@...radead.org, mingo@...hat.com,
ggherdovich@...e.cz, vincent.guittot@...aro.org,
linux-arm-kernel@...ts.infradead.org, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, Steve Capper <steve.capper@....com>
Subject: Re: [PATCH v2 2/6] arm64: trap to EL1 accesses to AMU counters from
EL0
On Thursday 23 Jan 2020 at 17:04:32 (+0000), Valentin Schneider wrote:
> On 18/12/2019 18:26, Ionela Voinescu wrote:
> > +/*
> > + * reset_amuserenr_el0 - reset AMUSERENR_EL0 if AMUv1 present
> > + */
> > + .macro reset_amuserenr_el0, tmpreg
> > + mrs \tmpreg, id_aa64pfr0_el1 // Check ID_AA64PFR0_EL1
> > + ubfx \tmpreg, \tmpreg, #ID_AA64PFR0_AMU_SHIFT, #4
> > + cbz \tmpreg, 9000f // Skip if no AMU present
> > + msr_s SYS_AMUSERENR_EL0, xzr // Disable AMU access from EL0
> > +9000:
>
> AIUI you can steer away from the obscure numbering scheme and define the
> label using the macro counter:
>
> cbz \tmpreg, .Lskip_\@
> [...]
> .Lskip_\@:
> .endm
>
Cool, good to know! Although calling it "obscure numbering scheme" does
make it more appealing to use.
Thanks, I'll change it in the next version :).
Ionela.
>
> > + .endm
Powered by blists - more mailing lists