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 #define BITS_PER_LONG CONFIG_SANDBOX_BITS_PER_LONG 22 23 #ifdef CONFIG_PHYS_64BIT 24 typedef unsigned long long dma_addr_t; 25 typedef u64 phys_addr_t; 26 typedef u64 phys_size_t; 27 #else /* CONFIG_PHYS_64BIT */ 28 typedef unsigned long dma_addr_t; 29 typedef u32 phys_addr_t; 30 typedef u32 phys_size_t; 31 #endif /* CONFIG_PHYS_64BIT */ 32 33 #endif /* __KERNEL__ */ 34 35 #endif 36