This commit was manufactured by cvs2svn to create branch 'vserver'.
[linux-2.6.git] / include / asm-x86_64 / mach-xen / asm / dmi.h
1 #ifndef _ASM_DMI_H
2 #define _ASM_DMI_H 1
3
4 #include <asm/io.h>
5
6 extern void *dmi_ioremap(unsigned long addr, unsigned long size);
7 extern void dmi_iounmap(void *addr, unsigned long size);
8 extern void *bt_ioremap(unsigned long addr, unsigned long size);
9 extern void bt_iounmap(void *addr, unsigned long size);
10
11 #define DMI_MAX_DATA 2048
12
13 extern int dmi_alloc_index;
14 extern char dmi_alloc_data[DMI_MAX_DATA];
15
16 /* This is so early that there is no good way to allocate dynamic memory. 
17    Allocate data in an BSS array. */
18 static inline void *dmi_alloc(unsigned len)
19 {
20         int idx = dmi_alloc_index;
21         if ((dmi_alloc_index += len) > DMI_MAX_DATA)
22                 return NULL;
23         return dmi_alloc_data + idx;
24 }
25
26 #define dmi_ioremap bt_ioremap
27 #define dmi_iounmap bt_iounmap
28
29 #endif