mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 06:03:36 -04:00
[PATCH] x86_64: Generalize DMI and enable for x86-64
Some people need it now on 64bit so reuse the i386 code for x86-64. This will be also useful for future bug workarounds. It is a bit simplified there because there is no need to do it very early on x86-64. This means it doesn't need early ioremap et.al. We run it as a core initcall right now. I hope it's not needed for early setup. I added a general CONFIG_DMI symbol in case IA64 or someone else wants to reuse the code later too. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
b347d25fbc
commit
e992867445
9 changed files with 44 additions and 11 deletions
|
|
@ -131,6 +131,11 @@ extern void iounmap(volatile void __iomem *addr);
|
|||
extern void *bt_ioremap(unsigned long offset, unsigned long size);
|
||||
extern void bt_iounmap(void *addr, unsigned long size);
|
||||
|
||||
/* 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
|
||||
|
||||
/*
|
||||
* ISA I/O bus memory addresses are 1:1 with the physical address.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -143,6 +143,11 @@ static inline void __iomem * ioremap (unsigned long offset, unsigned long size)
|
|||
extern void __iomem * ioremap_nocache (unsigned long offset, unsigned long size);
|
||||
extern void iounmap(volatile void __iomem *addr);
|
||||
|
||||
/* Use normal IO mappings for DMI */
|
||||
#define dmi_ioremap ioremap
|
||||
#define dmi_iounmap(x,l) iounmap(x)
|
||||
#define dmi_alloc(l) kmalloc(l, GFP_ATOMIC)
|
||||
|
||||
/*
|
||||
* ISA I/O bus memory addresses are 1:1 with the physical address.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
#define __DMI_H__
|
||||
|
||||
#include <linux/list.h>
|
||||
#include <linux/config.h>
|
||||
|
||||
enum dmi_field {
|
||||
DMI_NONE,
|
||||
|
|
@ -60,12 +61,14 @@ struct dmi_device {
|
|||
void *device_data; /* Type specific data */
|
||||
};
|
||||
|
||||
#if defined(CONFIG_X86_32)
|
||||
#ifdef CONFIG_DMI
|
||||
|
||||
extern int dmi_check_system(struct dmi_system_id *list);
|
||||
extern char * dmi_get_system_info(int field);
|
||||
extern struct dmi_device * dmi_find_device(int type, const char *name,
|
||||
struct dmi_device *from);
|
||||
extern void dmi_scan_machine(void);
|
||||
|
||||
#else
|
||||
|
||||
static inline int dmi_check_system(struct dmi_system_id *list) { return 0; }
|
||||
|
|
|
|||
Loading…
Reference in a new issue