1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (C) 2012 ARM Ltd.
8 #define compat_mode_t compat_mode_t
9 typedef u16 compat_mode_t
;
11 #define __compat_uid_t __compat_uid_t
12 typedef u16 __compat_uid_t
;
13 typedef u16 __compat_gid_t
;
15 #define compat_ipc_pid_t compat_ipc_pid_t
16 typedef u16 compat_ipc_pid_t
;
18 #define compat_statfs compat_statfs
20 #include <asm-generic/compat.h>
25 * Architecture specific compatibility types
27 #include <linux/types.h>
28 #include <linux/sched.h>
29 #include <linux/sched/task_stack.h>
32 #define COMPAT_UTS_MACHINE "armv8b\0\0"
34 #define COMPAT_UTS_MACHINE "armv8l\0\0"
37 typedef u16 __compat_uid16_t
;
38 typedef u16 __compat_gid16_t
;
39 typedef s32 compat_nlink_t
;
49 compat_mode_t st_mode
;
50 compat_ushort_t st_nlink
;
51 __compat_uid16_t st_uid
;
52 __compat_gid16_t st_gid
;
60 compat_off_t st_blksize
;
61 compat_off_t st_blocks
;
62 old_time32_t st_atime
;
63 compat_ulong_t st_atime_nsec
;
64 old_time32_t st_mtime
;
65 compat_ulong_t st_mtime_nsec
;
66 old_time32_t st_ctime
;
67 compat_ulong_t st_ctime_nsec
;
68 compat_ulong_t __unused4
[2];
71 struct compat_statfs
{
80 int f_namelen
; /* SunOS ignores this field. */
86 #define compat_user_stack_pointer() (user_stack_pointer(task_pt_regs(current)))
87 #define COMPAT_MINSIGSTKSZ 2048
89 static inline int is_compat_task(void)
91 return test_thread_flag(TIF_32BIT
);
94 static inline int is_compat_thread(struct thread_info
*thread
)
96 return test_ti_thread_flag(thread
, TIF_32BIT
);
99 long compat_arm_syscall(struct pt_regs
*regs
, int scno
);
101 #else /* !CONFIG_COMPAT */
103 static inline int is_compat_thread(struct thread_info
*thread
)
108 #endif /* CONFIG_COMPAT */
109 #endif /* __ASM_COMPAT_H */