Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/jk/spufs into...
[deliverable/linux.git] / arch / x86 / include / asm / dmi.h
CommitLineData
1965aae3
PA
1#ifndef _ASM_X86_DMI_H
2#define _ASM_X86_DMI_H
327c21bc
TG
3
4#include <asm/io.h>
5
327c21bc
TG
6#define DMI_MAX_DATA 2048
7
8extern int dmi_alloc_index;
9extern char dmi_alloc_data[DMI_MAX_DATA];
10
11/* This is so early that there is no good way to allocate dynamic memory.
12 Allocate data in an BSS array. */
13static inline void *dmi_alloc(unsigned len)
14{
15 int idx = dmi_alloc_index;
bca25baf 16 if ((dmi_alloc_index + len) > DMI_MAX_DATA)
327c21bc 17 return NULL;
bca25baf 18 dmi_alloc_index += len;
327c21bc
TG
19 return dmi_alloc_data + idx;
20}
21
ef3fb66c 22/* Use early IO mappings for DMI because it's initialized early */
327c21bc
TG
23#define dmi_ioremap early_ioremap
24#define dmi_iounmap early_iounmap
25
1965aae3 26#endif /* _ASM_X86_DMI_H */
This page took 0.135123 seconds and 5 git commands to generate.