* [PATCH] DMI/APIC updates 3 of 4: early-dmi-scan
@ 2002-01-02 19:09 Mikael Pettersson
0 siblings, 0 replies; only message in thread
From: Mikael Pettersson @ 2002-01-02 19:09 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel
Linus,
This is part 3 of 4 of a patch set for 2.5.2-pre6 to move the
x86 DMI scan to an earlier point in the boot sequence. This is
motivated by the UP APIC code, which must be disabled on some
machines with broken BIOSen, but there are also other cases that
would benefit from it. Tested. Please apply.
This third patch (patch-early-dmi-scan) changes the boot sequence
so that the DMI scan is called from setup_arch() instead of being
a module_init(). This allows the DMI data to be used to control if
and how the core hardware is initialised. In dmi_scan.c, ioremap()
and kmalloc() are replaced by bt_ioremap() and alloc_bootmem().
This requires the boot-time-ioremap patch I posted previously,
/Mikael
diff -ruN linux-2.5.2-pre6/arch/i386/kernel/dmi_scan.c linux-2.5.2-pre6.early-dmi-scan/arch/i386/kernel/dmi_scan.c
--- linux-2.5.2-pre6/arch/i386/kernel/dmi_scan.c Wed Jan 2 00:43:14 2002
+++ linux-2.5.2-pre6.early-dmi-scan/arch/i386/kernel/dmi_scan.c Wed Jan 2 00:57:49 2002
@@ -9,6 +9,7 @@
#include <linux/pm.h>
#include <asm/keyboard.h>
#include <asm/system.h>
+#include <linux/bootmem.h>
unsigned long dmi_broken;
int is_sony_vaio_laptop;
@@ -51,7 +52,7 @@
u8 *data;
int i=1;
- buf = ioremap(base, len);
+ buf = bt_ioremap(base, len);
if(buf==NULL)
return -1;
@@ -83,7 +84,7 @@
data+=2;
i++;
}
- iounmap(buf);
+ bt_iounmap(buf, len);
return 0;
}
@@ -155,7 +156,7 @@
return;
if (dmi_ident[slot])
return;
- dmi_ident[slot] = kmalloc(strlen(p)+1, GFP_KERNEL);
+ dmi_ident[slot] = alloc_bootmem(strlen(p)+1);
if(dmi_ident[slot])
strcpy(dmi_ident[slot], p);
else
@@ -728,12 +729,9 @@
}
}
-static int __init dmi_scan_machine(void)
+void __init dmi_scan_machine(void)
{
int err = dmi_iterate(dmi_decode);
if(err == 0)
dmi_check_blacklist();
- return err;
}
-
-module_init(dmi_scan_machine);
diff -ruN linux-2.5.2-pre6/arch/i386/kernel/setup.c linux-2.5.2-pre6.early-dmi-scan/arch/i386/kernel/setup.c
--- linux-2.5.2-pre6/arch/i386/kernel/setup.c Wed Jan 2 00:43:14 2002
+++ linux-2.5.2-pre6.early-dmi-scan/arch/i386/kernel/setup.c Wed Jan 2 00:57:49 2002
@@ -155,6 +155,7 @@
unsigned char aux_device_present;
extern void mcheck_init(struct cpuinfo_x86 *c);
+extern void dmi_scan_machine(void);
extern int root_mountflags;
extern char _text, _etext, _edata, _end;
extern int blk_nohighio;
@@ -921,6 +922,7 @@
conswitchp = &dummy_con;
#endif
#endif
+ dmi_scan_machine();
}
static int cachesize_override __initdata = -1;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-01-02 19:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-02 19:09 [PATCH] DMI/APIC updates 3 of 4: early-dmi-scan Mikael Pettersson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®