* [LTP] [PATCH] Fix the 64-bit macro definition of mips architecture
@ 2021-04-22 7:26 sujiaxun
2021-04-26 5:42 ` Petr Vorel
0 siblings, 1 reply; 16+ messages in thread
From: sujiaxun @ 2021-04-22 7:26 UTC (permalink / raw)
To: ltp
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)
/*
* The msqid64_ds structure for the MIPS architecture.
* Note extra padding because this structure is passed back and forth
diff --git a/include/lapi/sembuf.h b/include/lapi/sembuf.h
index 4ef0483a0..58ad9dff5 100644
--- a/include/lapi/sembuf.h
+++ b/include/lapi/sembuf.h
@@ -24,7 +24,7 @@
* Pad space is left for 2 miscellaneous 64-bit values on mips64,
* but used for the upper 32 bit of the time values on mips32.
*/
-#if defined(__arch64__)
+#if defined(__mips64)
struct semid64_ds {
struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
long sem_otime; /* last semop time */
diff --git a/include/lapi/shmbuf.h b/include/lapi/shmbuf.h
index 28ee33620..fe405ffe8 100644
--- a/include/lapi/shmbuf.h
+++ b/include/lapi/shmbuf.h
@@ -27,7 +27,7 @@
* data structure when moving to 64-bit time_t.
*/
-#if defined(__arch64__)
+#if defined(__mips64)
struct shmid64_ds {
struct ipc64_perm shm_perm; /* operation perms */
size_t shm_segsz; /* size of segment (bytes) */
--
2.20.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [LTP] [PATCH] Fix the 64-bit macro definition of mips architecture
2021-04-22 7:26 [LTP] [PATCH] Fix the 64-bit macro definition of mips architecture sujiaxun
@ 2021-04-26 5:42 ` Petr Vorel
2021-04-26 5:55 ` Viresh Kumar
0 siblings, 1 reply; 16+ messages in thread
From: Petr Vorel @ 2021-04-26 5:42 UTC (permalink / raw)
To: ltp
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?
(you can check it with: echo | gcc -dM -E -).
Kind regards,
Petr
^ permalink raw reply [flat|nested] 16+ messages in thread
* [LTP] [PATCH] Fix the 64-bit macro definition of mips architecture
2021-04-26 5:42 ` Petr Vorel
@ 2021-04-26 5:55 ` Viresh Kumar
2021-04-26 6:17 ` Petr Vorel
0 siblings, 1 reply; 16+ messages in thread
From: Viresh Kumar @ 2021-04-26 5:55 UTC (permalink / raw)
To: ltp
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
^ permalink raw reply [flat|nested] 16+ messages in thread
* [LTP] [PATCH] Fix the 64-bit macro definition of mips architecture
2021-04-26 5:55 ` Viresh Kumar
@ 2021-04-26 6:17 ` Petr Vorel
2021-04-26 6:23 ` Viresh Kumar
0 siblings, 1 reply; 16+ messages in thread
From: Petr Vorel @ 2021-04-26 6:17 UTC (permalink / raw)
To: ltp
Hi Viresh,
...
> > > -#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.
I mean if #if defined(__mips__) && defined(__arch64__) detect 64bit mips
the patch would not be needed (although IMHO __mips64 is more descriptive than
__arch64__, for which you need to search for which architecture it was defined).
But I'm not sure myself if __arch64__ is defined for mips 64bit.
Kind regards,
Petr
^ permalink raw reply [flat|nested] 16+ messages in thread
* [LTP] [PATCH] Fix the 64-bit macro definition of mips architecture
2021-04-26 6:17 ` Petr Vorel
@ 2021-04-26 6:23 ` Viresh Kumar
2021-04-26 7:00 ` sujiaxun
0 siblings, 1 reply; 16+ messages in thread
From: Viresh Kumar @ 2021-04-26 6:23 UTC (permalink / raw)
To: ltp
On 26-04-21, 08:17, Petr Vorel wrote:
> Hi Viresh,
>
> ...
> > > > -#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.
> I mean if #if defined(__mips__) && defined(__arch64__) detect 64bit mips
> the patch would not be needed (although IMHO __mips64 is more descriptive than
> __arch64__, for which you need to search for which architecture it was defined).
Ahh, right.
Actually the kernel has this instead:
#if __BITS_PER_LONG == 64
> But I'm not sure myself if __arch64__ is defined for mips 64bit.
Neither do I.
--
viresh
^ permalink raw reply [flat|nested] 16+ messages in thread
* [LTP] [PATCH] Fix the 64-bit macro definition of mips architecture
2021-04-26 6:23 ` Viresh Kumar
@ 2021-04-26 7:00 ` sujiaxun
2021-04-26 7:03 ` Viresh Kumar
0 siblings, 1 reply; 16+ messages in thread
From: sujiaxun @ 2021-04-26 7:00 UTC (permalink / raw)
To: ltp
On 2021/4/26 ??2:23, Viresh Kumar wrote:
> On 26-04-21, 08:17, Petr Vorel wrote:
>> Hi Viresh,
>>
>> ...
>>>>> -#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.
>> I mean if #if defined(__mips__) && defined(__arch64__) detect 64bit mips
>> the patch would not be needed (although IMHO __mips64 is more descriptive than
>> __arch64__, for which you need to search for which architecture it was defined).
>
> Ahh, right.
>
> Actually the kernel has this instead:
>
> #if __BITS_PER_LONG == 64
>
>> But I'm not sure myself if __arch64__ is defined for mips 64bit.
>
> Neither do I.
>
uos@uos-PC:~$ echo |gcc -dM -E - | grep -i arch
#define _MIPS_ARCH "mips64r2"
#define _MIPS_ARCH_MIPS64R2 1
uos@uos-PC:~$ echo |gcc -dM -E - | grep -i mips64
#define _MIPS_ISA _MIPS_ISA_MIPS64
#define _MIPS_TUNE "mips64r2"
#define _MIPS_TUNE_MIPS64R2 1
#define _MIPS_ARCH "mips64r2"
#define _MIPS_ARCH_MIPS64R2 1
#define __mips64 1
uos@uos-PC:~$ uname -m
mips64
The mips architecture gcc has no built-in __arch64__, only __mips64
definitions. Of course, "__BITS_PER_LONG == 64" can also be used, but I
think it is better to use __mips64 in the mips architecture.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [LTP] [PATCH] Fix the 64-bit macro definition of mips architecture
2021-04-26 7:00 ` sujiaxun
@ 2021-04-26 7:03 ` Viresh Kumar
2021-04-26 7:53 ` sujiaxun
2021-04-26 13:09 ` Petr Vorel
0 siblings, 2 replies; 16+ messages in thread
From: Viresh Kumar @ 2021-04-26 7:03 UTC (permalink / raw)
To: ltp
On 26-04-21, 15:00, sujiaxun wrote:
> uos@uos-PC:~$ echo |gcc -dM -E - | grep -i arch
> #define _MIPS_ARCH "mips64r2"
> #define _MIPS_ARCH_MIPS64R2 1
> uos@uos-PC:~$ echo |gcc -dM -E - | grep -i mips64
> #define _MIPS_ISA _MIPS_ISA_MIPS64
> #define _MIPS_TUNE "mips64r2"
> #define _MIPS_TUNE_MIPS64R2 1
> #define _MIPS_ARCH "mips64r2"
> #define _MIPS_ARCH_MIPS64R2 1
> #define __mips64 1
> uos@uos-PC:~$ uname -m
> mips64
>
> The mips architecture gcc has no built-in __arch64__, only __mips64
> definitions. Of course, "__BITS_PER_LONG == 64" can also be used, but I
> think it is better to use __mips64 in the mips architecture.
Hmm, I will rather try to do what the kernel source code does, i.e.
use __BITS_PER_LONG here instead.
--
viresh
^ permalink raw reply [flat|nested] 16+ messages in thread
* [LTP] [PATCH] Fix the 64-bit macro definition of mips architecture
2021-04-26 7:03 ` Viresh Kumar
@ 2021-04-26 7:53 ` sujiaxun
2021-04-26 8:12 ` Viresh Kumar
2021-04-26 13:09 ` Petr Vorel
1 sibling, 1 reply; 16+ messages in thread
From: sujiaxun @ 2021-04-26 7:53 UTC (permalink / raw)
To: ltp
On 2021/4/26 ??3:03, Viresh Kumar wrote:
> On 26-04-21, 15:00, sujiaxun wrote:
>> uos@uos-PC:~$ echo |gcc -dM -E - | grep -i arch
>> #define _MIPS_ARCH "mips64r2"
>> #define _MIPS_ARCH_MIPS64R2 1
>> uos@uos-PC:~$ echo |gcc -dM -E - | grep -i mips64
>> #define _MIPS_ISA _MIPS_ISA_MIPS64
>> #define _MIPS_TUNE "mips64r2"
>> #define _MIPS_TUNE_MIPS64R2 1
>> #define _MIPS_ARCH "mips64r2"
>> #define _MIPS_ARCH_MIPS64R2 1
>> #define __mips64 1
>> uos@uos-PC:~$ uname -m
>> mips64
>>
>> The mips architecture gcc has no built-in __arch64__, only __mips64
>> definitions. Of course, "__BITS_PER_LONG == 64" can also be used, but I
>> think it is better to use __mips64 in the mips architecture.
>
> Hmm, I will rather try to do what the kernel source code does, i.e.
> use __BITS_PER_LONG here instead.
>
I resubmitted a patch and changed "__arch64__" to "#if __BITS_PER_LONG
== 64", the link is:
https://patchwork.ozlabs.org/project/ltp/patch/20210426074812.27798-1-sujiaxun@uniontech.com
/
^ permalink raw reply [flat|nested] 16+ messages in thread
* [LTP] [PATCH] Fix the 64-bit macro definition of mips architecture
2021-04-26 7:53 ` sujiaxun
@ 2021-04-26 8:12 ` Viresh Kumar
2021-04-26 8:28 ` sujiaxun
0 siblings, 1 reply; 16+ messages in thread
From: Viresh Kumar @ 2021-04-26 8:12 UTC (permalink / raw)
To: ltp
On 26-04-21, 15:53, sujiaxun wrote:
>
>
> On 2021/4/26 ??3:03, Viresh Kumar wrote:
> > On 26-04-21, 15:00, sujiaxun wrote:
> > > uos@uos-PC:~$ echo |gcc -dM -E - | grep -i arch
> > > #define _MIPS_ARCH "mips64r2"
> > > #define _MIPS_ARCH_MIPS64R2 1
> > > uos@uos-PC:~$ echo |gcc -dM -E - | grep -i mips64
> > > #define _MIPS_ISA _MIPS_ISA_MIPS64
> > > #define _MIPS_TUNE "mips64r2"
> > > #define _MIPS_TUNE_MIPS64R2 1
> > > #define _MIPS_ARCH "mips64r2"
> > > #define _MIPS_ARCH_MIPS64R2 1
> > > #define __mips64 1
> > > uos@uos-PC:~$ uname -m
> > > mips64
> > >
> > > The mips architecture gcc has no built-in __arch64__, only __mips64
> > > definitions. Of course, "__BITS_PER_LONG == 64" can also be used, but I
> > > think it is better to use __mips64 in the mips architecture.
> >
> > Hmm, I will rather try to do what the kernel source code does, i.e.
> > use __BITS_PER_LONG here instead.
> >
> I resubmitted a patch and changed "__arch64__" to "#if __BITS_PER_LONG ==
> 64", the link is: https://patchwork.ozlabs.org/project/ltp/patch/20210426074812.27798-1-sujiaxun@uniontech.com
You should have cc'd me directly :(
I don't have that patch in my inbox..
Though the patch looks fine.
--
viresh
^ permalink raw reply [flat|nested] 16+ messages in thread
* [LTP] [PATCH] Fix the 64-bit macro definition of mips architecture
2021-04-26 8:12 ` Viresh Kumar
@ 2021-04-26 8:28 ` sujiaxun
2021-04-26 8:44 ` Viresh Kumar
0 siblings, 1 reply; 16+ messages in thread
From: sujiaxun @ 2021-04-26 8:28 UTC (permalink / raw)
To: ltp
? 2021/4/26 ??4:12, Viresh Kumar ??:
> On 26-04-21, 15:53, sujiaxun wrote:
>>
>>
>> On 2021/4/26 ??3:03, Viresh Kumar wrote:
>>> On 26-04-21, 15:00, sujiaxun wrote:
>>>> uos@uos-PC:~$ echo |gcc -dM -E - | grep -i arch
>>>> #define _MIPS_ARCH "mips64r2"
>>>> #define _MIPS_ARCH_MIPS64R2 1
>>>> uos@uos-PC:~$ echo |gcc -dM -E - | grep -i mips64
>>>> #define _MIPS_ISA _MIPS_ISA_MIPS64
>>>> #define _MIPS_TUNE "mips64r2"
>>>> #define _MIPS_TUNE_MIPS64R2 1
>>>> #define _MIPS_ARCH "mips64r2"
>>>> #define _MIPS_ARCH_MIPS64R2 1
>>>> #define __mips64 1
>>>> uos@uos-PC:~$ uname -m
>>>> mips64
>>>>
>>>> The mips architecture gcc has no built-in __arch64__, only __mips64
>>>> definitions. Of course, "__BITS_PER_LONG == 64" can also be used, but I
>>>> think it is better to use __mips64 in the mips architecture.
>>>
>>> Hmm, I will rather try to do what the kernel source code does, i.e.
>>> use __BITS_PER_LONG here instead.
>>>
>> I resubmitted a patch and changed "__arch64__" to "#if __BITS_PER_LONG ==
>> 64", the link is: https://patchwork.ozlabs.org/project/ltp/patch/20210426074812.27798-1-sujiaxun@uniontech.com
>
> You should have cc'd me directly :(
>
> I don't have that patch in my inbox..
>
> Though the patch looks fine.
>
Sorry, what should I do now?
^ permalink raw reply [flat|nested] 16+ messages in thread
* [LTP] [PATCH] Fix the 64-bit macro definition of mips architecture
2021-04-26 8:28 ` sujiaxun
@ 2021-04-26 8:44 ` Viresh Kumar
0 siblings, 0 replies; 16+ messages in thread
From: Viresh Kumar @ 2021-04-26 8:44 UTC (permalink / raw)
To: ltp
On 26-04-21, 16:28, sujiaxun wrote:
>
>
> ? 2021/4/26 ??4:12, Viresh Kumar ??:
> > On 26-04-21, 15:53, sujiaxun wrote:
> > >
> > >
> > > On 2021/4/26 ??3:03, Viresh Kumar wrote:
> > > > On 26-04-21, 15:00, sujiaxun wrote:
> > > > > uos@uos-PC:~$ echo |gcc -dM -E - | grep -i arch
> > > > > #define _MIPS_ARCH "mips64r2"
> > > > > #define _MIPS_ARCH_MIPS64R2 1
> > > > > uos@uos-PC:~$ echo |gcc -dM -E - | grep -i mips64
> > > > > #define _MIPS_ISA _MIPS_ISA_MIPS64
> > > > > #define _MIPS_TUNE "mips64r2"
> > > > > #define _MIPS_TUNE_MIPS64R2 1
> > > > > #define _MIPS_ARCH "mips64r2"
> > > > > #define _MIPS_ARCH_MIPS64R2 1
> > > > > #define __mips64 1
> > > > > uos@uos-PC:~$ uname -m
> > > > > mips64
> > > > >
> > > > > The mips architecture gcc has no built-in __arch64__, only __mips64
> > > > > definitions. Of course, "__BITS_PER_LONG == 64" can also be used, but I
> > > > > think it is better to use __mips64 in the mips architecture.
> > > >
> > > > Hmm, I will rather try to do what the kernel source code does, i.e.
> > > > use __BITS_PER_LONG here instead.
> > > >
> > > I resubmitted a patch and changed "__arch64__" to "#if __BITS_PER_LONG ==
> > > 64", the link is: https://patchwork.ozlabs.org/project/ltp/patch/20210426074812.27798-1-sujiaxun@uniontech.com
> >
> > You should have cc'd me directly :(
> >
> > I don't have that patch in my inbox..
> >
> > Though the patch looks fine.
> >
> Sorry, what should I do now?
Just reply to the email (without deleting any stuff), and add me in cc
and mention in the top of the email like.
+Viresh.
--
viresh
^ permalink raw reply [flat|nested] 16+ messages in thread
* [LTP] [PATCH] Fix the 64-bit macro definition of mips architecture
2021-04-26 7:03 ` Viresh Kumar
2021-04-26 7:53 ` sujiaxun
@ 2021-04-26 13:09 ` Petr Vorel
1 sibling, 0 replies; 16+ messages in thread
From: Petr Vorel @ 2021-04-26 13:09 UTC (permalink / raw)
To: ltp
> On 26-04-21, 15:00, sujiaxun wrote:
> > uos@uos-PC:~$ echo |gcc -dM -E - | grep -i arch
> > #define _MIPS_ARCH "mips64r2"
> > #define _MIPS_ARCH_MIPS64R2 1
> > uos@uos-PC:~$ echo |gcc -dM -E - | grep -i mips64
> > #define _MIPS_ISA _MIPS_ISA_MIPS64
> > #define _MIPS_TUNE "mips64r2"
> > #define _MIPS_TUNE_MIPS64R2 1
> > #define _MIPS_ARCH "mips64r2"
> > #define _MIPS_ARCH_MIPS64R2 1
> > #define __mips64 1
> > uos@uos-PC:~$ uname -m
> > mips64
Thanks for verification!
> > The mips architecture gcc has no built-in __arch64__, only __mips64
> > definitions. Of course, "__BITS_PER_LONG == 64" can also be used, but I
> > think it is better to use __mips64 in the mips architecture.
> Hmm, I will rather try to do what the kernel source code does, i.e.
> use __BITS_PER_LONG here instead.
+1
Kind regards,
Petr
^ permalink raw reply [flat|nested] 16+ messages in thread
* [LTP] [PATCH] Fix the 64-bit macro definition of mips architecture
2021-04-26 7:48 sujiaxun
2021-04-26 9:00 ` sujiaxun
@ 2021-04-27 12:32 ` Petr Vorel
1 sibling, 0 replies; 16+ messages in thread
From: Petr Vorel @ 2021-04-27 12:32 UTC (permalink / raw)
To: ltp
Hi,
> The mips architecture gcc does not have a built-in __arch64__,
> you can also use "__BITS_PER_LONG == 64"
Thanks for the fix, merged!
Please next time mark new version of the patchset with -vN switch
(e.g. in this case: git format-patch origin/master -v2).
Kind regards,
Petr
^ permalink raw reply [flat|nested] 16+ messages in thread
* [LTP] [PATCH] Fix the 64-bit macro definition of mips architecture
2021-04-26 9:00 ` sujiaxun
@ 2021-04-26 9:02 ` Viresh Kumar
0 siblings, 0 replies; 16+ messages in thread
From: Viresh Kumar @ 2021-04-26 9:02 UTC (permalink / raw)
To: ltp
On 26-04-21, 17:00, sujiaxun wrote:
> Hi Viresh,
>
> Please process the patch below.
>
>
> > The mips architecture gcc does not have a built-in __arch64__,
> > you can also use "__BITS_PER_LONG == 64"
> >
> > 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..873902e95 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 __BITS_PER_LONG == 64
> > /*
> > * The msqid64_ds structure for the MIPS architecture.
> > * Note extra padding because this structure is passed back and forth
> > diff --git a/include/lapi/sembuf.h b/include/lapi/sembuf.h
> > index 4ef0483a0..66579d294 100644
> > --- a/include/lapi/sembuf.h
> > +++ b/include/lapi/sembuf.h
> > @@ -24,7 +24,7 @@
> > * Pad space is left for 2 miscellaneous 64-bit values on mips64,
> > * but used for the upper 32 bit of the time values on mips32.
> > */
> > -#if defined(__arch64__)
> > +#if __BITS_PER_LONG == 64
> > struct semid64_ds {
> > struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
> > long sem_otime; /* last semop time */
> > diff --git a/include/lapi/shmbuf.h b/include/lapi/shmbuf.h
> > index 28ee33620..ad71d9431 100644
> > --- a/include/lapi/shmbuf.h
> > +++ b/include/lapi/shmbuf.h
> > @@ -27,7 +27,7 @@
> > * data structure when moving to 64-bit time_t.
> > */
> >
> > -#if defined(__arch64__)
> > +#if __BITS_PER_LONG == 64
> > struct shmid64_ds {
> > struct ipc64_perm shm_perm; /* operation perms */
> > size_t shm_segsz; /* size of segment (bytes) */
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
--
viresh
^ permalink raw reply [flat|nested] 16+ messages in thread
* [LTP] [PATCH] Fix the 64-bit macro definition of mips architecture
2021-04-26 7:48 sujiaxun
@ 2021-04-26 9:00 ` sujiaxun
2021-04-26 9:02 ` Viresh Kumar
2021-04-27 12:32 ` Petr Vorel
1 sibling, 1 reply; 16+ messages in thread
From: sujiaxun @ 2021-04-26 9:00 UTC (permalink / raw)
To: ltp
Hi Viresh,
Please process the patch below.
> The mips architecture gcc does not have a built-in __arch64__,
> you can also use "__BITS_PER_LONG == 64"
>
> 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..873902e95 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 __BITS_PER_LONG == 64
> /*
> * The msqid64_ds structure for the MIPS architecture.
> * Note extra padding because this structure is passed back and forth
> diff --git a/include/lapi/sembuf.h b/include/lapi/sembuf.h
> index 4ef0483a0..66579d294 100644
> --- a/include/lapi/sembuf.h
> +++ b/include/lapi/sembuf.h
> @@ -24,7 +24,7 @@
> * Pad space is left for 2 miscellaneous 64-bit values on mips64,
> * but used for the upper 32 bit of the time values on mips32.
> */
> -#if defined(__arch64__)
> +#if __BITS_PER_LONG == 64
> struct semid64_ds {
> struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
> long sem_otime; /* last semop time */
> diff --git a/include/lapi/shmbuf.h b/include/lapi/shmbuf.h
> index 28ee33620..ad71d9431 100644
> --- a/include/lapi/shmbuf.h
> +++ b/include/lapi/shmbuf.h
> @@ -27,7 +27,7 @@
> * data structure when moving to 64-bit time_t.
> */
>
> -#if defined(__arch64__)
> +#if __BITS_PER_LONG == 64
> struct shmid64_ds {
> struct ipc64_perm shm_perm; /* operation perms */
> size_t shm_segsz; /* size of segment (bytes) */
> --
> 2.20.1
>
>
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* [LTP] [PATCH] Fix the 64-bit macro definition of mips architecture
@ 2021-04-26 7:48 sujiaxun
2021-04-26 9:00 ` sujiaxun
2021-04-27 12:32 ` Petr Vorel
0 siblings, 2 replies; 16+ messages in thread
From: sujiaxun @ 2021-04-26 7:48 UTC (permalink / raw)
To: ltp
The mips architecture gcc does not have a built-in __arch64__,
you can also use "__BITS_PER_LONG == 64"
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..873902e95 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 __BITS_PER_LONG == 64
/*
* The msqid64_ds structure for the MIPS architecture.
* Note extra padding because this structure is passed back and forth
diff --git a/include/lapi/sembuf.h b/include/lapi/sembuf.h
index 4ef0483a0..66579d294 100644
--- a/include/lapi/sembuf.h
+++ b/include/lapi/sembuf.h
@@ -24,7 +24,7 @@
* Pad space is left for 2 miscellaneous 64-bit values on mips64,
* but used for the upper 32 bit of the time values on mips32.
*/
-#if defined(__arch64__)
+#if __BITS_PER_LONG == 64
struct semid64_ds {
struct ipc64_perm sem_perm; /* permissions .. see ipc.h */
long sem_otime; /* last semop time */
diff --git a/include/lapi/shmbuf.h b/include/lapi/shmbuf.h
index 28ee33620..ad71d9431 100644
--- a/include/lapi/shmbuf.h
+++ b/include/lapi/shmbuf.h
@@ -27,7 +27,7 @@
* data structure when moving to 64-bit time_t.
*/
-#if defined(__arch64__)
+#if __BITS_PER_LONG == 64
struct shmid64_ds {
struct ipc64_perm shm_perm; /* operation perms */
size_t shm_segsz; /* size of segment (bytes) */
--
2.20.1
^ permalink raw reply related [flat|nested] 16+ messages in thread
end of thread, other threads:[~2021-04-27 12:32 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-22 7:26 [LTP] [PATCH] Fix the 64-bit macro definition of mips architecture sujiaxun
2021-04-26 5:42 ` Petr Vorel
2021-04-26 5:55 ` Viresh Kumar
2021-04-26 6:17 ` Petr Vorel
2021-04-26 6:23 ` Viresh Kumar
2021-04-26 7:00 ` sujiaxun
2021-04-26 7:03 ` Viresh Kumar
2021-04-26 7:53 ` sujiaxun
2021-04-26 8:12 ` Viresh Kumar
2021-04-26 8:28 ` sujiaxun
2021-04-26 8:44 ` Viresh Kumar
2021-04-26 13:09 ` Petr Vorel
2021-04-26 7:48 sujiaxun
2021-04-26 9:00 ` sujiaxun
2021-04-26 9:02 ` Viresh Kumar
2021-04-27 12:32 ` Petr Vorel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.