]> Git Repo - qemu.git/blobdiff - linux-user/syscall_defs.h
Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging
[qemu.git] / linux-user / syscall_defs.h
index e00e1b38628e20de8b15b00d2a33600ffdfc6e84..23f5bccf0e83176ce6dc3af05d0f1729a42f62e7 100644 (file)
 
 #if defined(TARGET_I386) || defined(TARGET_ARM) || defined(TARGET_SH4) \
     || defined(TARGET_M68K) || defined(TARGET_CRIS) \
-    || defined(TARGET_UNICORE32) || defined(TARGET_S390X) \
+    || defined(TARGET_S390X) \
     || defined(TARGET_OPENRISC) || defined(TARGET_TILEGX) \
-    || defined(TARGET_NIOS2) || defined(TARGET_RISCV)
+    || defined(TARGET_NIOS2) || defined(TARGET_RISCV) \
+    || defined(TARGET_XTENSA)
 
 #define TARGET_IOC_SIZEBITS    14
 #define TARGET_IOC_DIRBITS     2
@@ -352,19 +353,6 @@ typedef struct {
         int     val[2];
 } kernel_fsid_t;
 
-struct kernel_statfs {
-       int f_type;
-       int f_bsize;
-       int f_blocks;
-       int f_bfree;
-       int f_bavail;
-       int f_files;
-       int f_ffree;
-        kernel_fsid_t f_fsid;
-       int f_namelen;
-       int f_spare[6];
-};
-
 struct target_dirent {
         abi_long        d_ino;
         abi_long        d_off;
@@ -433,10 +421,10 @@ int do_sigaction(int sig, const struct target_sigaction *act,
 #if defined(TARGET_I386) || defined(TARGET_ARM) || defined(TARGET_SPARC) \
     || defined(TARGET_PPC) || defined(TARGET_MIPS) || defined(TARGET_SH4) \
     || defined(TARGET_M68K) || defined(TARGET_ALPHA) || defined(TARGET_CRIS) \
-    || defined(TARGET_MICROBLAZE) || defined(TARGET_UNICORE32) \
+    || defined(TARGET_MICROBLAZE) \
     || defined(TARGET_S390X) || defined(TARGET_OPENRISC) \
     || defined(TARGET_TILEGX) || defined(TARGET_HPPA) || defined(TARGET_NIOS2) \
-    || defined(TARGET_RISCV)
+    || defined(TARGET_RISCV) || defined(TARGET_XTENSA)
 
 #if defined(TARGET_SPARC)
 #define TARGET_SA_NOCLDSTOP    8u
@@ -447,6 +435,7 @@ int do_sigaction(int sig, const struct target_sigaction *act,
 #define TARGET_SA_NODEFER      0x20u
 #define TARGET_SA_RESETHAND    4u
 #define TARGET_ARCH_HAS_SA_RESTORER 1
+#define TARGET_ARCH_HAS_KA_RESTORER 1
 #elif defined(TARGET_MIPS)
 #define TARGET_SA_NOCLDSTOP    0x00000001
 #define TARGET_SA_NOCLDWAIT    0x00010000
@@ -754,6 +743,9 @@ struct target_sigaction {
         abi_ulong sa_restorer;
 #endif
         target_sigset_t sa_mask;
+#ifdef TARGET_ARCH_HAS_KA_RESTORER
+        abi_ulong ka_restorer;
+#endif
 };
 #endif
 
@@ -1392,6 +1384,18 @@ struct target_winsize {
 #define TARGET_MAP_NONBLOCK    0x20000         /* do not block on IO */
 #define TARGET_MAP_STACK        0x40000         /* ignored */
 #define TARGET_MAP_HUGETLB      0x80000         /* create a huge page mapping */
+#elif defined(TARGET_XTENSA)
+#define TARGET_MAP_FIXED       0x10            /* Interpret addr exactly */
+#define TARGET_MAP_ANONYMOUS   0x0800          /* don't use a file */
+#define TARGET_MAP_GROWSDOWN   0x1000          /* stack-like segment */
+#define TARGET_MAP_DENYWRITE   0x2000          /* ETXTBSY */
+#define TARGET_MAP_EXECUTABLE  0x4000          /* mark it as an executable */
+#define TARGET_MAP_LOCKED      0x8000          /* pages are locked */
+#define TARGET_MAP_NORESERVE   0x0400          /* don't check for reservations */
+#define TARGET_MAP_POPULATE    0x10000         /* populate (prefault) pagetables */
+#define TARGET_MAP_NONBLOCK    0x20000         /* do not block on IO */
+#define TARGET_MAP_STACK       0x40000
+#define TARGET_MAP_HUGETLB  0x80000         /* create a huge page mapping */
 #else
 #define TARGET_MAP_FIXED       0x10            /* Interpret addr exactly */
 #define TARGET_MAP_ANONYMOUS   0x20            /* don't use a file */
@@ -1409,7 +1413,7 @@ struct target_winsize {
 
 #if (defined(TARGET_I386) && defined(TARGET_ABI32)) \
     || (defined(TARGET_ARM) && defined(TARGET_ABI32)) \
-    || defined(TARGET_CRIS) || defined(TARGET_UNICORE32)
+    || defined(TARGET_CRIS)
 struct target_stat {
        unsigned short st_dev;
        unsigned short __pad1;
@@ -2093,6 +2097,51 @@ struct target_stat {
     abi_ulong  target_st_ctime_nsec;
     unsigned int __unused[2];
 };
+#elif defined(TARGET_XTENSA)
+struct target_stat {
+    abi_ulong       st_dev;
+    abi_ulong       st_ino;
+    unsigned int    st_mode;
+    unsigned int    st_nlink;
+    unsigned int    st_uid;
+    unsigned int    st_gid;
+    abi_ulong       st_rdev;
+    abi_long        st_size;
+    abi_ulong       st_blksize;
+    abi_ulong       st_blocks;
+    abi_ulong       target_st_atime;
+    abi_ulong       target_st_atime_nsec;
+    abi_ulong       target_st_mtime;
+    abi_ulong       target_st_mtime_nsec;
+    abi_ulong       target_st_ctime;
+    abi_ulong       target_st_ctime_nsec;
+    abi_ulong       __unused4;
+    abi_ulong       __unused5;
+};
+
+#define TARGET_HAS_STRUCT_STAT64
+struct target_stat64  {
+    uint64_t st_dev;            /* Device */
+    uint64_t st_ino;            /* File serial number */
+    unsigned int  st_mode;      /* File mode. */
+    unsigned int  st_nlink;     /* Link count. */
+    unsigned int  st_uid;       /* User ID of the file's owner. */
+    unsigned int  st_gid;       /* Group ID of the file's group. */
+    uint64_t st_rdev;           /* Device number, if device. */
+    int64_t st_size;            /* Size of file, in bytes. */
+    abi_ulong st_blksize;       /* Optimal block size for I/O. */
+    abi_ulong __unused2;
+    uint64_t st_blocks;         /* Number 512-byte blocks allocated. */
+    abi_ulong target_st_atime;  /* Time of last access. */
+    abi_ulong target_st_atime_nsec;
+    abi_ulong target_st_mtime;  /* Time of last modification. */
+    abi_ulong target_st_mtime_nsec;
+    abi_ulong target_st_ctime;  /* Time of last status change. */
+    abi_ulong target_st_ctime_nsec;
+    abi_ulong __unused4;
+    abi_ulong __unused5;
+};
+
 #elif defined(TARGET_OPENRISC) || defined(TARGET_TILEGX) || \
       defined(TARGET_NIOS2) || defined(TARGET_RISCV)
 
@@ -2226,7 +2275,8 @@ struct target_statfs {
        /* Linux specials */
        target_fsid_t           f_fsid;
        int32_t                 f_namelen;
-       int32_t                 f_spare[6];
+       int32_t                 f_flags;
+       int32_t                 f_spare[5];
 };
 #else
 struct target_statfs {
@@ -2242,7 +2292,8 @@ struct target_statfs {
        /* Linux specials */
        target_fsid_t           f_fsid;
        abi_long                f_namelen;
-       abi_long                f_spare[6];
+       abi_long                f_flags;
+       abi_long                f_spare[5];
 };
 #endif
 
@@ -2258,7 +2309,8 @@ struct target_statfs64 {
        uint64_t        f_bavail;
        target_fsid_t   f_fsid;
        uint32_t        f_namelen;
-       uint32_t        f_spare[6];
+       uint32_t        f_flags;
+       uint32_t        f_spare[5];
 };
 #elif (defined(TARGET_PPC64) || defined(TARGET_X86_64) || \
        defined(TARGET_SPARC64) || defined(TARGET_AARCH64) || \
@@ -2274,7 +2326,8 @@ struct target_statfs {
        target_fsid_t f_fsid;
        abi_long f_namelen;
        abi_long f_frsize;
-       abi_long f_spare[5];
+       abi_long f_flags;
+       abi_long f_spare[4];
 };
 
 struct target_statfs64 {
@@ -2288,7 +2341,8 @@ struct target_statfs64 {
        target_fsid_t f_fsid;
        abi_long f_namelen;
        abi_long f_frsize;
-       abi_long f_spare[5];
+       abi_long f_flags;
+       abi_long f_spare[4];
 };
 #elif defined(TARGET_S390X)
 struct target_statfs {
@@ -2302,7 +2356,9 @@ struct target_statfs {
     kernel_fsid_t f_fsid;
     int32_t  f_namelen;
     int32_t  f_frsize;
-    int32_t  f_spare[5];
+    int32_t  f_flags;
+    int32_t  f_spare[4];
+
 };
 
 struct target_statfs64 {
@@ -2316,7 +2372,8 @@ struct target_statfs64 {
     kernel_fsid_t f_fsid;
     int32_t  f_namelen;
     int32_t  f_frsize;
-    int32_t  f_spare[5];
+    int32_t  f_flags;
+    int32_t  f_spare[4];
 };
 #else
 struct target_statfs {
@@ -2330,7 +2387,8 @@ struct target_statfs {
        target_fsid_t f_fsid;
        uint32_t f_namelen;
        uint32_t f_frsize;
-       uint32_t f_spare[5];
+       uint32_t f_flags;
+       uint32_t f_spare[4];
 };
 
 struct target_statfs64 {
@@ -2344,7 +2402,8 @@ struct target_statfs64 {
        target_fsid_t f_fsid;
         uint32_t f_namelen;
        uint32_t f_frsize;
-       uint32_t f_spare[5];
+       uint32_t f_flags;
+       uint32_t f_spare[4];
 };
 #endif
 
@@ -2506,6 +2565,7 @@ struct target_statfs64 {
 #define TARGET_O_CLOEXEC      0x400000
 #define TARGET___O_SYNC       0x800000
 #define TARGET_O_PATH        0x1000000
+#define TARGET___O_TMPFILE   0x2000000
 #endif
 
 /* <asm-generic/fcntl.h> values follow.  */
@@ -2593,7 +2653,8 @@ struct target_flock64 {
     short  l_whence;
 #if defined(TARGET_PPC) || defined(TARGET_X86_64) || defined(TARGET_MIPS) \
     || defined(TARGET_SPARC) || defined(TARGET_HPPA) \
-    || defined(TARGET_MICROBLAZE) || defined(TARGET_TILEGX)
+    || defined(TARGET_MICROBLAZE) || defined(TARGET_TILEGX) \
+    || defined(TARGET_XTENSA)
     int __pad;
 #endif
     abi_llong l_start;
This page took 0.031637 seconds and 4 git commands to generate.