1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _ASM_POWERPC_COMPAT_H
3 #define _ASM_POWERPC_COMPAT_H
6 * Architecture specific compatibility types
8 #include <linux/types.h>
9 #include <linux/sched.h>
11 #define compat_ipc_pid_t compat_ipc_pid_t
12 typedef u16 compat_ipc_pid_t;
14 #define compat_ipc64_perm compat_ipc64_perm
16 #include <asm-generic/compat.h>
19 #define COMPAT_UTS_MACHINE "ppc\0\0"
21 #define COMPAT_UTS_MACHINE "ppcle\0\0"
24 typedef s16 compat_nlink_t;
29 compat_mode_t st_mode;
30 compat_nlink_t st_nlink;
31 __compat_uid32_t st_uid;
32 __compat_gid32_t st_gid;
35 compat_off_t st_blksize;
36 compat_off_t st_blocks;
37 old_time32_t st_atime;
39 old_time32_t st_mtime;
41 old_time32_t st_ctime;
47 * ipc64_perm is actually 32/64bit clean but since the compat layer refers to
48 * it we may as well define it.
50 struct compat_ipc64_perm {
59 unsigned long __unused1; /* yes they really are 64bit pads */
60 unsigned long __unused2;
63 struct compat_semid64_ds {
64 struct compat_ipc64_perm sem_perm;
65 unsigned int sem_otime_high;
66 unsigned int sem_otime;
67 unsigned int sem_ctime_high;
68 unsigned int sem_ctime;
69 compat_ulong_t sem_nsems;
70 compat_ulong_t __unused3;
71 compat_ulong_t __unused4;
74 struct compat_msqid64_ds {
75 struct compat_ipc64_perm msg_perm;
76 unsigned int msg_stime_high;
77 unsigned int msg_stime;
78 unsigned int msg_rtime_high;
79 unsigned int msg_rtime;
80 unsigned int msg_ctime_high;
81 unsigned int msg_ctime;
82 compat_ulong_t msg_cbytes;
83 compat_ulong_t msg_qnum;
84 compat_ulong_t msg_qbytes;
85 compat_pid_t msg_lspid;
86 compat_pid_t msg_lrpid;
87 compat_ulong_t __unused4;
88 compat_ulong_t __unused5;
91 struct compat_shmid64_ds {
92 struct compat_ipc64_perm shm_perm;
93 unsigned int shm_atime_high;
94 unsigned int shm_atime;
95 unsigned int shm_dtime_high;
96 unsigned int shm_dtime;
97 unsigned int shm_ctime_high;
98 unsigned int shm_ctime;
99 unsigned int __unused4;
100 compat_size_t shm_segsz;
101 compat_pid_t shm_cpid;
102 compat_pid_t shm_lpid;
103 compat_ulong_t shm_nattch;
104 compat_ulong_t __unused5;
105 compat_ulong_t __unused6;
108 static inline int is_compat_task(void)
110 return is_32bit_task();
113 #endif /* __KERNEL__ */
114 #endif /* _ASM_POWERPC_COMPAT_H */