ia64/xen-unstable

view xen/include/xen/types.h @ 19800:78962f85c562

IOMMU: Add two generic functions to vendor neutral interface

Add 2 generic functions into the vendor neutral iommu interface, The
reason is that from changeset 19732, there is only one global flag
"iommu_enabled" that controls iommu enablement for both vtd and amd
systems, so we need different code paths for vtd and amd iommu systems
if this flag has been turned on. Also, the early checking of
"iommu_enabled" in iommu_setup() is removed to prevent iommu
functionalities from been disabled on amd systems.

Signed-off-by: Wei Wang <wei.wang2@amd.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Jun 19 08:41:50 2009 +0100 (2009-06-19)
parents 5a7eebbae5dc
children
line source
1 #ifndef __TYPES_H__
2 #define __TYPES_H__
4 #include <xen/config.h>
5 #include <asm/types.h>
7 #define BITS_TO_LONGS(bits) \
8 (((bits)+BITS_PER_LONG-1)/BITS_PER_LONG)
9 #define DECLARE_BITMAP(name,bits) \
10 unsigned long name[BITS_TO_LONGS(bits)]
12 #ifndef NULL
13 #define NULL ((void*)0)
14 #endif
16 #define INT_MAX ((int)(~0U>>1))
17 #define INT_MIN (-INT_MAX - 1)
18 #define UINT_MAX (~0U)
19 #define LONG_MAX ((long)(~0UL>>1))
20 #define LONG_MIN (-LONG_MAX - 1)
21 #define ULONG_MAX (~0UL)
23 /* bsd */
24 typedef unsigned char u_char;
25 typedef unsigned short u_short;
26 typedef unsigned int u_int;
27 typedef unsigned long u_long;
29 /* sysv */
30 typedef unsigned char unchar;
31 typedef unsigned short ushort;
32 typedef unsigned int uint;
33 typedef unsigned long ulong;
35 typedef __u8 uint8_t;
36 typedef __u8 u_int8_t;
37 typedef __s8 int8_t;
39 typedef __u16 uint16_t;
40 typedef __u16 u_int16_t;
41 typedef __s16 int16_t;
43 typedef __u32 uint32_t;
44 typedef __u32 u_int32_t;
45 typedef __s32 int32_t;
47 typedef __u64 uint64_t;
48 typedef __u64 u_int64_t;
49 typedef __s64 int64_t;
51 struct domain;
52 struct vcpu;
54 typedef __u16 __le16;
55 typedef __u16 __be16;
56 typedef __u32 __le32;
57 typedef __u32 __be32;
58 typedef __u64 __le64;
59 typedef __u64 __be64;
61 #endif /* __TYPES_H__ */