2.6.7-rc1-mm1, Port ACPI sleep quirk to new DMI probing
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 9/13 2.6.7-rc1-mm1, Port reboot related quirks to new DMI probing
arch/i386/kernel/dmi_scan.c +1 -58
@@ -155,51 +155,6 @@ static void __init dmi_save_ident(structprintk (KERN_ERR "dmi_save_ident: out of memory.\n" ); } -/* -* Reboot options and system auto-detection code provided by -* Dell Inc. so their systems "just work". :-) -*/ - -/* -* Some machines require the "reboot=b" commandline option, this quirk makes that automatic. -*/ -static __init int set_bios_reboot (struct dmi_system_id *d) -{ -extern int reboot_thru_bios; -if (reboot_thru_bios ==0 ) - { - reboot_thru_bios =1 ; -printk (KERN_INFO "%s series board detected. Selecting BIOS-method for reboots.\n" , d->ident); - } -return 0 ; -} - -/* -* Some machines require the "reboot=s" commandline option, this quirk makes that automatic. -*/ -static __init int set_smp_reboot (struct dmi_system_id *d) -{ -#ifdef CONFIG_SMP -extern int reboot_smp; -if (reboot_smp ==0 ) - { - reboot_smp =1 ; -printk (KERN_INFO "%s series board detected. Selecting SMP-method for reboots.\n" , d->ident); - } -#endif -return 0 ; -} - -/* -* Some machines require the "reboot=b,s" commandline option, this quirk makes that automatic. -*/ -static __init int set_smp_bios_reboot (struct dmi_system_id *d) -{ -set_smp_reboot (d); -set_bios_reboot (d); -return 0 ; -} -/* * Some machines, usually laptops, can't handle an enabled local APIC. * The symptoms include hangs or reboots when suspending or resuming,
@@ -316,19 +271,7 @@ static __init int disable_acpi_pci(struc*/ static __initdata struct dmi_system_id dmi_blacklist[]={ - { set_smp_bios_reboot,"Dell PowerEdge 1300" , {/* Handle problems with rebooting on Dell 1300's */ -DMI_MATCH (DMI_SYS_VENDOR ,"Dell Computer Corporation" ), -DMI_MATCH (DMI_PRODUCT_NAME ,"PowerEdge 1300/" ), - } }, - { set_bios_reboot,"Dell PowerEdge 300" , {/* Handle problems with rebooting on Dell 300's */ -DMI_MATCH (DMI_SYS_VENDOR ,"Dell Computer Corporation" ), -DMI_MATCH (DMI_PRODUCT_NAME ,"PowerEdge 300/" ), - } }, - { set_bios_reboot,"Dell PowerEdge 2400" , {/* Handle problems with rebooting on Dell 2400's */ -DMI_MATCH (DMI_SYS_VENDOR ,"Dell Computer Corporation" ), -DMI_MATCH (DMI_PRODUCT_NAME ,"PowerEdge 2400" ), - } }, - +/* Machines which have problems handling enabled local APICs */ { local_apic_kills_bios,"Dell Inspiron" , {
arch/i386/kernel/reboot.c +78 -0
90 lines not on this page · raw message
PATCH 10/13 2.6.7-rc1-mm1, Port powernow-k7 driver to new DMI probing
arch/i386/kernel/cpu/cpufreq/powernow-k7.c +27 -1
@@ -22,6 +22,7 @@#include <linux/cpufreq.h> #include <linux/slab.h> #include <linux/string.h> +#include <linux/dmi.h> #include <asm/msr.h> #include <asm/timex.h>
@@ -554,6 +555,31 @@ static unsigned int powernow_get(unsigne } +static int __init acer_cpufreq_pst (struct dmi_system_id *d) +{ +printk (KERN_WARNING "%s laptop with broken PST tables in BIOS detected.\n" , d->ident); +printk (KERN_WARNING "You need to downgrade to 3A21 (09/09/2002), or try a newer BIOS than 3A71 (01/20/2003)\n" ); +printk (KERN_WARNING "cpufreq scaling has been disabled as a result of this.\n" ); +return 0 ; +} + +/* +* Some Athlon laptops have really fucked PST tables. +* A BIOS update is all that can save them. +* Mention this, and disable cpufreq. +*/ +static struct dmi_system_id __initdata powernow_dmi_table[] = { + { + .callback = acer_cpufreq_pst, + .ident ="Acer Aspire" , + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Insyde Software" ), +DMI_MATCH (DMI_BIOS_VERSION ,"3A71" ), + }, + }, + { } +}; +static int __init powernow_cpu_init (struct cpufreq_policy *policy) {union msr_fidvidstatus fidvidstatus;
@@ -572,7 +598,7 @@ static int __init powernow_cpu_init (str } dprintk(KERN_INFO PFX "FSB: %3d.%03d MHz\n", fsb/1000, fsb%1000); -if ((dmi_broken &BROKEN_CPUFREQ ) || powernow_acpi_force) { +if (dmi_check_system (powernow_dmi_table) || powernow_acpi_force) { printk (KERN_INFO PFX "PSB/PST known to be broken. Trying ACPI instead\n"); result =powernow_acpi_init (); }else {
arch/i386/kernel/dmi_scan.c +0 -20
@@ -235,16 +235,6 @@ static __init int reset_videomode_after_#endif -static __init int acer_cpufreq_pst (struct dmi_system_id *d) -{ -printk (KERN_WARNING "%s laptop with broken PST tables in BIOS detected.\n" , d->ident); -printk (KERN_WARNING "You need to downgrade to 3A21 (09/09/2002), or try a newer BIOS than 3A71 (01/20/2003)\n" ); -printk (KERN_WARNING "cpufreq scaling has been disabled as a result of this.\n" ); - dmi_broken |=BROKEN_CPUFREQ ; -return 0 ; -} - -#ifdef CONFIG_ACPI_PCI static __init int disable_acpi_irq (struct dmi_system_id *d) {
@@ -310,16 +300,6 @@ static __initdata struct dmi_system_id d DMI_MATCH(DMI_PRODUCT_NAME, "S4030CDT/4.3"), } },#endif - -/* -* Some Athlon laptops have really fucked PST tables. -* A BIOS update is all that can save them. -* Mention this, and disable cpufreq. -*/ - { acer_cpufreq_pst, "Acer Aspire", { -DMI_MATCH (DMI_SYS_VENDOR ,"Insyde Software" ), -DMI_MATCH (DMI_BIOS_VERSION ,"3A71" ), - } },#ifdef CONFIG_SERIO_I8042 { set_8042_nomux, "Compaq Proliant 8500", {
PATCH 11/13 2.6.7-rc1-mm1, Port local APIC quirks to new DMI probing
arch/i386/kernel/apic.c +58 -0
@@ -26,6 +26,7 @@#include <linux/mc146818rtc.h> #include <linux/kernel_stat.h> #include <linux/sysdev.h> +#include <linux/dmi.h> #include <asm/atomic.h> #include <asm/smp.h>
@@ -624,11 +625,66 @@ static int __init lapic_enable(char *str }__setup ("lapic" , lapic_enable); +/* +* Some machines, usually laptops, can't handle an enabled local APIC. +* The symptoms include hangs or reboots when suspending or resuming, +* attaching or detaching the power cord, or entering BIOS setup screens +* through magic key sequences. +*/ +static int __init local_apic_kills_bios (struct dmi_system_id *d) +{ +if (enable_local_apic ==0 ) { + enable_local_apic =-1 ; +printk (KERN_WARNING "%s with broken BIOS detected. " +"Refusing to enable the local APIC.\n" , + d->ident); + } +return 0 ; +} + +static struct dmi_system_id __initdata apic_dmi_table[] = { + { + .callback = local_apic_kills_bios, + .ident ="Dell Inspiron" , + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Dell Computer Corporation" ), +DMI_MATCH (DMI_PRODUCT_NAME ,"Inspiron" ), + }, + }, + { + .callback = local_apic_kills_bios, + .ident ="Dell Latitude" , + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Dell Computer Corporation" ), +DMI_MATCH (DMI_PRODUCT_NAME ,"Latitude" ), + }, + }, + { + .callback = local_apic_kills_bios, + .ident ="IBM Thinkpad T20" , + .matches = { +DMI_MATCH (DMI_BOARD_VENDOR ,"IBM" ), +DMI_MATCH (DMI_BOARD_NAME ,"264741U" ), + }, + }, + { + .callback = local_apic_kills_bios, + .ident ="ASUS L3C" , + .matches = { +DMI_MATCH (DMI_BOARD_VENDOR ,"ASUSTeK Computer INC." ), +DMI_MATCH (DMI_BOARD_NAME ,"P4_L3C" ), + }, + }, + { } +}; +static int __init detect_init_APIC (void ) {u32 h, l, features;extern void get_cpu_vendor (struct cpuinfo_x86 *); +dmi_check_system (apic_dmi_table); +/* Disabled by DMI scan or kernel option? */ if (enable_local_apic <0 )return -1 ;
@@ -1159,6 +1215,8 @@ asmlinkage void smp_error_interrupt(void*/ int __init APIC_init_uniprocessor (void ) { +dmi_check_system (apic_dmi_table); +if (enable_local_apic <0 )clear_bit (X86_FEATURE_APIC , boot_cpu_data.x86_capability);
arch/i386/kernel/dmi_scan.c +0 -42
54 lines not on this page · raw message
PATCH 12/13 2.6.7-rc1-mm1, Port ACPI sleep quirk to new DMI probing
arch/i386/kernel/dmi_scan.c +0 -14
@@ -193,17 +193,6 @@ static __init int broken_toshiba_keyboarreturn 0 ; } -/* -* Toshiba fails to preserve interrupts over S1 -*/ - -static __init int init_ints_after_s1 (struct dmi_system_id *d) -{ -printk (KERN_WARNING "Toshiba with broken S1 detected.\n" ); - dmi_broken |=BROKEN_INIT_AFTER_S1 ; -return 0 ; -} -#ifdef CONFIG_ACPI_SLEEP static __init int reset_videomode_after_s3 (struct dmi_system_id *d) {
@@ -248,9 +237,6 @@ static __initdata struct dmi_system_id d } }, { broken_toshiba_keyboard, "Toshiba Satellite 4030cdt", { /* Keyboard generates spurious repeats */ -DMI_MATCH (DMI_PRODUCT_NAME ,"S4030CDT/4.3" ), - } }, - { init_ints_after_s1, "Toshiba Satellite 4030cdt", { /* Reinitialization of 8259 is needed after S1 resume */DMI_MATCH (DMI_PRODUCT_NAME ,"S4030CDT/4.3" ), } }, #ifdef CONFIG_ACPI_SLEEP
drivers/acpi/sleep/main.c +27 -2
@@ -10,6 +10,7 @@#include <linux/delay.h> #include <linux/irq.h> +#include <linux/dmi.h> #include <linux/device.h> #include <linux/suspend.h> #include <acpi/acpi_bus.h>
@@ -30,6 +31,8 @@ static u32 acpi_suspend_states[] = { [PM_SUSPEND_DISK] = ACPI_STATE_S4, }; +static int init_8259A_after_S1; +/** * acpi_pm_prepare - Do preliminary suspend work. * @state: suspend state we're entering.
@@ -138,7 +141,7 @@ static int acpi_pm_finish(u32 state)/* reset firmware waking vector */ acpi_set_firmware_waking_vector ((acpi_physical_address )0 ); -if (dmi_broken &BROKEN_INIT_AFTER_S1 ) { +if (init_8259A_after_S1) {printk ("Broken toshiba laptop -> kicking interrupts\n" );init_8259A (0 ); }
@@ -159,16 +162,38 @@ int acpi_suspend(u32 acpi_state)return -EINVAL ; } -static struct pm_ops acpi_pm_ops = { .prepare = acpi_pm_prepare, .enter = acpi_pm_enter, .finish = acpi_pm_finish, }; + +/* +* Toshiba fails to preserve interrupts over S1, reinitialization +* of 8259 is needed after S1 resume. +*/ +static int __init init_ints_after_s1 (struct dmi_system_id *d) +{ +printk (KERN_WARNING "%s with broken S1 detected.\n" , d->ident); + init_8259A_after_S1 =1 ; +return 0 ; +} + +static struct dmi_system_id __initdata acpisleep_dmi_table[] = { + { + .callback = init_ints_after_s1, + .ident ="Toshiba Satellite 4030cdt" , + .matches = {DMI_MATCH (DMI_PRODUCT_NAME ,"S4030CDT/4.3" ), }, + }, + { }, +}; +static int __init acpi_sleep_init (void ) {int i =0 ; + +dmi_check_system (acpisleep_dmi_table);if (acpi_disabled)return 0 ;
PATCH 13/13 2.6.7-rc1-mm1, Port i8042 quirk to new DMI probing
arch/i386/kernel/dmi_scan.c +0 -24
@@ -155,22 +155,6 @@ static void __init dmi_save_ident(structprintk (KERN_ERR "dmi_save_ident: out of memory.\n" ); } -/* -* HP Proliant 8500 systems can't use i8042 in mux mode, -* or they instantly reboot. -*/ -#ifdef CONFIG_SERIO_I8042 -extern unsigned int i8042_nomux; -static __init int set_8042_nomux (struct dmi_system_id *d) -{ -if (i8042_nomux ==0 ) - { - i8042_nomux =1 ; -printk (KERN_INFO "Disabling i8042 mux mode\n" ); - } -return 0 ; -} -#endif /* * ASUS K7V-RM has broken ACPI table defining sleep modes
@@ -243,14 +227,6 @@ static __initdata struct dmi_system_id d { reset_videomode_after_s3, "Toshiba Satellite 4030cdt", { /* Reset video mode after returning from ACPI S3 sleep */ DMI_MATCH(DMI_PRODUCT_NAME, "S4030CDT/4.3"), } }, -#endif - -#ifdef CONFIG_SERIO_I8042 - { set_8042_nomux, "Compaq Proliant 8500", { - DMI_MATCH(DMI_SYS_VENDOR, "Compaq"), - DMI_MATCH(DMI_PRODUCT_NAME , "ProLiant"), - DMI_MATCH(DMI_PRODUCT_VERSION, "8500"), - }}, #endif #ifdef CONFIG_ACPI_PCI
drivers/input/serio/i8042.c +30 -1
@@ -21,6 +21,7 @@#include <linux/sysdev.h> #include <linux/pm.h> #include <linux/serio.h> +#include <linux/dmi.h> #include <asm/io.h>
@@ -32,7 +33,7 @@ static unsigned int i8042_noaux;module_param_named (noaux, i8042_noaux, bool,0 );MODULE_PARM_DESC (noaux,"Do not probe or use AUX (mouse) port." ); -unsigned int i8042_nomux; +static unsigned int i8042_nomux;module_param_named (nomux, i8042_nomux, bool,0 );MODULE_PARM_DESC (nomux,"Do not check whether an active multiplexing conrtoller is present." );
@@ -943,11 +944,39 @@ static void __init i8042_init_mux_values values->mux = index; } +/* +* HP Proliant 8500 systems can't use i8042 in mux mode, +* or they instantly reboot. +*/ +static int __init set_8042_nomux (struct dmi_system_id *d) +{ +if (!i8042_nomux) { + i8042_nomux =1 ; +printk (KERN_INFO "Disabling i8042 mux mode\n" ); + } +return 0 ; +} + +static struct dmi_system_id __initdata i8042_dmi_table[] = { + { + .callback = set_8042_nomux, + .ident ="Compaq Proliant 8500" , + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Compaq" ), +DMI_MATCH (DMI_PRODUCT_NAME ,"ProLiant" ), +DMI_MATCH (DMI_PRODUCT_VERSION ,"8500" ), + }, + }, + { }, +}; +int __init i8042_init (void ) {int i;dbg_init (); + +dmi_check_system (i8042_dmi_table);init_timer (&i8042_timer); i8042_timer.function = i8042_timer_func;