[LTP] [PATCH] Fix the 64-bit macro definition of mips architecture

Viresh Kumar viresh.kumar@linaro.org
Mon Apr 26 07:55:56 CEST 2021


On 26-04-21, 07:42, Petr Vorel wrote:
> Hi sujiaxun,
> 
> [ Cc: Viresh, the original author ]
> 
> > https://github.com/torvalds/linux/blob/master/arch/mips/include/uapi/asm/shmbuf.h
> > The mips 64-bit macro definition in the kernel is "__mips64",
> >  and the mips 64-bit macro definition in the ltp is "__arch64__".
> 
> > Signed-off-by: sujiaxun <sujiaxun@uniontech.com>
> > ---
> >  include/lapi/msgbuf.h | 2 +-
> >  include/lapi/sembuf.h | 2 +-
> >  include/lapi/shmbuf.h | 2 +-
> >  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> > diff --git a/include/lapi/msgbuf.h b/include/lapi/msgbuf.h
> > index f3277270d..f010695f1 100644
> > --- a/include/lapi/msgbuf.h
> > +++ b/include/lapi/msgbuf.h
> > @@ -17,7 +17,7 @@
> >  #if defined(__mips__)
> >  #define HAVE_MSQID64_DS
> 
> > -#if defined(__arch64__)
> > +#if defined(__mips64)
> So __arch64__ is not defined for mips 64 bit? (as it's defined for sparc 64bit?)
> __mips64 is obviously correct and better readable, but is it really required?

I am not sure what you meant by "is it really required?" The #ifdef hackery here
? It is as can be seen in include/uapi/asm-generic/shmbuf.h in Linux source.

> (you can check it with: echo | gcc -dM -E -).

-- 
viresh


More information about the ltp mailing list