blob: d46c0201cc34c1ebc5fb66f4c7d031dde1c86c0a [file] [log] [blame]
Arnd Bergmann2b5a9a32018-03-26 16:59:15 +02001/* SPDX-License-Identifier: GPL-2.0 */
Arnd Bergmannfb373972018-04-18 22:01:26 +02002#ifndef __ASM_GENERIC_COMPAT_H
3#define __ASM_GENERIC_COMPAT_H
Arnd Bergmann2b5a9a32018-03-26 16:59:15 +02004
Arnd Bergmannfb373972018-04-18 22:01:26 +02005/* These types are common across all compat ABIs */
6typedef u32 compat_size_t;
7typedef s32 compat_ssize_t;
8typedef s32 compat_clock_t;
9typedef s32 compat_pid_t;
10typedef u32 compat_ino_t;
11typedef s32 compat_off_t;
12typedef s64 compat_loff_t;
13typedef s32 compat_daddr_t;
14typedef s32 compat_timer_t;
15typedef s32 compat_key_t;
16typedef s16 compat_short_t;
17typedef s32 compat_int_t;
18typedef s32 compat_long_t;
19typedef u16 compat_ushort_t;
20typedef u32 compat_uint_t;
21typedef u32 compat_ulong_t;
22typedef u32 compat_uptr_t;
Arnd Bergmann1a33b182021-07-22 16:28:58 +020023typedef u32 compat_caddr_t;
Arnd Bergmannfb373972018-04-18 22:01:26 +020024typedef u32 compat_aio_context_t;
Arnd Bergmann1a33b182021-07-22 16:28:58 +020025typedef u32 compat_old_sigset_t;
26
27#ifndef __compat_uid32_t
28typedef u32 __compat_uid32_t;
29typedef u32 __compat_gid32_t;
30#endif
31
32#ifndef compat_mode_t
33typedef u32 compat_mode_t;
34#endif
Arnd Bergmannfb373972018-04-18 22:01:26 +020035
Christoph Hellwigcc7886d2020-09-17 09:41:57 +020036#ifdef CONFIG_COMPAT_FOR_U64_ALIGNMENT
37typedef s64 __attribute__((aligned(4))) compat_s64;
38typedef u64 __attribute__((aligned(4))) compat_u64;
39#else
40typedef s64 compat_s64;
41typedef u64 compat_u64;
42#endif
43
Arnd Bergmann1a33b182021-07-22 16:28:58 +020044#ifndef _COMPAT_NSIG
45typedef u32 compat_sigset_word;
46#define _COMPAT_NSIG _NSIG
47#define _COMPAT_NSIG_BPW 32
48#endif
49
Arnd Bergmannfb373972018-04-18 22:01:26 +020050#endif