1 #ifndef __ASM_ARM_TYPES_H
2 #define __ASM_ARM_TYPES_H
3 
4 #include <asm-generic/int-ll64.h>
5 
6 typedef unsigned short umode_t;
7 
8 /*
9  * These aren't exported outside the kernel to avoid name space clashes
10  */
11 #ifdef __KERNEL__
12 
13 #ifdef	CONFIG_ARM64
14 #define BITS_PER_LONG 64
15 #else	/* CONFIG_ARM64 */
16 #define BITS_PER_LONG 32
17 #endif	/* CONFIG_ARM64 */
18 
19 #ifdef CONFIG_PHYS_64BIT
20 typedef unsigned long long phys_addr_t;
21 typedef unsigned long long phys_size_t;
22 #else
23 /* DMA addresses are 32-bits wide */
24 typedef unsigned long phys_addr_t;
25 typedef unsigned long phys_size_t;
26 #endif
27 
28 /*
29  * A dma_addr_t can hold any valid DMA address, i.e., any address returned
30  * by the DMA API.
31  *
32  * If the DMA API only uses 32-bit addresses, dma_addr_t need only be 32
33  * bits wide.  Bus addresses, e.g., PCI BARs, may be wider than 32 bits,
34  * but drivers do memory-mapped I/O to ioremapped kernel virtual addresses,
35  * so they don't care about the size of the actual bus addresses.
36  */
37 #ifdef CONFIG_DMA_ADDR_T_64BIT
38 typedef unsigned long long dma_addr_t;
39 #else
40 typedef u32 dma_addr_t;
41 #endif
42 
43 #endif /* __KERNEL__ */
44 
45 #endif
46