[PATCH 2/6] arm64: barriers: make use of barrier options with explicit barriers

Will Deacon will.deacon at arm.com
Thu Feb 6 06:52:08 EST 2014


On Thu, Feb 06, 2014 at 11:49:52AM +0000, Catalin Marinas wrote:
> On Thu, Feb 06, 2014 at 11:45:59AM +0000, Will Deacon wrote:
> > On Thu, Feb 06, 2014 at 11:41:30AM +0000, Catalin Marinas wrote:
> > > On Thu, Feb 06, 2014 at 11:30:49AM +0000, Will Deacon wrote:
> > > > --- a/arch/arm64/include/asm/barrier.h
> > > > +++ b/arch/arm64/include/asm/barrier.h
> > > > @@ -20,14 +20,14 @@
> > > >  
> > > >  #ifndef __ASSEMBLY__
> > > >  
> > > > -#define sev()		asm volatile("sev" : : : "memory")
> > > > +#define sev(l)		asm volatile("sev" #l : : : "memory")
> > > 
> > > Would we actually ever use sev(l) form C? And it's a new instruction
> > > rather than an argument to the existing sev.
> > 
> > I don't know, but if it's not there then I'm pretty sure people will always
> > use sev, even if sevl could be used. In fact, sev and sevl are both aliases
> > of hint, so they're the same instruction with different immediate operands.
> 
> SEVL was pretty much introduced to avoid a branch in the spinlock
> functions. I'm not aware of other uses (on arm64 we don't even use the
> wfe() macro directly). I would skip this for now.

Okey doke, I'll drop this hunk for the time being.

Will



More information about the linux-arm-kernel mailing list