diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-06-06 13:47:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-06-06 13:47:15 -0400 |
commit | ff39d0e8f08f8b5a51352652a2d46c51bb7b6ecd (patch) | |
tree | a5dd7023ec15916604575efbd70b1aa94ab5bf53 /drivers/acpi/processor_perflib.c | |
parent | ae501be0f631bd4fb751c5f580e396f59b2011f1 (diff) | |
parent | d3514abcf5b896a3a66d8b7c960a0018a52ebc2c (diff) |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux
Pull ACPI and Power Management changes from Len Brown.
This does an evil merge to fix up what I think is a mismerge by Len to
the gma500 driver, and restore it to the mainline state.
In that driver, both branches had commented out the call to
acpi_video_register(), and Len resolved the merge to that commented-out
version.
However, in mainline, further changes by Alan (commit d839ede47a56:
"gma500: opregion and ACPI" to be exact) had re-enabled the ACPI video
registration, so the current state of the driver seems to want it.
Alan is apparently still feeling the effects of partying with the Queen,
so he didn't reply to my query, but I'll do the evil merge anyway.
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux:
ACPI: fix acpi_bus.h build warnings when ACPI is not enabled
drivers: acpi: Fix dependency for ACPI_HOTPLUG_CPU
tools/power turbostat: fix IVB support
tools/power turbostat: fix un-intended affinity of forked program
ACPI video: use after input_unregister_device()
gma500: don't register the ACPI video bus
acpi_video: Intel video is not always i915
acpi_video: fix leaking PCI references
ACPI: Ignore invalid _PSS entries, but use valid ones
ACPI battery: only refresh the sysfs files when pertinent information changes
Diffstat (limited to 'drivers/acpi/processor_perflib.c')
-rw-r--r-- | drivers/acpi/processor_perflib.c | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c index 0af48a8554cd..a093dc163a42 100644 --- a/drivers/acpi/processor_perflib.c +++ b/drivers/acpi/processor_perflib.c | |||
@@ -333,6 +333,7 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr) | |||
333 | struct acpi_buffer state = { 0, NULL }; | 333 | struct acpi_buffer state = { 0, NULL }; |
334 | union acpi_object *pss = NULL; | 334 | union acpi_object *pss = NULL; |
335 | int i; | 335 | int i; |
336 | int last_invalid = -1; | ||
336 | 337 | ||
337 | 338 | ||
338 | status = acpi_evaluate_object(pr->handle, "_PSS", NULL, &buffer); | 339 | status = acpi_evaluate_object(pr->handle, "_PSS", NULL, &buffer); |
@@ -394,14 +395,33 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr) | |||
394 | ((u32)(px->core_frequency * 1000) != | 395 | ((u32)(px->core_frequency * 1000) != |
395 | (px->core_frequency * 1000))) { | 396 | (px->core_frequency * 1000))) { |
396 | printk(KERN_ERR FW_BUG PREFIX | 397 | printk(KERN_ERR FW_BUG PREFIX |
397 | "Invalid BIOS _PSS frequency: 0x%llx MHz\n", | 398 | "Invalid BIOS _PSS frequency found for processor %d: 0x%llx MHz\n", |
398 | px->core_frequency); | 399 | pr->id, px->core_frequency); |
399 | result = -EFAULT; | 400 | if (last_invalid == -1) |
400 | kfree(pr->performance->states); | 401 | last_invalid = i; |
401 | goto end; | 402 | } else { |
403 | if (last_invalid != -1) { | ||
404 | /* | ||
405 | * Copy this valid entry over last_invalid entry | ||
406 | */ | ||
407 | memcpy(&(pr->performance->states[last_invalid]), | ||
408 | px, sizeof(struct acpi_processor_px)); | ||
409 | ++last_invalid; | ||
410 | } | ||
402 | } | 411 | } |
403 | } | 412 | } |
404 | 413 | ||
414 | if (last_invalid == 0) { | ||
415 | printk(KERN_ERR FW_BUG PREFIX | ||
416 | "No valid BIOS _PSS frequency found for processor %d\n", pr->id); | ||
417 | result = -EFAULT; | ||
418 | kfree(pr->performance->states); | ||
419 | pr->performance->states = NULL; | ||
420 | } | ||
421 | |||
422 | if (last_invalid > 0) | ||
423 | pr->performance->state_count = last_invalid; | ||
424 | |||
405 | end: | 425 | end: |
406 | kfree(buffer.pointer); | 426 | kfree(buffer.pointer); |
407 | 427 | ||