~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/powerpc/include/asm/compat.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #ifndef _ASM_POWERPC_COMPAT_H
  3 #define _ASM_POWERPC_COMPAT_H
  4 #ifdef __KERNEL__
  5 /*
  6  * Architecture specific compatibility types
  7  */
  8 #include <linux/types.h>
  9 #include <linux/sched.h>
 10 
 11 #define compat_ipc_pid_t compat_ipc_pid_t
 12 typedef u16             compat_ipc_pid_t;
 13 
 14 #define compat_ipc64_perm compat_ipc64_perm
 15 
 16 #include <asm-generic/compat.h>
 17 
 18 #ifdef __BIG_ENDIAN__
 19 #define COMPAT_UTS_MACHINE      "ppc\0\0"
 20 #else
 21 #define COMPAT_UTS_MACHINE      "ppcle\0\0"
 22 #endif
 23 
 24 typedef s16             compat_nlink_t;
 25 
 26 struct compat_stat {
 27         compat_dev_t    st_dev;
 28         compat_ino_t    st_ino;
 29         compat_mode_t   st_mode;
 30         compat_nlink_t  st_nlink;
 31         __compat_uid32_t        st_uid;
 32         __compat_gid32_t        st_gid;
 33         compat_dev_t    st_rdev;
 34         compat_off_t    st_size;
 35         compat_off_t    st_blksize;
 36         compat_off_t    st_blocks;
 37         old_time32_t    st_atime;
 38         u32             st_atime_nsec;
 39         old_time32_t    st_mtime;
 40         u32             st_mtime_nsec;
 41         old_time32_t    st_ctime;
 42         u32             st_ctime_nsec;
 43         u32             __unused4[2];
 44 };
 45 
 46 /*
 47  * ipc64_perm is actually 32/64bit clean but since the compat layer refers to
 48  * it we may as well define it.
 49  */
 50 struct compat_ipc64_perm {
 51         compat_key_t key;
 52         __compat_uid_t uid;
 53         __compat_gid_t gid;
 54         __compat_uid_t cuid;
 55         __compat_gid_t cgid;
 56         compat_mode_t mode;
 57         unsigned int seq;
 58         unsigned int __pad2;
 59         unsigned long __unused1;        /* yes they really are 64bit pads */
 60         unsigned long __unused2;
 61 };
 62 
 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;
 72 };
 73 
 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;
 89 };
 90 
 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;
106 };
107 
108 static inline int is_compat_task(void)
109 {
110         return is_32bit_task();
111 }
112 
113 #endif /* __KERNEL__ */
114 #endif /* _ASM_POWERPC_COMPAT_H */
115 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php