diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2008-06-05 17:04:06 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-18 00:41:42 -0400 |
commit | 100b10d752bafafda2a508235b7df6718e42bd76 (patch) | |
tree | 5c45cb08f25698bd2292b107d5fa2832878b4ab5 | |
parent | 6d1f4b88ee73c9a073277dd1529fbbce356e04e8 (diff) |
sparc: Merge asm-sparc{,64}/msgbuf.h
Padding from 32 bit sparc kept using preprocessor magic
:$ diff -u include/asm-sparc/msgbuf.h include/asm-sparc64/msgbuf.h
:-- include/asm-sparc/msgbuf.h 2008-06-13 06:42:07.000000000 +0200
:++ include/asm-sparc64/msgbuf.h 2008-06-13 06:42:07.000000000 +0200
:@@ -7,17 +7,13 @@
: * between kernel and user space.
: *
: * Pad space is left for:
:- * - 64-bit time_t to solve y2038 problem
:- * - 2 miscellaneous 32-bit values
:+ * - 2 miscellaneous 64-bit values
: */
:
: struct msqid64_ds {
: struct ipc64_perm msg_perm;
:- unsigned int __pad1;
: __kernel_time_t msg_stime; /* last msgsnd time */
:- unsigned int __pad2;
: __kernel_time_t msg_rtime; /* last msgrcv time */
:- unsigned int __pad3;
: __kernel_time_t msg_ctime; /* last change time */
: unsigned long msg_cbytes; /* current number of bytes on queue */
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
-rw-r--r-- | include/asm-sparc/msgbuf.h | 23 | ||||
-rw-r--r-- | include/asm-sparc64/msgbuf.h | 28 |
2 files changed, 16 insertions, 35 deletions
diff --git a/include/asm-sparc/msgbuf.h b/include/asm-sparc/msgbuf.h index 8cec9ad0b825..efc7cbe9788f 100644 --- a/include/asm-sparc/msgbuf.h +++ b/include/asm-sparc/msgbuf.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef _SPARC64_MSGBUF_H | 1 | #ifndef _SPARC_MSGBUF_H |
2 | #define _SPARC64_MSGBUF_H | 2 | #define _SPARC_MSGBUF_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * The msqid64_ds structure for sparc64 architecture. | 5 | * The msqid64_ds structure for sparc64 architecture. |
6 | * Note extra padding because this structure is passed back and forth | 6 | * Note extra padding because this structure is passed back and forth |
7 | * between kernel and user space. | 7 | * between kernel and user space. |
@@ -11,13 +11,20 @@ | |||
11 | * - 2 miscellaneous 32-bit values | 11 | * - 2 miscellaneous 32-bit values |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #if defined(__sparc__) && defined(__arch64__) | ||
15 | # define PADDING(x) | ||
16 | #else | ||
17 | # define PADDING(x) unsigned int x; | ||
18 | #endif | ||
19 | |||
20 | |||
14 | struct msqid64_ds { | 21 | struct msqid64_ds { |
15 | struct ipc64_perm msg_perm; | 22 | struct ipc64_perm msg_perm; |
16 | unsigned int __pad1; | 23 | PADDING(__pad1) |
17 | __kernel_time_t msg_stime; /* last msgsnd time */ | 24 | __kernel_time_t msg_stime; /* last msgsnd time */ |
18 | unsigned int __pad2; | 25 | PADDING(__pad2) |
19 | __kernel_time_t msg_rtime; /* last msgrcv time */ | 26 | __kernel_time_t msg_rtime; /* last msgrcv time */ |
20 | unsigned int __pad3; | 27 | PADDING(__pad3) |
21 | __kernel_time_t msg_ctime; /* last change time */ | 28 | __kernel_time_t msg_ctime; /* last change time */ |
22 | unsigned long msg_cbytes; /* current number of bytes on queue */ | 29 | unsigned long msg_cbytes; /* current number of bytes on queue */ |
23 | unsigned long msg_qnum; /* number of messages in queue */ | 30 | unsigned long msg_qnum; /* number of messages in queue */ |
@@ -27,5 +34,5 @@ struct msqid64_ds { | |||
27 | unsigned long __unused1; | 34 | unsigned long __unused1; |
28 | unsigned long __unused2; | 35 | unsigned long __unused2; |
29 | }; | 36 | }; |
30 | 37 | #undef PADDING | |
31 | #endif /* _SPARC64_MSGBUF_H */ | 38 | #endif /* _SPARC_MSGBUF_H */ |
diff --git a/include/asm-sparc64/msgbuf.h b/include/asm-sparc64/msgbuf.h index 55c101bd0e7d..5b33cc9d9bfb 100644 --- a/include/asm-sparc64/msgbuf.h +++ b/include/asm-sparc64/msgbuf.h | |||
@@ -1,27 +1 @@ | |||
1 | #ifndef _SPARC64_MSGBUF_H | #include <asm-sparc/msgbuf.h> | |
2 | #define _SPARC64_MSGBUF_H | ||
3 | |||
4 | /* | ||
5 | * The msqid64_ds structure for sparc64 architecture. | ||
6 | * Note extra padding because this structure is passed back and forth | ||
7 | * between kernel and user space. | ||
8 | * | ||
9 | * Pad space is left for: | ||
10 | * - 2 miscellaneous 64-bit values | ||
11 | */ | ||
12 | |||
13 | struct msqid64_ds { | ||
14 | struct ipc64_perm msg_perm; | ||
15 | __kernel_time_t msg_stime; /* last msgsnd time */ | ||
16 | __kernel_time_t msg_rtime; /* last msgrcv time */ | ||
17 | __kernel_time_t msg_ctime; /* last change time */ | ||
18 | unsigned long msg_cbytes; /* current number of bytes on queue */ | ||
19 | unsigned long msg_qnum; /* number of messages in queue */ | ||
20 | unsigned long msg_qbytes; /* max number of bytes on queue */ | ||
21 | __kernel_pid_t msg_lspid; /* pid of last msgsnd */ | ||
22 | __kernel_pid_t msg_lrpid; /* last receive pid */ | ||
23 | unsigned long __unused1; | ||
24 | unsigned long __unused2; | ||
25 | }; | ||
26 | |||
27 | #endif /* _SPARC64_MSGBUF_H */ | ||