ia64/pv_ops/xen: implement xen pv_time_ops.
[pv_ops_mirror.git] / include / asm-x86 / dmi.h
blob4edf7514a75033d8173428e1ce1640995a87f154
1 #ifndef _ASM_X86_DMI_H
2 #define _ASM_X86_DMI_H
4 #include <asm/io.h>
6 #ifdef CONFIG_X86_32
8 #define dmi_alloc alloc_bootmem
10 #else /* CONFIG_X86_32 */
12 #define DMI_MAX_DATA 2048
14 extern int dmi_alloc_index;
15 extern char dmi_alloc_data[DMI_MAX_DATA];
17 /* This is so early that there is no good way to allocate dynamic memory.
18 Allocate data in an BSS array. */
19 static inline void *dmi_alloc(unsigned len)
21 int idx = dmi_alloc_index;
22 if ((dmi_alloc_index + len) > DMI_MAX_DATA)
23 return NULL;
24 dmi_alloc_index += len;
25 return dmi_alloc_data + idx;
28 #endif
30 /* Use early IO mappings for DMI because it's initialized early */
31 #define dmi_ioremap early_ioremap
32 #define dmi_iounmap early_iounmap
34 #endif