blob: e78b52e17444ac245618369c52d34514805481f9 [file] [log] [blame]
Vegard Nossum77ef50a2008-06-18 17:08:48 +02001#ifndef ASM_X86__TYPES_H
2#define ASM_X86__TYPES_H
Thomas Gleixner9d256ff2007-10-17 20:32:07 +02003
H. Peter Anvinedfa5cf2008-04-06 10:35:14 -07004#include <asm-generic/int-ll64.h>
5
Thomas Gleixner9d256ff2007-10-17 20:32:07 +02006#ifndef __ASSEMBLY__
7
8typedef unsigned short umode_t;
9
Thomas Gleixner9d256ff2007-10-17 20:32:07 +020010#endif /* __ASSEMBLY__ */
11
12/*
13 * These aren't exported outside the kernel to avoid name space clashes
14 */
15#ifdef __KERNEL__
16
17#ifdef CONFIG_X86_32
18# define BITS_PER_LONG 32
19#else
20# define BITS_PER_LONG 64
21#endif
22
23#ifndef __ASSEMBLY__
24
Thomas Gleixner9d256ff2007-10-17 20:32:07 +020025typedef u64 dma64_addr_t;
26#if defined(CONFIG_X86_64) || defined(CONFIG_HIGHMEM64G)
27/* DMA addresses come in 32-bit and 64-bit flavours. */
28typedef u64 dma_addr_t;
29#else
30typedef u32 dma_addr_t;
31#endif
32
33#endif /* __ASSEMBLY__ */
34#endif /* __KERNEL__ */
35
Vegard Nossum77ef50a2008-06-18 17:08:48 +020036#endif /* ASM_X86__TYPES_H */