diff options
-rw-r--r-- | Documentation/00-INDEX | 2 | ||||
-rw-r--r-- | Documentation/cpuidle/core.txt | 23 | ||||
-rw-r--r-- | Documentation/cpuidle/driver.txt | 31 | ||||
-rw-r--r-- | Documentation/cpuidle/governor.txt | 29 | ||||
-rw-r--r-- | Documentation/cpuidle/sysfs.txt | 79 | ||||
-rw-r--r-- | arch/x86/kernel/acpi/cstate.c | 2 | ||||
-rw-r--r-- | drivers/acpi/blacklist.c | 64 | ||||
-rw-r--r-- | drivers/acpi/event.c | 2 | ||||
-rw-r--r-- | drivers/acpi/hardware/hwsleep.c | 1 | ||||
-rw-r--r-- | drivers/acpi/osl.c | 6 | ||||
-rw-r--r-- | drivers/acpi/processor_idle.c | 19 | ||||
-rw-r--r-- | drivers/cpuidle/cpuidle.c | 3 | ||||
-rw-r--r-- | drivers/cpuidle/sysfs.c | 14 | ||||
-rw-r--r-- | drivers/misc/thinkpad_acpi.c | 4 | ||||
-rw-r--r-- | drivers/pnp/pnpacpi/core.c | 2 | ||||
-rw-r--r-- | include/acpi/processor.h | 9 | ||||
-rw-r--r-- | include/linux/acpi.h | 1 | ||||
-rw-r--r-- | include/linux/cpuidle.h | 2 |
18 files changed, 271 insertions, 22 deletions
diff --git a/Documentation/00-INDEX b/Documentation/00-INDEX index 8d556707bb68..30b327a116ea 100644 --- a/Documentation/00-INDEX +++ b/Documentation/00-INDEX | |||
@@ -109,6 +109,8 @@ cpu-hotplug.txt | |||
109 | - document describing CPU hotplug support in the Linux kernel. | 109 | - document describing CPU hotplug support in the Linux kernel. |
110 | cpu-load.txt | 110 | cpu-load.txt |
111 | - document describing how CPU load statistics are collected. | 111 | - document describing how CPU load statistics are collected. |
112 | cpuidle/ | ||
113 | - info on CPU_IDLE, CPU idle state management subsystem. | ||
112 | cpusets.txt | 114 | cpusets.txt |
113 | - documents the cpusets feature; assign CPUs and Mem to a set of tasks. | 115 | - documents the cpusets feature; assign CPUs and Mem to a set of tasks. |
114 | cputopology.txt | 116 | cputopology.txt |
diff --git a/Documentation/cpuidle/core.txt b/Documentation/cpuidle/core.txt new file mode 100644 index 000000000000..63ecc5dc9d8a --- /dev/null +++ b/Documentation/cpuidle/core.txt | |||
@@ -0,0 +1,23 @@ | |||
1 | |||
2 | Supporting multiple CPU idle levels in kernel | ||
3 | |||
4 | cpuidle | ||
5 | |||
6 | General Information: | ||
7 | |||
8 | Various CPUs today support multiple idle levels that are differentiated | ||
9 | by varying exit latencies and power consumption during idle. | ||
10 | cpuidle is a generic in-kernel infrastructure that separates | ||
11 | idle policy (governor) from idle mechanism (driver) and provides a | ||
12 | standardized infrastructure to support independent development of | ||
13 | governors and drivers. | ||
14 | |||
15 | cpuidle resides under drivers/cpuidle. | ||
16 | |||
17 | Boot options: | ||
18 | "cpuidle_sysfs_switch" | ||
19 | enables current_governor interface in /sys/devices/system/cpu/cpuidle/, | ||
20 | which can be used to switch governors at run time. This boot option | ||
21 | is meant for developer testing only. In normal usage, kernel picks the | ||
22 | best governor based on governor ratings. | ||
23 | SEE ALSO: sysfs.txt in this directory. | ||
diff --git a/Documentation/cpuidle/driver.txt b/Documentation/cpuidle/driver.txt new file mode 100644 index 000000000000..7a9e09ece931 --- /dev/null +++ b/Documentation/cpuidle/driver.txt | |||
@@ -0,0 +1,31 @@ | |||
1 | |||
2 | |||
3 | Supporting multiple CPU idle levels in kernel | ||
4 | |||
5 | cpuidle drivers | ||
6 | |||
7 | |||
8 | |||
9 | |||
10 | cpuidle driver hooks into the cpuidle infrastructure and handles the | ||
11 | architecture/platform dependent part of CPU idle states. Driver | ||
12 | provides the platform idle state detection capability and also | ||
13 | has mechanisms in place to support actual entry-exit into CPU idle states. | ||
14 | |||
15 | cpuidle driver initializes the cpuidle_device structure for each CPU device | ||
16 | and registers with cpuidle using cpuidle_register_device. | ||
17 | |||
18 | It can also support the dynamic changes (like battery <-> AC), by using | ||
19 | cpuidle_pause_and_lock, cpuidle_disable_device and cpuidle_enable_device, | ||
20 | cpuidle_resume_and_unlock. | ||
21 | |||
22 | Interfaces: | ||
23 | extern int cpuidle_register_driver(struct cpuidle_driver *drv); | ||
24 | extern void cpuidle_unregister_driver(struct cpuidle_driver *drv); | ||
25 | extern int cpuidle_register_device(struct cpuidle_device *dev); | ||
26 | extern void cpuidle_unregister_device(struct cpuidle_device *dev); | ||
27 | |||
28 | extern void cpuidle_pause_and_lock(void); | ||
29 | extern void cpuidle_resume_and_unlock(void); | ||
30 | extern int cpuidle_enable_device(struct cpuidle_device *dev); | ||
31 | extern void cpuidle_disable_device(struct cpuidle_device *dev); | ||
diff --git a/Documentation/cpuidle/governor.txt b/Documentation/cpuidle/governor.txt new file mode 100644 index 000000000000..12c6bd50c9f6 --- /dev/null +++ b/Documentation/cpuidle/governor.txt | |||
@@ -0,0 +1,29 @@ | |||
1 | |||
2 | |||
3 | |||
4 | Supporting multiple CPU idle levels in kernel | ||
5 | |||
6 | cpuidle governors | ||
7 | |||
8 | |||
9 | |||
10 | |||
11 | cpuidle governor is policy routine that decides what idle state to enter at | ||
12 | any given time. cpuidle core uses different callbacks to the governor. | ||
13 | |||
14 | * enable() to enable governor for a particular device | ||
15 | * disable() to disable governor for a particular device | ||
16 | * select() to select an idle state to enter | ||
17 | * reflect() called after returning from the idle state, which can be used | ||
18 | by the governor for some record keeping. | ||
19 | |||
20 | More than one governor can be registered at the same time and | ||
21 | users can switch between drivers using /sysfs interface (when enabled). | ||
22 | More than one governor part is supported for developers to easily experiment | ||
23 | with different governors. By default, most optimal governor based on your | ||
24 | kernel configuration and platform will be selected by cpuidle. | ||
25 | |||
26 | Interfaces: | ||
27 | extern int cpuidle_register_governor(struct cpuidle_governor *gov); | ||
28 | extern void cpuidle_unregister_governor(struct cpuidle_governor *gov); | ||
29 | struct cpuidle_governor | ||
diff --git a/Documentation/cpuidle/sysfs.txt b/Documentation/cpuidle/sysfs.txt new file mode 100644 index 000000000000..50d7b1642759 --- /dev/null +++ b/Documentation/cpuidle/sysfs.txt | |||
@@ -0,0 +1,79 @@ | |||
1 | |||
2 | |||
3 | Supporting multiple CPU idle levels in kernel | ||
4 | |||
5 | cpuidle sysfs | ||
6 | |||
7 | System global cpuidle related information and tunables are under | ||
8 | /sys/devices/system/cpu/cpuidle | ||
9 | |||
10 | The current interfaces in this directory has self-explanatory names: | ||
11 | * current_driver | ||
12 | * current_governor_ro | ||
13 | |||
14 | With cpuidle_sysfs_switch boot option (meant for developer testing) | ||
15 | following objects are visible instead. | ||
16 | * current_driver | ||
17 | * available_governors | ||
18 | * current_governor | ||
19 | In this case users can switch the governor at run time by writing | ||
20 | to current_governor. | ||
21 | |||
22 | |||
23 | Per logical CPU specific cpuidle information are under | ||
24 | /sys/devices/system/cpu/cpuX/cpuidle | ||
25 | for each online cpu X | ||
26 | |||
27 | -------------------------------------------------------------------------------- | ||
28 | # ls -lR /sys/devices/system/cpu/cpu0/cpuidle/ | ||
29 | /sys/devices/system/cpu/cpu0/cpuidle/: | ||
30 | total 0 | ||
31 | drwxr-xr-x 2 root root 0 Feb 8 10:42 state0 | ||
32 | drwxr-xr-x 2 root root 0 Feb 8 10:42 state1 | ||
33 | drwxr-xr-x 2 root root 0 Feb 8 10:42 state2 | ||
34 | drwxr-xr-x 2 root root 0 Feb 8 10:42 state3 | ||
35 | |||
36 | /sys/devices/system/cpu/cpu0/cpuidle/state0: | ||
37 | total 0 | ||
38 | -r--r--r-- 1 root root 4096 Feb 8 10:42 desc | ||
39 | -r--r--r-- 1 root root 4096 Feb 8 10:42 latency | ||
40 | -r--r--r-- 1 root root 4096 Feb 8 10:42 name | ||
41 | -r--r--r-- 1 root root 4096 Feb 8 10:42 power | ||
42 | -r--r--r-- 1 root root 4096 Feb 8 10:42 time | ||
43 | -r--r--r-- 1 root root 4096 Feb 8 10:42 usage | ||
44 | |||
45 | /sys/devices/system/cpu/cpu0/cpuidle/state1: | ||
46 | total 0 | ||
47 | -r--r--r-- 1 root root 4096 Feb 8 10:42 desc | ||
48 | -r--r--r-- 1 root root 4096 Feb 8 10:42 latency | ||
49 | -r--r--r-- 1 root root 4096 Feb 8 10:42 name | ||
50 | -r--r--r-- 1 root root 4096 Feb 8 10:42 power | ||
51 | -r--r--r-- 1 root root 4096 Feb 8 10:42 time | ||
52 | -r--r--r-- 1 root root 4096 Feb 8 10:42 usage | ||
53 | |||
54 | /sys/devices/system/cpu/cpu0/cpuidle/state2: | ||
55 | total 0 | ||
56 | -r--r--r-- 1 root root 4096 Feb 8 10:42 desc | ||
57 | -r--r--r-- 1 root root 4096 Feb 8 10:42 latency | ||
58 | -r--r--r-- 1 root root 4096 Feb 8 10:42 name | ||
59 | -r--r--r-- 1 root root 4096 Feb 8 10:42 power | ||
60 | -r--r--r-- 1 root root 4096 Feb 8 10:42 time | ||
61 | -r--r--r-- 1 root root 4096 Feb 8 10:42 usage | ||
62 | |||
63 | /sys/devices/system/cpu/cpu0/cpuidle/state3: | ||
64 | total 0 | ||
65 | -r--r--r-- 1 root root 4096 Feb 8 10:42 desc | ||
66 | -r--r--r-- 1 root root 4096 Feb 8 10:42 latency | ||
67 | -r--r--r-- 1 root root 4096 Feb 8 10:42 name | ||
68 | -r--r--r-- 1 root root 4096 Feb 8 10:42 power | ||
69 | -r--r--r-- 1 root root 4096 Feb 8 10:42 time | ||
70 | -r--r--r-- 1 root root 4096 Feb 8 10:42 usage | ||
71 | -------------------------------------------------------------------------------- | ||
72 | |||
73 | |||
74 | * desc : Small description about the idle state (string) | ||
75 | * latency : Latency to exit out of this idle state (in microseconds) | ||
76 | * name : Name of the idle state (string) | ||
77 | * power : Power consumed while in this idle state (in milliwatts) | ||
78 | * time : Total time spent in this idle state (in microseconds) | ||
79 | * usage : Number of times this state was entered (count) | ||
diff --git a/arch/x86/kernel/acpi/cstate.c b/arch/x86/kernel/acpi/cstate.c index 10b67170b133..8ca3557a6d59 100644 --- a/arch/x86/kernel/acpi/cstate.c +++ b/arch/x86/kernel/acpi/cstate.c | |||
@@ -126,6 +126,8 @@ int acpi_processor_ffh_cstate_probe(unsigned int cpu, | |||
126 | printk(KERN_DEBUG "Monitor-Mwait will be used to enter C-%d " | 126 | printk(KERN_DEBUG "Monitor-Mwait will be used to enter C-%d " |
127 | "state\n", cx->type); | 127 | "state\n", cx->type); |
128 | } | 128 | } |
129 | snprintf(cx->desc, ACPI_CX_DESC_LEN, "ACPI FFH INTEL MWAIT 0x%x", | ||
130 | cx->address); | ||
129 | 131 | ||
130 | out: | 132 | out: |
131 | set_cpus_allowed(current, saved_mask); | 133 | set_cpus_allowed(current, saved_mask); |
diff --git a/drivers/acpi/blacklist.c b/drivers/acpi/blacklist.c index 9ce983ed60f0..ea92bac42c53 100644 --- a/drivers/acpi/blacklist.c +++ b/drivers/acpi/blacklist.c | |||
@@ -186,6 +186,12 @@ static int __init dmi_unknown_osi_linux(const struct dmi_system_id *d) | |||
186 | acpi_dmi_osi_linux(-1, d); /* unknown */ | 186 | acpi_dmi_osi_linux(-1, d); /* unknown */ |
187 | return 0; | 187 | return 0; |
188 | } | 188 | } |
189 | static int __init dmi_disable_osi_vista(const struct dmi_system_id *d) | ||
190 | { | ||
191 | printk(KERN_NOTICE PREFIX "DMI detected: %s\n", d->ident); | ||
192 | acpi_osi_setup("!Windows 2006"); | ||
193 | return 0; | ||
194 | } | ||
189 | 195 | ||
190 | /* | 196 | /* |
191 | * Most BIOS that invoke OSI(Linux) do nothing with it. | 197 | * Most BIOS that invoke OSI(Linux) do nothing with it. |
@@ -228,10 +234,10 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = { | |||
228 | * DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 5520"), | 234 | * DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 5520"), |
229 | * DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 6460"), | 235 | * DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 6460"), |
230 | * DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 7510"), | 236 | * DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 7510"), |
231 | * DMI_MATCH(DMI_PRODUCT_NAME, "Extensa 5220"), | ||
232 | * | 237 | * |
233 | * _OSI(Linux) is a NOP: | 238 | * _OSI(Linux) is a NOP: |
234 | * DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5315"), | 239 | * DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5315"), |
240 | * DMI_MATCH(DMI_PRODUCT_NAME, "Extensa 5220"), | ||
235 | */ | 241 | */ |
236 | { | 242 | { |
237 | .callback = dmi_disable_osi_linux, | 243 | .callback = dmi_disable_osi_linux, |
@@ -327,12 +333,20 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = { | |||
327 | }, | 333 | }, |
328 | { /* OSI(Linux) effect unknown */ | 334 | { /* OSI(Linux) effect unknown */ |
329 | .callback = dmi_unknown_osi_linux, | 335 | .callback = dmi_unknown_osi_linux, |
330 | .ident = "Dell OP GX620", | 336 | .ident = "Dell OptiPlex GX620", |
331 | .matches = { | 337 | .matches = { |
332 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), | 338 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), |
333 | DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex GX620"), | 339 | DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex GX620"), |
334 | }, | 340 | }, |
335 | }, | 341 | }, |
342 | { /* OSI(Linux) causes some USB initialization to not run */ | ||
343 | .callback = dmi_unknown_osi_linux, | ||
344 | .ident = "Dell OptiPlex 755", | ||
345 | .matches = { | ||
346 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), | ||
347 | DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 755"), | ||
348 | }, | ||
349 | }, | ||
336 | { /* OSI(Linux) effect unknown */ | 350 | { /* OSI(Linux) effect unknown */ |
337 | .callback = dmi_unknown_osi_linux, | 351 | .callback = dmi_unknown_osi_linux, |
338 | .ident = "Dell PE 1900", | 352 | .ident = "Dell PE 1900", |
@@ -342,6 +356,14 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = { | |||
342 | }, | 356 | }, |
343 | }, | 357 | }, |
344 | { /* OSI(Linux) is a NOP */ | 358 | { /* OSI(Linux) is a NOP */ |
359 | .callback = dmi_unknown_osi_linux, | ||
360 | .ident = "Dell PE 1950", | ||
361 | .matches = { | ||
362 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), | ||
363 | DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 1950"), | ||
364 | }, | ||
365 | }, | ||
366 | { /* OSI(Linux) is a NOP */ | ||
345 | .callback = dmi_disable_osi_linux, | 367 | .callback = dmi_disable_osi_linux, |
346 | .ident = "Dell PE R200", | 368 | .ident = "Dell PE R200", |
347 | .matches = { | 369 | .matches = { |
@@ -357,6 +379,22 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = { | |||
357 | DMI_MATCH(DMI_PRODUCT_NAME, "Precision WorkStation 390"), | 379 | DMI_MATCH(DMI_PRODUCT_NAME, "Precision WorkStation 390"), |
358 | }, | 380 | }, |
359 | }, | 381 | }, |
382 | { /* OSI(Linux) touches USB */ | ||
383 | .callback = dmi_unknown_osi_linux, | ||
384 | .ident = "Dell PR 390", | ||
385 | .matches = { | ||
386 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), | ||
387 | DMI_MATCH(DMI_PRODUCT_NAME, "Precision WorkStation 690"), | ||
388 | }, | ||
389 | }, | ||
390 | { /* OSI(Linux) unknown - ASL looks benign, but may effect dock/SMM */ | ||
391 | .callback = dmi_unknown_osi_linux, | ||
392 | .ident = "Dell PR M4300", | ||
393 | .matches = { | ||
394 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), | ||
395 | DMI_MATCH(DMI_PRODUCT_NAME, "Precision M4300"), | ||
396 | }, | ||
397 | }, | ||
360 | { /* OSI(Linux) is a NOP */ | 398 | { /* OSI(Linux) is a NOP */ |
361 | .callback = dmi_disable_osi_linux, | 399 | .callback = dmi_disable_osi_linux, |
362 | .ident = "Dell Vostro 1000", | 400 | .ident = "Dell Vostro 1000", |
@@ -390,10 +428,10 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = { | |||
390 | * DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Pi 1536"), | 428 | * DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Pi 1536"), |
391 | * DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Pi 1556"), | 429 | * DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Pi 1556"), |
392 | * DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Xi 1546"), | 430 | * DMI_MATCH(DMI_PRODUCT_NAME, "AMILO Xi 1546"), |
431 | * DMI_MATCH(DMI_PRODUCT_NAME, "ESPRIMO Mobile V5505"), | ||
393 | * _OSI(Linux) unknown effect: | 432 | * _OSI(Linux) unknown effect: |
394 | * DMI_MATCH(DMI_PRODUCT_NAME, "Amilo M1425"), | 433 | * DMI_MATCH(DMI_PRODUCT_NAME, "Amilo M1425"), |
395 | * DMI_MATCH(DMI_PRODUCT_NAME, "Amilo Si 1520"), | 434 | * DMI_MATCH(DMI_PRODUCT_NAME, "Amilo Si 1520"), |
396 | * DMI_MATCH(DMI_PRODUCT_NAME, "ESPRIMO Mobile V5505"), | ||
397 | */ | 435 | */ |
398 | { | 436 | { |
399 | .callback = dmi_disable_osi_linux, | 437 | .callback = dmi_disable_osi_linux, |
@@ -402,6 +440,14 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = { | |||
402 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), | 440 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), |
403 | }, | 441 | }, |
404 | }, | 442 | }, |
443 | { | ||
444 | .callback = dmi_disable_osi_vista, | ||
445 | .ident = "Fujitsu Siemens", | ||
446 | .matches = { | ||
447 | DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU SIEMENS"), | ||
448 | DMI_MATCH(DMI_PRODUCT_NAME, "ESPRIMO Mobile V5505"), | ||
449 | }, | ||
450 | }, | ||
405 | /* | 451 | /* |
406 | * Disable OSI(Linux) warnings on all "Hewlett-Packard" | 452 | * Disable OSI(Linux) warnings on all "Hewlett-Packard" |
407 | * | 453 | * |
@@ -443,10 +489,11 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = { | |||
443 | * _OSI(Linux) helps sound | 489 | * _OSI(Linux) helps sound |
444 | * DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad R61"), | 490 | * DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad R61"), |
445 | * DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T61"), | 491 | * DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T61"), |
492 | * _OSI(Linux) has Linux specific hooks | ||
493 | * DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X61"), | ||
446 | * _OSI(Linux) is a NOP: | 494 | * _OSI(Linux) is a NOP: |
447 | * DMI_MATCH(DMI_PRODUCT_VERSION, "3000 N100"), | 495 | * DMI_MATCH(DMI_PRODUCT_VERSION, "3000 N100"), |
448 | * _OSI(Linux) effect unknown | 496 | * DMI_MATCH(DMI_PRODUCT_VERSION, "LENOVO3000 V100"), |
449 | * DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X61"), | ||
450 | */ | 497 | */ |
451 | { | 498 | { |
452 | .callback = dmi_enable_osi_linux, | 499 | .callback = dmi_enable_osi_linux, |
@@ -465,7 +512,7 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = { | |||
465 | }, | 512 | }, |
466 | }, | 513 | }, |
467 | { | 514 | { |
468 | .callback = dmi_unknown_osi_linux, | 515 | .callback = dmi_enable_osi_linux, |
469 | .ident = "Lenovo ThinkPad X61", | 516 | .ident = "Lenovo ThinkPad X61", |
470 | .matches = { | 517 | .matches = { |
471 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), | 518 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), |
@@ -473,7 +520,7 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = { | |||
473 | }, | 520 | }, |
474 | }, | 521 | }, |
475 | { | 522 | { |
476 | .callback = dmi_unknown_osi_linux, | 523 | .callback = dmi_disable_osi_linux, |
477 | .ident = "Lenovo 3000 V100", | 524 | .ident = "Lenovo 3000 V100", |
478 | .matches = { | 525 | .matches = { |
479 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), | 526 | DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), |
@@ -543,8 +590,9 @@ static struct dmi_system_id acpi_osi_dmi_table[] __initdata = { | |||
543 | * Disable OSI(Linux) warnings on all "Sony Corporation" | 590 | * Disable OSI(Linux) warnings on all "Sony Corporation" |
544 | * | 591 | * |
545 | * _OSI(Linux) is a NOP: | 592 | * _OSI(Linux) is a NOP: |
546 | * DMI_MATCH(DMI_PRODUCT_NAME, "VGN-SZ650N"), | 593 | * DMI_MATCH(DMI_PRODUCT_NAME, "VGN-NR11S_S"), |
547 | * DMI_MATCH(DMI_PRODUCT_NAME, "VGN-SZ38GP_C"), | 594 | * DMI_MATCH(DMI_PRODUCT_NAME, "VGN-SZ38GP_C"), |
595 | * DMI_MATCH(DMI_PRODUCT_NAME, "VGN-SZ650N"), | ||
548 | * DMI_MATCH(DMI_PRODUCT_NAME, "VGN-TZ21MN_N"), | 596 | * DMI_MATCH(DMI_PRODUCT_NAME, "VGN-TZ21MN_N"), |
549 | * _OSI(Linux) unknown effect: | 597 | * _OSI(Linux) unknown effect: |
550 | * DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FZ11M"), | 598 | * DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FZ11M"), |
diff --git a/drivers/acpi/event.c b/drivers/acpi/event.c index 5479dc0eeeec..abec1ca94cf4 100644 --- a/drivers/acpi/event.c +++ b/drivers/acpi/event.c | |||
@@ -110,7 +110,7 @@ static const struct file_operations acpi_system_event_ops = { | |||
110 | #endif /* CONFIG_ACPI_PROC_EVENT */ | 110 | #endif /* CONFIG_ACPI_PROC_EVENT */ |
111 | 111 | ||
112 | /* ACPI notifier chain */ | 112 | /* ACPI notifier chain */ |
113 | BLOCKING_NOTIFIER_HEAD(acpi_chain_head); | 113 | static BLOCKING_NOTIFIER_HEAD(acpi_chain_head); |
114 | 114 | ||
115 | int acpi_notifier_call_chain(struct acpi_device *dev, u32 type, u32 data) | 115 | int acpi_notifier_call_chain(struct acpi_device *dev, u32 type, u32 data) |
116 | { | 116 | { |
diff --git a/drivers/acpi/hardware/hwsleep.c b/drivers/acpi/hardware/hwsleep.c index 058d0be5cbe2..4290e0193097 100644 --- a/drivers/acpi/hardware/hwsleep.c +++ b/drivers/acpi/hardware/hwsleep.c | |||
@@ -616,6 +616,7 @@ acpi_status acpi_leave_sleep_state(u8 sleep_state) | |||
616 | return_ACPI_STATUS(status); | 616 | return_ACPI_STATUS(status); |
617 | } | 617 | } |
618 | 618 | ||
619 | arg.integer.value = sleep_state; | ||
619 | status = acpi_evaluate_object(NULL, METHOD_NAME__WAK, &arg_list, NULL); | 620 | status = acpi_evaluate_object(NULL, METHOD_NAME__WAK, &arg_list, NULL); |
620 | if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { | 621 | if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { |
621 | ACPI_EXCEPTION((AE_INFO, status, "During Method _WAK")); | 622 | ACPI_EXCEPTION((AE_INFO, status, "During Method _WAK")); |
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 15e602377655..8edba7b678eb 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c | |||
@@ -325,7 +325,7 @@ acpi_os_predefined_override(const struct acpi_predefined_names *init_val, | |||
325 | } | 325 | } |
326 | 326 | ||
327 | #ifdef CONFIG_ACPI_CUSTOM_DSDT_INITRD | 327 | #ifdef CONFIG_ACPI_CUSTOM_DSDT_INITRD |
328 | struct acpi_table_header *acpi_find_dsdt_initrd(void) | 328 | static struct acpi_table_header *acpi_find_dsdt_initrd(void) |
329 | { | 329 | { |
330 | struct file *firmware_file; | 330 | struct file *firmware_file; |
331 | mm_segment_t oldfs; | 331 | mm_segment_t oldfs; |
@@ -419,7 +419,7 @@ acpi_os_table_override(struct acpi_table_header * existing_table, | |||
419 | } | 419 | } |
420 | 420 | ||
421 | #ifdef CONFIG_ACPI_CUSTOM_DSDT_INITRD | 421 | #ifdef CONFIG_ACPI_CUSTOM_DSDT_INITRD |
422 | int __init acpi_no_initrd_override_setup(char *s) | 422 | static int __init acpi_no_initrd_override_setup(char *s) |
423 | { | 423 | { |
424 | acpi_no_initrd_override = 1; | 424 | acpi_no_initrd_override = 1; |
425 | return 1; | 425 | return 1; |
@@ -1109,7 +1109,7 @@ void __init acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d) | |||
1109 | * string starting with '!' disables that string | 1109 | * string starting with '!' disables that string |
1110 | * otherwise string is added to list, augmenting built-in strings | 1110 | * otherwise string is added to list, augmenting built-in strings |
1111 | */ | 1111 | */ |
1112 | static int __init acpi_osi_setup(char *str) | 1112 | int __init acpi_osi_setup(char *str) |
1113 | { | 1113 | { |
1114 | if (str == NULL || *str == '\0') { | 1114 | if (str == NULL || *str == '\0') { |
1115 | printk(KERN_INFO PREFIX "_OSI method disabled\n"); | 1115 | printk(KERN_INFO PREFIX "_OSI method disabled\n"); |
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index 32003fdc91e8..980e1c33e6c5 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
@@ -945,11 +945,16 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr) | |||
945 | * Otherwise, ignore this info and continue. | 945 | * Otherwise, ignore this info and continue. |
946 | */ | 946 | */ |
947 | cx.entry_method = ACPI_CSTATE_HALT; | 947 | cx.entry_method = ACPI_CSTATE_HALT; |
948 | snprintf(cx.desc, ACPI_CX_DESC_LEN, "ACPI HLT"); | ||
948 | } else { | 949 | } else { |
949 | continue; | 950 | continue; |
950 | } | 951 | } |
952 | } else { | ||
953 | snprintf(cx.desc, ACPI_CX_DESC_LEN, "ACPI IOPORT 0x%x", | ||
954 | cx.address); | ||
951 | } | 955 | } |
952 | 956 | ||
957 | |||
953 | obj = &(element->package.elements[2]); | 958 | obj = &(element->package.elements[2]); |
954 | if (obj->type != ACPI_TYPE_INTEGER) | 959 | if (obj->type != ACPI_TYPE_INTEGER) |
955 | continue; | 960 | continue; |
@@ -1420,6 +1425,14 @@ static int acpi_idle_enter_c1(struct cpuidle_device *dev, | |||
1420 | return 0; | 1425 | return 0; |
1421 | 1426 | ||
1422 | local_irq_disable(); | 1427 | local_irq_disable(); |
1428 | |||
1429 | /* Do not access any ACPI IO ports in suspend path */ | ||
1430 | if (acpi_idle_suspend) { | ||
1431 | acpi_safe_halt(); | ||
1432 | local_irq_enable(); | ||
1433 | return 0; | ||
1434 | } | ||
1435 | |||
1423 | if (pr->flags.bm_check) | 1436 | if (pr->flags.bm_check) |
1424 | acpi_idle_update_bm_rld(pr, cx); | 1437 | acpi_idle_update_bm_rld(pr, cx); |
1425 | 1438 | ||
@@ -1643,6 +1656,11 @@ static int acpi_processor_setup_cpuidle(struct acpi_processor *pr) | |||
1643 | return -EINVAL; | 1656 | return -EINVAL; |
1644 | } | 1657 | } |
1645 | 1658 | ||
1659 | for (i = 0; i < CPUIDLE_STATE_MAX; i++) { | ||
1660 | dev->states[i].name[0] = '\0'; | ||
1661 | dev->states[i].desc[0] = '\0'; | ||
1662 | } | ||
1663 | |||
1646 | for (i = 1; i < ACPI_PROCESSOR_MAX_POWER && i <= max_cstate; i++) { | 1664 | for (i = 1; i < ACPI_PROCESSOR_MAX_POWER && i <= max_cstate; i++) { |
1647 | cx = &pr->power.states[i]; | 1665 | cx = &pr->power.states[i]; |
1648 | state = &dev->states[count]; | 1666 | state = &dev->states[count]; |
@@ -1659,6 +1677,7 @@ static int acpi_processor_setup_cpuidle(struct acpi_processor *pr) | |||
1659 | cpuidle_set_statedata(state, cx); | 1677 | cpuidle_set_statedata(state, cx); |
1660 | 1678 | ||
1661 | snprintf(state->name, CPUIDLE_NAME_LEN, "C%d", i); | 1679 | snprintf(state->name, CPUIDLE_NAME_LEN, "C%d", i); |
1680 | strncpy(state->desc, cx->desc, CPUIDLE_DESC_LEN); | ||
1662 | state->exit_latency = cx->latency; | 1681 | state->exit_latency = cx->latency; |
1663 | state->target_residency = cx->latency * latency_factor; | 1682 | state->target_residency = cx->latency * latency_factor; |
1664 | state->power_usage = cx->power; | 1683 | state->power_usage = cx->power; |
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index 60f71e6345e3..d73663a52324 100644 --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c | |||
@@ -219,7 +219,8 @@ static void poll_idle_init(struct cpuidle_device *dev) | |||
219 | 219 | ||
220 | cpuidle_set_statedata(state, NULL); | 220 | cpuidle_set_statedata(state, NULL); |
221 | 221 | ||
222 | snprintf(state->name, CPUIDLE_NAME_LEN, "C0 (poll idle)"); | 222 | snprintf(state->name, CPUIDLE_NAME_LEN, "C0"); |
223 | snprintf(state->desc, CPUIDLE_DESC_LEN, "CPUIDLE CORE POLL IDLE"); | ||
223 | state->exit_latency = 0; | 224 | state->exit_latency = 0; |
224 | state->target_residency = 0; | 225 | state->target_residency = 0; |
225 | state->power_usage = -1; | 226 | state->power_usage = -1; |
diff --git a/drivers/cpuidle/sysfs.c b/drivers/cpuidle/sysfs.c index 088ea74edd34..69102ca05685 100644 --- a/drivers/cpuidle/sysfs.c +++ b/drivers/cpuidle/sysfs.c | |||
@@ -218,16 +218,23 @@ static ssize_t show_state_##_name(struct cpuidle_state *state, char *buf) \ | |||
218 | return sprintf(buf, "%u\n", state->_name);\ | 218 | return sprintf(buf, "%u\n", state->_name);\ |
219 | } | 219 | } |
220 | 220 | ||
221 | static ssize_t show_state_name(struct cpuidle_state *state, char *buf) | 221 | #define define_show_state_str_function(_name) \ |
222 | { | 222 | static ssize_t show_state_##_name(struct cpuidle_state *state, char *buf) \ |
223 | return sprintf(buf, "%s\n", state->name); | 223 | { \ |
224 | if (state->_name[0] == '\0')\ | ||
225 | return sprintf(buf, "<null>\n");\ | ||
226 | return sprintf(buf, "%s\n", state->_name);\ | ||
224 | } | 227 | } |
225 | 228 | ||
226 | define_show_state_function(exit_latency) | 229 | define_show_state_function(exit_latency) |
227 | define_show_state_function(power_usage) | 230 | define_show_state_function(power_usage) |
228 | define_show_state_function(usage) | 231 | define_show_state_function(usage) |
229 | define_show_state_function(time) | 232 | define_show_state_function(time) |
233 | define_show_state_str_function(name) | ||
234 | define_show_state_str_function(desc) | ||
235 | |||
230 | define_one_state_ro(name, show_state_name); | 236 | define_one_state_ro(name, show_state_name); |
237 | define_one_state_ro(desc, show_state_desc); | ||
231 | define_one_state_ro(latency, show_state_exit_latency); | 238 | define_one_state_ro(latency, show_state_exit_latency); |
232 | define_one_state_ro(power, show_state_power_usage); | 239 | define_one_state_ro(power, show_state_power_usage); |
233 | define_one_state_ro(usage, show_state_usage); | 240 | define_one_state_ro(usage, show_state_usage); |
@@ -235,6 +242,7 @@ define_one_state_ro(time, show_state_time); | |||
235 | 242 | ||
236 | static struct attribute *cpuidle_state_default_attrs[] = { | 243 | static struct attribute *cpuidle_state_default_attrs[] = { |
237 | &attr_name.attr, | 244 | &attr_name.attr, |
245 | &attr_desc.attr, | ||
238 | &attr_latency.attr, | 246 | &attr_latency.attr, |
239 | &attr_power.attr, | 247 | &attr_power.attr, |
240 | &attr_usage.attr, | 248 | &attr_usage.attr, |
diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c index 7ba1acad5402..e2c7edd206a6 100644 --- a/drivers/misc/thinkpad_acpi.c +++ b/drivers/misc/thinkpad_acpi.c | |||
@@ -1689,7 +1689,7 @@ static ssize_t hotkey_wakeup_reason_show(struct device *dev, | |||
1689 | static struct device_attribute dev_attr_hotkey_wakeup_reason = | 1689 | static struct device_attribute dev_attr_hotkey_wakeup_reason = |
1690 | __ATTR(wakeup_reason, S_IRUGO, hotkey_wakeup_reason_show, NULL); | 1690 | __ATTR(wakeup_reason, S_IRUGO, hotkey_wakeup_reason_show, NULL); |
1691 | 1691 | ||
1692 | void hotkey_wakeup_reason_notify_change(void) | 1692 | static void hotkey_wakeup_reason_notify_change(void) |
1693 | { | 1693 | { |
1694 | if (tp_features.hotkey_mask) | 1694 | if (tp_features.hotkey_mask) |
1695 | sysfs_notify(&tpacpi_pdev->dev.kobj, NULL, | 1695 | sysfs_notify(&tpacpi_pdev->dev.kobj, NULL, |
@@ -1708,7 +1708,7 @@ static struct device_attribute dev_attr_hotkey_wakeup_hotunplug_complete = | |||
1708 | __ATTR(wakeup_hotunplug_complete, S_IRUGO, | 1708 | __ATTR(wakeup_hotunplug_complete, S_IRUGO, |
1709 | hotkey_wakeup_hotunplug_complete_show, NULL); | 1709 | hotkey_wakeup_hotunplug_complete_show, NULL); |
1710 | 1710 | ||
1711 | void hotkey_wakeup_hotunplug_complete_notify_change(void) | 1711 | static void hotkey_wakeup_hotunplug_complete_notify_change(void) |
1712 | { | 1712 | { |
1713 | if (tp_features.hotkey_mask) | 1713 | if (tp_features.hotkey_mask) |
1714 | sysfs_notify(&tpacpi_pdev->dev.kobj, NULL, | 1714 | sysfs_notify(&tpacpi_pdev->dev.kobj, NULL, |
diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c index 662b4c279cfc..c283a9a70d83 100644 --- a/drivers/pnp/pnpacpi/core.c +++ b/drivers/pnp/pnpacpi/core.c | |||
@@ -36,7 +36,7 @@ static int num = 0; | |||
36 | * have irqs (PIC, Timer) because we call acpi_register_gsi. | 36 | * have irqs (PIC, Timer) because we call acpi_register_gsi. |
37 | * Finally, only devices that have a CRS method need to be in this list. | 37 | * Finally, only devices that have a CRS method need to be in this list. |
38 | */ | 38 | */ |
39 | static struct __initdata acpi_device_id excluded_id_list[] = { | 39 | static struct acpi_device_id excluded_id_list[] __initdata = { |
40 | {"PNP0C09", 0}, /* EC */ | 40 | {"PNP0C09", 0}, /* EC */ |
41 | {"PNP0C0F", 0}, /* Link device */ | 41 | {"PNP0C0F", 0}, /* Link device */ |
42 | {"PNP0000", 0}, /* PIC */ | 42 | {"PNP0000", 0}, /* PIC */ |
diff --git a/include/acpi/processor.h b/include/acpi/processor.h index cdc8004cfd12..06480bcabfdc 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h | |||
@@ -32,9 +32,11 @@ | |||
32 | #define DOMAIN_COORD_TYPE_SW_ANY 0xfd | 32 | #define DOMAIN_COORD_TYPE_SW_ANY 0xfd |
33 | #define DOMAIN_COORD_TYPE_HW_ALL 0xfe | 33 | #define DOMAIN_COORD_TYPE_HW_ALL 0xfe |
34 | 34 | ||
35 | #define ACPI_CSTATE_SYSTEMIO (0) | 35 | #define ACPI_CSTATE_SYSTEMIO 0 |
36 | #define ACPI_CSTATE_FFH (1) | 36 | #define ACPI_CSTATE_FFH 1 |
37 | #define ACPI_CSTATE_HALT (2) | 37 | #define ACPI_CSTATE_HALT 2 |
38 | |||
39 | #define ACPI_CX_DESC_LEN 32 | ||
38 | 40 | ||
39 | /* Power Management */ | 41 | /* Power Management */ |
40 | 42 | ||
@@ -74,6 +76,7 @@ struct acpi_processor_cx { | |||
74 | u64 time; | 76 | u64 time; |
75 | struct acpi_processor_cx_policy promotion; | 77 | struct acpi_processor_cx_policy promotion; |
76 | struct acpi_processor_cx_policy demotion; | 78 | struct acpi_processor_cx_policy demotion; |
79 | char desc[ACPI_CX_DESC_LEN]; | ||
77 | }; | 80 | }; |
78 | 81 | ||
79 | struct acpi_processor_power { | 82 | struct acpi_processor_power { |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index ddbe7efe590e..2c7e003356ac 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -203,6 +203,7 @@ extern bool wmi_has_guid(const char *guid); | |||
203 | extern int acpi_blacklisted(void); | 203 | extern int acpi_blacklisted(void); |
204 | #ifdef CONFIG_DMI | 204 | #ifdef CONFIG_DMI |
205 | extern void acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d); | 205 | extern void acpi_dmi_osi_linux(int enable, const struct dmi_system_id *d); |
206 | extern int acpi_osi_setup(char *str); | ||
206 | #endif | 207 | #endif |
207 | 208 | ||
208 | #ifdef CONFIG_ACPI_NUMA | 209 | #ifdef CONFIG_ACPI_NUMA |
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index 385d45b616db..6b72a4584086 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h | |||
@@ -19,6 +19,7 @@ | |||
19 | 19 | ||
20 | #define CPUIDLE_STATE_MAX 8 | 20 | #define CPUIDLE_STATE_MAX 8 |
21 | #define CPUIDLE_NAME_LEN 16 | 21 | #define CPUIDLE_NAME_LEN 16 |
22 | #define CPUIDLE_DESC_LEN 32 | ||
22 | 23 | ||
23 | struct cpuidle_device; | 24 | struct cpuidle_device; |
24 | 25 | ||
@@ -29,6 +30,7 @@ struct cpuidle_device; | |||
29 | 30 | ||
30 | struct cpuidle_state { | 31 | struct cpuidle_state { |
31 | char name[CPUIDLE_NAME_LEN]; | 32 | char name[CPUIDLE_NAME_LEN]; |
33 | char desc[CPUIDLE_DESC_LEN]; | ||
32 | void *driver_data; | 34 | void *driver_data; |
33 | 35 | ||
34 | unsigned int flags; | 36 | unsigned int flags; |