diff options
| author | Len Brown <len.brown@intel.com> | 2004-10-18 08:28:17 -0400 |
|---|---|---|
| committer | Len Brown <lenb@dhcppc3.> | 2004-10-18 08:28:17 -0400 |
| commit | ecb18428f452b525f995b218bc07e76cfe268664 (patch) | |
| tree | 0d70cfbde602e45d4cc7ed8dc8ce4636343e9faa /drivers/acpi/processor.c | |
| parent | 0c7b8d699fc1e1327f6bb6fb4ca29dcf7473d924 (diff) | |
[ACPI] add module parameters: processor.c2=[0,1] processor.c3=[0,1]
to disable/enable C2 or C3
blacklist entries for R40e and Medion 41700
http://bugme.osdl.org/show_bug.cgi?id=3549
from Andi Kleen
Diffstat (limited to 'drivers/acpi/processor.c')
| -rw-r--r-- | drivers/acpi/processor.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/drivers/acpi/processor.c b/drivers/acpi/processor.c index 4eb50f4b0e9b..401f45124eb2 100644 --- a/drivers/acpi/processor.c +++ b/drivers/acpi/processor.c @@ -39,6 +39,8 @@ #include <linux/cpufreq.h> #include <linux/proc_fs.h> #include <linux/seq_file.h> +#include <linux/dmi.h> +#include <linux/moduleparam.h> #include <asm/io.h> #include <asm/system.h> @@ -99,6 +101,8 @@ static struct acpi_driver acpi_processor_driver = { }, }; +static int c2 = -1; +static int c3 = -1; struct acpi_processor_errata { u8 smp; @@ -140,6 +144,8 @@ static struct file_operations acpi_processor_limit_fops = { static struct acpi_processor *processors[NR_CPUS]; static struct acpi_processor_errata errata; +module_param_named(c2, c2, bool, 0); +module_param_named(c3, c3, bool, 0); static void (*pm_idle_save)(void); @@ -651,6 +657,11 @@ acpi_processor_get_power_info ( else if (errata.smp) ACPI_DEBUG_PRINT((ACPI_DB_INFO, "C2 not supported in SMP mode\n")); + + + else if (!c2) + printk(KERN_INFO "C2 disabled\n"); + /* * Otherwise we've met all of our C2 requirements. * Normalize the C2 latency to expidite policy. @@ -706,6 +717,9 @@ acpi_processor_get_power_info ( ACPI_DEBUG_PRINT((ACPI_DB_INFO, "C3 not supported on PIIX4 with Type-F DMA\n")); } + else if (!c3) + printk(KERN_INFO "C3 disabled\n"); + /* * Otherwise we've met all of our C3 requirements. * Normalize the C2 latency to expidite policy. Enable @@ -2438,6 +2452,29 @@ acpi_processor_remove ( return_VALUE(0); } +/* IBM ThinkPad R40e crashes mysteriously when going into C2 or C3. + For now disable this. Probably a bug somewhere else. */ +static int no_c2c3(struct dmi_system_id *id) +{ + printk(KERN_INFO + "%s detected - C2,C3 disabled. Overwrite with \"processor.c2=1 processor.c3=1\n\"", + id->ident); + if (c2 == -1) + c2 = 0; + if (c3 == -1) + c3 = 0; + return 0; +} + +static struct dmi_system_id __initdata processor_dmi_table[] = { + { no_c2c3, "IBM ThinkPad R40e", { + DMI_MATCH(DMI_BIOS_VENDOR,"IBM"), + DMI_MATCH(DMI_BIOS_VERSION,"1SET60WW") }}, + { no_c2c3, "Medion 41700", { + DMI_MATCH(DMI_BIOS_VENDOR,"Phoenix Technologies LTD"), + DMI_MATCH(DMI_BIOS_VERSION,"R01-A1J") }}, + {}, +}; static int __init acpi_processor_init (void) @@ -2464,6 +2501,8 @@ acpi_processor_init (void) acpi_processor_ppc_init(); + dmi_check_system(processor_dmi_table); + return_VALUE(0); } |
