From 1d80dd41809227fb8ef2d78bf97f1219b61bad1b Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Mon, 15 Oct 2007 23:28:20 +0200 Subject: [PATCH] --- yaml --- r: 71034 b: refs/heads/master c: 327c21bc3d347d545d227103d7cc58039ab8a0be h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/asm-x86/dmi.h | 36 +++++++++++++++++++++++++++++++--- trunk/include/asm-x86/dmi_32.h | 11 ----------- trunk/include/asm-x86/dmi_64.h | 24 ----------------------- 4 files changed, 34 insertions(+), 39 deletions(-) delete mode 100644 trunk/include/asm-x86/dmi_32.h delete mode 100644 trunk/include/asm-x86/dmi_64.h diff --git a/[refs] b/[refs] index c6ff692beff1..2ad30b0e540c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f1ea05466a13c4fbae852f2ce87aada594f3134f +refs/heads/master: 327c21bc3d347d545d227103d7cc58039ab8a0be diff --git a/trunk/include/asm-x86/dmi.h b/trunk/include/asm-x86/dmi.h index c9e4e8ebc270..8e2b0e6aa8e7 100644 --- a/trunk/include/asm-x86/dmi.h +++ b/trunk/include/asm-x86/dmi.h @@ -1,5 +1,35 @@ +#ifndef _ASM_X86_DMI_H +#define _ASM_X86_DMI_H + +#include + #ifdef CONFIG_X86_32 -# include "dmi_32.h" -#else -# include "dmi_64.h" + +/* Use early IO mappings for DMI because it's initialized early */ +#define dmi_ioremap bt_ioremap +#define dmi_iounmap bt_iounmap +#define dmi_alloc alloc_bootmem + +#else /* CONFIG_X86_32 */ + +#define DMI_MAX_DATA 2048 + +extern int dmi_alloc_index; +extern char dmi_alloc_data[DMI_MAX_DATA]; + +/* This is so early that there is no good way to allocate dynamic memory. + Allocate data in an BSS array. */ +static inline void *dmi_alloc(unsigned len) +{ + int idx = dmi_alloc_index; + if ((dmi_alloc_index += len) > DMI_MAX_DATA) + return NULL; + return dmi_alloc_data + idx; +} + +#define dmi_ioremap early_ioremap +#define dmi_iounmap early_iounmap + +#endif + #endif diff --git a/trunk/include/asm-x86/dmi_32.h b/trunk/include/asm-x86/dmi_32.h deleted file mode 100644 index 38d4eeb7fc7e..000000000000 --- a/trunk/include/asm-x86/dmi_32.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef _ASM_DMI_H -#define _ASM_DMI_H 1 - -#include - -/* Use early IO mappings for DMI because it's initialized early */ -#define dmi_ioremap bt_ioremap -#define dmi_iounmap bt_iounmap -#define dmi_alloc alloc_bootmem - -#endif diff --git a/trunk/include/asm-x86/dmi_64.h b/trunk/include/asm-x86/dmi_64.h deleted file mode 100644 index d02e32e3c3f0..000000000000 --- a/trunk/include/asm-x86/dmi_64.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef _ASM_DMI_H -#define _ASM_DMI_H 1 - -#include - -#define DMI_MAX_DATA 2048 - -extern int dmi_alloc_index; -extern char dmi_alloc_data[DMI_MAX_DATA]; - -/* This is so early that there is no good way to allocate dynamic memory. - Allocate data in an BSS array. */ -static inline void *dmi_alloc(unsigned len) -{ - int idx = dmi_alloc_index; - if ((dmi_alloc_index += len) > DMI_MAX_DATA) - return NULL; - return dmi_alloc_data + idx; -} - -#define dmi_ioremap early_ioremap -#define dmi_iounmap early_iounmap - -#endif