aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/asm-x86/types.h
diff options
context:
space:
mode:
authorkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>2004-06-10 16:59:06 +0000
committerkaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk>2004-06-10 16:59:06 +0000
commit7f68576b77ef3c9fde1009100690ff996d4490e0 (patch)
tree6a87f66c7a03042baa556676add65252816fbd94 /xen/include/asm-x86/types.h
parent822a0b35350d8006b808000eef3665ee4df7b297 (diff)
downloadxen-7f68576b77ef3c9fde1009100690ff996d4490e0.tar.gz
xen-7f68576b77ef3c9fde1009100690ff996d4490e0.tar.bz2
xen-7f68576b77ef3c9fde1009100690ff996d4490e0.zip
bitkeeper revision 1.952 (40c8935a3XSRdQfnx5RoO7XgaggvOQ)
Towards x86_64 support. Merged a bunch of the existing x86_64 stuff back into a generic 'x86' architecture. Aim is to share as much as possible between 32- and 64-bit worlds.
Diffstat (limited to 'xen/include/asm-x86/types.h')
-rw-r--r--xen/include/asm-x86/types.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/xen/include/asm-x86/types.h b/xen/include/asm-x86/types.h
new file mode 100644
index 0000000000..adb63db4d1
--- /dev/null
+++ b/xen/include/asm-x86/types.h
@@ -0,0 +1,58 @@
+#ifndef _X86_TYPES_H
+#define _X86_TYPES_H
+
+typedef unsigned short umode_t;
+
+typedef unsigned int size_t;
+
+/*
+ * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
+ * header files exported to user space
+ */
+
+typedef __signed__ char __s8;
+typedef unsigned char __u8;
+
+typedef __signed__ short __s16;
+typedef unsigned short __u16;
+
+typedef __signed__ int __s32;
+typedef unsigned int __u32;
+
+#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
+#ifdef x86_32
+typedef __signed__ long long __s64;
+typedef unsigned long long __u64;
+#else
+typedef __signed__ long __s64;
+typedef unsigned long __u64;
+#endif
+#endif
+
+#include <xen/config.h>
+
+typedef signed char s8;
+typedef unsigned char u8;
+
+typedef signed short s16;
+typedef unsigned short u16;
+
+typedef signed int s32;
+typedef unsigned int u32;
+
+#ifdef x86_32
+typedef signed long long s64;
+typedef unsigned long long u64;
+#define BITS_PER_LONG 32
+#else
+typedef signed long s64;
+typedef unsigned long u64;
+#define BITS_PER_LONG 64
+#endif
+
+/* DMA addresses come in generic and 64-bit flavours. */
+
+typedef unsigned long dma_addr_t;
+typedef u64 dma64_addr_t;
+
+#endif