Commit 83c86984bff2d793c91eb710af7857828b9ddb49
Committed by
David S. Miller
1 parent
fa8efd50b3
Exists in
master
and in
4 other branches
sparc: unify ipcbuf.h
The ony difference is the size of the mode. sparc has extra padding to compensate for this. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 4 changed files with 31 additions and 69 deletions Side-by-side Diff
arch/sparc/include/asm/Kbuild
arch/sparc/include/asm/ipcbuf.h
1 | -#ifndef ___ASM_SPARC_IPCBUF_H | |
2 | -#define ___ASM_SPARC_IPCBUF_H | |
3 | -#if defined(__sparc__) && defined(__arch64__) | |
4 | -#include <asm/ipcbuf_64.h> | |
5 | -#else | |
6 | -#include <asm/ipcbuf_32.h> | |
1 | +#ifndef __SPARC_IPCBUF_H | |
2 | +#define __SPARC_IPCBUF_H | |
3 | + | |
4 | +/* | |
5 | + * The ipc64_perm structure for sparc/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 | + * - 32-bit seq | |
11 | + * - on sparc for 32 bit mode (it is 32 bit on sparc64) | |
12 | + * - 2 miscellaneous 64-bit values | |
13 | + */ | |
14 | + | |
15 | +struct ipc64_perm | |
16 | +{ | |
17 | + __kernel_key_t key; | |
18 | + __kernel_uid_t uid; | |
19 | + __kernel_gid_t gid; | |
20 | + __kernel_uid_t cuid; | |
21 | + __kernel_gid_t cgid; | |
22 | +#ifndef __arch64__ | |
23 | + unsigned short __pad0; | |
7 | 24 | #endif |
8 | -#endif | |
25 | + __kernel_mode_t mode; | |
26 | + unsigned short __pad1; | |
27 | + unsigned short seq; | |
28 | + unsigned long long __unused1; | |
29 | + unsigned long long __unused2; | |
30 | +}; | |
31 | + | |
32 | +#endif /* __SPARC_IPCBUF_H */ |
arch/sparc/include/asm/ipcbuf_32.h
1 | -#ifndef _SPARC_IPCBUF_H | |
2 | -#define _SPARC_IPCBUF_H | |
3 | - | |
4 | -/* | |
5 | - * The ipc64_perm structure for sparc 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 | - * - 32-bit mode | |
11 | - * - 32-bit seq | |
12 | - * - 2 miscellaneous 64-bit values (so that this structure matches | |
13 | - * sparc64 ipc64_perm) | |
14 | - */ | |
15 | - | |
16 | -struct ipc64_perm | |
17 | -{ | |
18 | - __kernel_key_t key; | |
19 | - __kernel_uid32_t uid; | |
20 | - __kernel_gid32_t gid; | |
21 | - __kernel_uid32_t cuid; | |
22 | - __kernel_gid32_t cgid; | |
23 | - unsigned short __pad1; | |
24 | - __kernel_mode_t mode; | |
25 | - unsigned short __pad2; | |
26 | - unsigned short seq; | |
27 | - unsigned long long __unused1; | |
28 | - unsigned long long __unused2; | |
29 | -}; | |
30 | - | |
31 | -#endif /* _SPARC_IPCBUF_H */ |
arch/sparc/include/asm/ipcbuf_64.h
1 | -#ifndef _SPARC64_IPCBUF_H | |
2 | -#define _SPARC64_IPCBUF_H | |
3 | - | |
4 | -/* | |
5 | - * The ipc64_perm 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 | - * - 32-bit seq | |
11 | - * - 2 miscellaneous 64-bit values | |
12 | - */ | |
13 | - | |
14 | -struct ipc64_perm | |
15 | -{ | |
16 | - __kernel_key_t key; | |
17 | - __kernel_uid_t uid; | |
18 | - __kernel_gid_t gid; | |
19 | - __kernel_uid_t cuid; | |
20 | - __kernel_gid_t cgid; | |
21 | - __kernel_mode_t mode; | |
22 | - unsigned short __pad1; | |
23 | - unsigned short seq; | |
24 | - unsigned long __unused1; | |
25 | - unsigned long __unused2; | |
26 | -}; | |
27 | - | |
28 | -#endif /* _SPARC64_IPCBUF_H */ |