All of lore.kernel.org
 help / color / mirror / Atom feed
* [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-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.