1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (c) 2011 The Chromium OS Authors.
6 #ifndef __ASM_SANDBOX_TYPES_H
7 #define __ASM_SANDBOX_TYPES_H
9 typedef unsigned short umode_t;
12 * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
13 * header files exported to user space
16 typedef __signed__ char __s8;
17 typedef unsigned char __u8;
19 typedef __signed__ short __s16;
20 typedef unsigned short __u16;
22 typedef __signed__ int __s32;
23 typedef unsigned int __u32;
26 __extension__ typedef __signed__ long long __s64;
27 __extension__ typedef unsigned long long __u64;
31 * These aren't exported outside the kernel to avoid name space clashes
35 typedef signed char s8;
36 typedef unsigned char u8;
38 typedef signed short s16;
39 typedef unsigned short u16;
41 typedef signed int s32;
42 typedef unsigned int u32;
44 #if !defined(CONFIG_USE_STDINT) || !defined(__INT64_TYPE__)
45 typedef signed long long s64;
46 typedef unsigned long long u64;
48 typedef __INT64_TYPE__ s64;
49 typedef __UINT64_TYPE__ u64;
53 * Number of bits in a C 'long' on this architecture.
56 #define BITS_PER_LONG 64
57 #else /* CONFIG_PHYS64 */
58 #define BITS_PER_LONG 32
59 #endif /* CONFIG_PHYS64 */
62 typedef unsigned long long dma_addr_t;
63 typedef u64 phys_addr_t;
64 typedef u64 phys_size_t;
65 #else /* CONFIG_PHYS64 */
66 typedef unsigned long dma_addr_t;
67 typedef u32 phys_addr_t;
68 typedef u32 phys_size_t;
69 #endif /* CONFIG_PHYS64 */
71 #endif /* __KERNEL__ */