1 /* SPDX-License-Identifier: GPL-2.0+ */ 2 /* 3 * Copyright (c) 2011 The Chromium OS Authors. 4 */ 5 6 #ifndef __ASM_SANDBOX_TYPES_H 7 #define __ASM_SANDBOX_TYPES_H 8 9 #include <asm-generic/int-ll64.h> 10 11 typedef unsigned short umode_t; 12 13 /* 14 * These aren't exported outside the kernel to avoid name space clashes 15 */ 16 #ifdef __KERNEL__ 17 18 /* 19 * Number of bits in a C 'long' on this architecture. 20 */ 21 #ifdef CONFIG_PHYS_64BIT 22 #define BITS_PER_LONG 64 23 #else /* CONFIG_PHYS_64BIT */ 24 #define BITS_PER_LONG 32 25 #endif /* CONFIG_PHYS_64BIT */ 26 27 #ifdef CONFIG_PHYS_64BIT 28 typedef unsigned long long dma_addr_t; 29 typedef u64 phys_addr_t; 30 typedef u64 phys_size_t; 31 #else /* CONFIG_PHYS_64BIT */ 32 typedef unsigned long dma_addr_t; 33 typedef u32 phys_addr_t; 34 typedef u32 phys_size_t; 35 #endif /* CONFIG_PHYS_64BIT */ 36 37 #endif /* __KERNEL__ */ 38 39 #endif 40