Commit ecb18428 authored by Len Brown's avatar Len Brown Committed by Len Brown

[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
parent 0c7b8d69
......@@ -903,6 +903,11 @@ running once the system is up.
profile= [KNL] Enable kernel profiling via /proc/profile
(param: profile step/bucket size as a power of 2)
processor.c2= [HW, ACPI]
processor.c3= [HW, ACPI]
0 - disable C2 or C3 idle power saving state.
1 - enable C2 or C3 (default unless DMI blacklist entry)
prompt_ramdisk= [RAM] List of RAM disks to prompt for floppy disk
before loading.
See Documentation/ramdisk.txt.
......
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment