aboutsummaryrefslogtreecommitdiff
path: root/drivers/acpi
AgeCommit message (Collapse)Author
2009-05-16Merge branches 'release', 'bugzilla-13032', 'bugzilla-13041+', ↵Len Brown
'bugzilla-13121', 'bugzilla-13165', 'bugzilla-13243', 'bugzilla-13259', 'resume-sci-en-regression', 'thermal-regression', 'tsc-regression' and 'asus-2.6.30' into release
2009-05-16ACPI: Idle C-states disabled by max_cstate should not disable the TSCLen Brown
Processor idle power states C2 and C3 stop the TSC on many machines. Linux recognizes this situation and marks the TSC as unstable: Marking TSC unstable due to TSC halts in idle But if those same machines are booted with "processor.max_cstate=1", then there is no need to validate C2 and C3, and no need to disable the TSC, which can be reliably used as a clocksource. Signed-off-by: Len Brown <len.brown@intel.com> Acked-by: Thomas Gleixner <tglx@linutronix.de>
2009-05-16ACPI: idle: fix init-time TSC check regressionLen Brown
A previous 2.6.30 patch, a71e4917dc0ebbcb5a0ecb7ca3486643c1c9a6e2, (ACPI: idle: mark_tsc_unstable() at init-time, not run-time) erroneously disabled the TSC on systems that did not actually have valid deep C-states. Move the check after the deep-C-states are validated, via new helper, tsc_check_state(), hich replaces tsc_halts_in_c(). Signed-off-by: Len Brown <len.brown@intel.com> Acked-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Acked-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Frans Pop <elendil@planet.nl>
2009-05-15ACPI processor: reset the throttling state once it's invalidZhang Rui
If the BIOS hands us an invalid throttling state, write a valid state. http://bugzilla.kernel.org/show_bug.cgi?id=13259 Signed-off-by: Zhang Rui <rui.zhang@intel.com> Tested-by: James Ettle <theholyettlz@googlemail.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-05-15ACPI processor: introduce module parameter processor.ignore_tpcZhang Rui
Introduce module parameter processor.ignore_tpc. Some laptops are shipped with buggy _TPC, this module parameter is used to to disable the buggy support. http://bugzilla.kernel.org/show_bug.cgi?id=13259 Signed-off-by: Zhang Rui <rui.zhang@intel.com> Tested-by: James Ettle <theholyettlz@googlemail.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-05-15ACPI: suspend: restore BM_RLD on resumeLen Brown
In 2.6.29, 31878dd86b7df9a147f5e6cc6e07092b4308782b "ACPI: remove BM_RLD access from idle entry path" moved BM_RLD initialization to init-time from run time. But we discovered that some BIOS do not restore BM_RLD after suspend, causing device errors on C3 and C4 after resume. So now the kernel restores BM_RLD. http://bugzilla.kernel.org/show_bug.cgi?id=13032 Signed-off-by: Len Brown <len.brown@intel.com>
2009-05-15ACPI: resume: re-enable SCI-enable workaroundLin Ming
The BIOS bug workaround mistakenly got disabled when we followed the ACPI specification more closely by ignoring OS updates to that bit. (The BIOS is supposed to update SCI_EN, not the OS) http://bugzilla.kernel.org/show_bug.cgi?id=13289 Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-05-08ACPI: power: update error messageLen Brown
"Transitioning device [%s] to D%d" is not correct. We print this line when we attempted to transition the device, and it failed. So instead, print "Device [%s] failed to transition to D%d\n" This can happen under two conditions: 1. acpi_power_transition() fails when trying to handle the _ON/_OFF for associated power resource. 2. acpi_evaluate_object() on the explicit _PS0/_PS3 for that actual device could fail. this change clarifies, but doesn't fix http://bugzilla.kernel.org/show_bug.cgi?id=13243 Signed-off-by: Len Brown <len.brown@intel.com>
2009-05-07ACPI: video: DMI workaround another broken Acer BIOS enabling display brightnessLen Brown
http://bugzilla.kernel.org/show_bug.cgi?id=13121 Signed-off-by: Len Brown <len.brown@intel.com>
2009-05-07ACPICA: use acpi.* modparam namespaceLen Brown
Add acpi/acpica/*.c to the acpi.* modparam namespace so that any modparams we stick into ACPICA do not expose ACPICA filenames to users. There are currently only two modparams in ACPICA, just recently added for http://bugzilla.kernel.org/show_bug.cgi?id=13041 With this change, they become acpi.gts=1 acpi.bfs=1 rather than hwsleep.gts=1 hwsleep.bfs=1 Signed-off-by: Len Brown <len.brown@intel.com>
2009-05-02acpica: validate package element more carefully in ↵Robert Moore
acpi_rs_get_pci_routing_table_length acpi_rs_get_pci_routing_table_length is not performing sufficient validation on the package returned from _PRT. It assumes a package of packages and fails/faults if this is not the case. We should validate each subpackage when extracted from the parent package, and not accept objects of the wrong type, since that will just cause the scanning to fail (likely with a kernel oops). This can only happen with a serious BIOS bug, and is accompanied by a warning something like this: ACPI Warning (nspredef-0949): \_SB_.PCI0.PEG4._PRT: Return Package type mismatch at index 0 - found Integer, expected Package [20090320] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-28Merge branch 'drm-intel-next' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel * 'drm-intel-next' of git://git.kernel.org/pub/scm/linux/kernel/git/anholt/drm-intel: drm/i915: fix up error path leak in i915_cmdbuffer drm/i915: fix unpaired i915 device mutex on entervt failure. drm/i915: add support for G41 chipset drm/i915: Enable ASLE if present drm/i915: Unregister ACPI video driver when exiting drm/i915: Register ACPI video even when not modesetting drm/i915: fix transition to I915_TILING_NONE drm/i915: Don't let an oops get triggered from irq_emit without dma init. drm/i915: allow tiled front buffers on 965+
2009-04-24ACPI video: dmi check for broken _BQC on Acer Aspire 5720Zhang Rui
On Acer Aspire 5720, _BQC always returns a value 9 smaller than the actual brightness level. Add dmi quirk for this laptop. http://bugzilla.kernel.org/show_bug.cgi?id=13121 Tested-by: Maxim Levitsky <maximlevitsky@gmail.com> Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-24Merge branch 'bjorn.button' into releaseLen Brown
2009-04-24Merge branch 'bugzilla-13036' into releaseLen Brown
2009-04-24Merge branch 'bugzilla-13142' into releaseLen Brown
2009-04-24Merge branch 'hpet' into releaseLen Brown
2009-04-24Merge branch 'bugzilla-12249' into releaseLen Brown
2009-04-24Merge branch 'bugzilla-12270' into releaseLen Brown
2009-04-24Merge branch 'bugzilla-13041' into releaseLen Brown
2009-04-24Merge branch 'idle' into releaseLen Brown
2009-04-24Merge branch 'irq' into releaseLen Brown
2009-04-24Merge branch 'sony-laptop' into releaseLen Brown
2009-04-24Merge branch 'thermal-regression' into releaseLen Brown
2009-04-24Merge branch 'video-ac-dc' into releaseLen Brown
2009-04-24Revert "ACPICA: delete check for AML access to port 0x81-83"Len Brown
This reverts commit fdbdc7fc79c02ae4ede869d514179a2c65633d28. That temporary quick-fix is no longer necessary, as the previous patch, a65131e942e25c707a652fa4ec2cfcd8b63fec11, "I/O port protection: update for windows compatibility" should handle this issue for all ports, including this one. Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-24I/O port protection: update for windows compatibility.Lin Ming
For windows compatibility, 1) On a port protection violation, simply ignore the request and do not return an exception (allow the control method to continue execution.) 2) If only part of the request overlaps a protected port, read/write the individual ports that are not protected. http://bugzilla.kernel.org/show_bug.cgi?id=13036 Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-23ACPI: EC: Fix ACPI EC resume non-query interrupt messageAlmer S. Tigelaar
When resuming from standby (on a laptop) I see the following message in my kernel.log: "ACPI: EC: non-query interrupt received, switching to interrupt mode" This apparently prevented sony-laptop to properly restore the brightness level on resume. The cause: In drivers/acpi/ec.c the acpi_ec_suspend function clears the GPE mode bit, but this is not restored in acpi_ec_resume (the function below it). The patch below fixes this by properly restoring the GPE_MODE bit. Tested and confirmed to work. Signed-off-by: Almer S. Tigelaar <almer@gnome.org> Signed-off-by: Mattia Dongili <malattia@linux.it> Acked-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-23ACPI: prevent processor.max_cstate=0 boot crashLen Brown
As processor.max_cstate is an init-time-only modparam, sanity checking it at init-time is sufficient. http://bugzilla.kernel.org/show_bug.cgi?id=13142 Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-23ACPI/hpet: prevent boot hang when hpet=force used on ICH-4MLen Brown
Linux tells ICH4 users that they can (manually) invoke "hpet=force" to enable the undocumented ICH-4M HPET. The HPET becomes available for both clocksource and clockevents. But as of ff69f2bba67bd45514923aaedbf40fe351787c59 (acpi: fix of pmtimer overflow that make Cx states time incorrect) the HPET may be used via clocksource for idle accounting, and hpet=force on an ICH4 box hangs boot. It turns out that touching the MMIO HPET withing the ARB_DIS part of C3 will hang the hardware. The fix is to simply move the timer access outside the ARB_DIS region. This is a no-op on modern hardware because ARB_DIS is no longer used. http://bugzilla.kernel.org/show_bug.cgi?id=13087 Acked-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-22ACPI: delete obsolete "bus master activity" proc fieldLen Brown
Linux-2.6.29 deleted the legacy ACPI idle handler, leaving the CPU_IDLE handler, which does not track bus master activity. So delete the unused bm_activity field -- it is confusing to print an always zero value. This patch could break programs that parse /proc/acpi/processor/*/power, since it deletes this line from that file: bus master activity: 00000000 http://bugzilla.kernel.org/show_bug.cgi?id=13145 is not fixed by this patch, but provoked this patch. Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-22ACPI: idle: mark_tsc_unstable() at init-time, not run-timeLen Brown
The c2 and c3 idle handlers check tsc_halts_in_c() after every time they return from idle. Um, when?:-) Move this check to init-time to remove the unnecessary run-time overhead, and also to have the check complete before the first entry into the idle handler. ff69f2bba67bd45514923aaedbf40fe351787c59 (acpi: fix of pmtimer overflow that make Cx states time incorrect) replaced the hard-coded use of the PM-timer inside idle, with ktime_get_readl(), which possibly uses the TSC -- so it is now especially prudent to detect a broken TSC before entering idle. http://bugzilla.kernel.org/show_bug.cgi?id=13087 Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-21ACPI: add /sys/firmware/acpi/interrupts/sci_not counterLen Brown
This counter may prove useful in debugging some spurious interrupt issues seen in the field. Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-20ACPI video: fix an error when the brightness levels on AC and on Battery are ↵Zhang Rui
same when the brightness level on AC and brightness level on Battery are same, the level_ac_battery is 1 in the current code, which is wrong. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-19PM/Suspend: Introduce two new platform callbacks to avoid breakageRafael J. Wysocki
Commit 900af0d973856d6feb6fc088c2d0d3fde57707d3 (PM: Change suspend code ordering) changed the ordering of suspend code in such a way that the platform .prepare() callback is now executed after the device drivers' late suspend callbacks have run. Unfortunately, this turns out to break ARM platforms that need to talk via I2C to power control devices during the .prepare() callback. For this reason introduce two new platform suspend callbacks, .prepare_late() and .wake(), that will be called just prior to disabling non-boot CPUs and right after bringing them back on line, respectively, and use them instead of .prepare() and .finish() for ACPI suspend. Make the PM core execute the .prepare() and .finish() platform suspend callbacks where they were executed previously (that is, right after calling the regular suspend methods provided by device drivers and right before executing their regular resume methods, respectively). It is not necessary to make analogous changes to the hibernation code and data structures at the moment, because they are only used by ACPI platforms. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Reported-by: Russell King <rmk+kernel@arm.linux.org.uk> Acked-by: Len Brown <len.brown@intel.com>
2009-04-18thermal: Fix polling frequency for systems without passive coolingMatthew Garrett
The polling interval (in deciseconds) was accidently interpreted as being in milliseconds in one codepath, resulting in excessively frequent polling. Ensure that the conversion is performed. Signed-off-by: Matthew Garrett <mjg@redhat.com> Acked-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-17ACPI: Disable _GTS and _BFS support by defaultLen Brown
Executing BIOS code paths not exercised by Windows tends to get Linux into trouble. However, if a system does benefit from _GTS or _BFS, acpi.gts=1 an acpi.bfs=1 are now available to enable them. http://bugzilla.kernel.org/show_bug.cgi?id=13041 Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-17drm/i915: Unregister ACPI video driver when exitingMatthew Garrett
The i915 DRM triggers registration of the ACPI video driver on load. It should unregister it at unload in order to avoid generating backtraces on being reloaded. Signed-off-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-04-11Revert "ACPI battery: fix async boot oops"Linus Torvalds
This reverts commit 5d38258ec026921a7b266f4047ebeaa75db358e5, since the underlying problem got fixed properly in the previous commit ("async: Fix module loading async-work regression"). Cc: Arkadiusz Miskiewicz <a.miskiewicz@gmail.com> Cc: Vegard Nossum <vegard.nossum@gmail.com> Cc: Len Brown <len.brown@intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-04-11ACPI video: handle indexed _BQC correctlyZhang Rui
In the current code, for a box with an indexed _BQC method, we 1. get the current brightness level by evaluating _BQC 2. set the value gotten in step 1 to _BCM 3. get the current brightness level again 4. set the _BQC_use_index flag if the results gotten in step 1 and in step 3 don't equal. But this logic doesn't work actually, because the _BQC_use_index is not set when acpi_video_device_lcd_set_level is invoked. This results in a failure in step 2. http://bugzilla.kernel.org/show_bug.cgi?id=12249#c83 Now, we set the _BQC_use_index flag after invoking _BQC for the first time. And reevaluate the _BQC to get the correct brightness level. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-11ACPI: Revert conflicting workaround for BIOS w/ mangled PRT entriesZhang Rui
2f894ef9c8b36a35d80709bedca276d2fc691941 in Linux-2.6.21 worked around BIOS with mangled _PRT entries: http://bugzilla.kernel.org/show_bug.cgi?id=6859 d0e184abc5983281ef189db2c759d65d56eb1b80 worked around the same issue via ACPICA, and shipped in 2.6.27. Unfortunately the two workarounds conflict: http://bugzilla.kernel.org/show_bug.cgi?id=12270 So revert the Linux specific one. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-11ACPI: button: remove control method/fixed hardware distinctionsBjorn Helgaas
This patch removes the driver distinction between control method (CM) and fixed hardware (FF) buttons. We previously needed that so we could install either a fixed event handler or a notify handler, but the Linux/ACPI code now handles that for us, so we don't need to worry about it. Note that this removes the FF/CM annotation from the "info" files in /proc. For example, /proc/acpi/button/PWRF/info: -type: Power Button (FF) +type: Power Button I don't think there's anything meaningful user-space can do by knowing whether a button is a control method or a fixed hardware button, so nobody should be looking at the FF/CM. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-11ACPI: button: remove button->device pointerBjorn Helgaas
We no longer need a pointer from struct acpi_button back to the struct acpi_device. Everywhere we used that pointer, we either already have, or can easily get, the acpi_device pointer without using the copy from acpi_button. So this patch removes the structure element. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-11ACPI: button: cache hid/name/class pointersBjorn Helgaas
This patch adds temporaries to cache the acpi_device_hid(), acpi_device_name(), and acpi_device_class() pointers so we don't have to clutter the code with so many uses of those interfaces. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-11ACPI: button: use Linux style for getting driver_dataBjorn Helgaas
It's typical and slightly more compact to look up the driver_data structure by initializing the automatic variable at its definition. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-11ACPI: button: remove unnecessary null pointer checksBjorn Helgaas
Better to oops and learn about a bug than to silently cover it up. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-11ACPI: button: whitespace changesBjorn Helgaas
This patch changes a bit of whitespace to follow Linux conventions. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-07Merge branches 'release', 'APERF', 'ARAT', 'misc', 'kelvin', 'device-lock' ↵Len Brown
and 'bjorn.notify' into release
2009-04-07x86 ACPI: Add support for Always Running APIC timerVenkatesh Pallipadi
Add support for Always Running APIC timer, CPUID_0x6_EAX_Bit2. This bit means the APIC timer continues to run even when CPU is in deep C-states. The advantage is that we can use LAPIC timer on these CPUs always, and there is no need for "slow to read and program" external timers (HPET/PIT) and the timer broadcast logic and related code in C-state entry and exit. Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Acked-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-07ACPICA: delete check for AML access to port 0x81-83Len Brown
Sony laptops apparently write 4-bytes (rather than 1 byte) to debug port 0x80, which spews error messages: Denied AML access to port 0x00000080/4 (DMA1 0x0081-0x0083) [20090320] http://bugzilla.kernel.org/show_bug.cgi?id=13036 Signed-off-by: Len Brown <len.brown@intel.com>