Re: [PATCH 1/4] MIPS: fix local_{add,sub}_return on MIPS64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 16, 2021 at 01:49:48PM +0100, Thomas Bogendoerfer wrote:
> On Wed, Dec 15, 2021 at 04:44:57PM +0800, Huang Pei wrote:
> > Use "daddu/dsubu" for long int on MIPS64 instead of "addu/subu"
> > 
> > Fixes: 7232311ef14c ("local_t: mips extension")
> > Signed-off-by: Huang Pei <huangpei@xxxxxxxxxxx>
> > ---
> >  arch/mips/include/asm/llsc.h  | 4 ++++
> >  arch/mips/include/asm/local.h | 8 ++++----
> >  2 files changed, 8 insertions(+), 4 deletions(-)
> > 
> > diff --git a/arch/mips/include/asm/llsc.h b/arch/mips/include/asm/llsc.h
> > index ec09fe5d6d6c..8cc28177c37f 100644
> > --- a/arch/mips/include/asm/llsc.h
> > +++ b/arch/mips/include/asm/llsc.h
> > @@ -14,10 +14,14 @@
> >  #if _MIPS_SZLONG == 32
> >  #define __LL		"ll	"
> >  #define __SC		"sc	"
> > +#define __ADDU		"addu	"
> > +#define __SUBU		"subu	"
> >  #define __INS		"ins	"
> >  #define __EXT		"ext	"
> >  #elif _MIPS_SZLONG == 64
> >  #define __LL		"lld	"
> > +#define __ADDU		"daddu	"
> > +#define __SUBU		"dsubu	"
> >  #define __SC		"scd	"
> >  #define __INS		"dins	"
> >  #define __EXT		"dext	"
> 
> maybe I wasn't clear enough, I don't want your orginal fix, but use
> fix patch using __stringify(LONG_ADDU)/__stringify(LONG_SUBU).
> 
> Thomas.
> 
My point is to keep code style in consistency. If you insist, you can
fix it by yourself. It is ok, I don't mind.
> -- 
> Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
> good idea.                                                [ RFC1925, 2.3 ]




[Index of Archives]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux