[PATCH v1 1/3] arm64/sve: Split _sve_flush macro into separate Z, P and FFR flushes

Dave Martin Dave.Martin at arm.com
Mon May 10 08:47:23 PDT 2021


On Mon, May 10, 2021 at 04:22:53PM +0100, Mark Brown wrote:
> On Mon, May 10, 2021 at 03:57:11PM +0100, Dave P Martin wrote:
> 
> > > +.macro sve_flush_ffr
> > >  		_sve_wrffr	0
> 
> > This doesn't flush the FFR as advertised, but writes whatever happens to
> > be in P0 to the FFR.
> 
> Oh, bother - the way the macros work mean the argument isn't super clear
> there, it looks like it writes an immediate value, and then of course
> the generated code looks identical.  Will fix.
> 
> > Thinking about it, is there ever a situation when we would want to flush
> > the P-regs and not the FFR (or vice-versa)?  I can't see where we would
> > want to do that myself.
> 
> > If not, can we keep these combined?  We could either keep the name
> > sve_flush_p (since the FFR is a predicate register, if a weird kind of
> > one), or go with something more descriptive such as sve_flush_p_and_ffr.
> 
> Not right now but I do expect to build on this in the not too distant
> future.

OK, but due to the fact that we need to dirty a P-register in order to
zero the FFR, these still don't feel like independent operations.

Can we control the clearing of the FFR (or not) with an argument to a
combined macro?

Cheers
---Dave



More information about the linux-arm-kernel mailing list