summaryrefslogtreecommitdiff
path: root/drivers/acpi
AgeCommit message (Collapse)Author
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>
2009-04-07ACPI: video: use .notify method instead of installing handler directlyBjorn Helgaas
This patch adds a .notify() method. The presence of .notify() causes Linux/ACPI to manage event handlers and notify handlers on our behalf, so we don't have to install and remove them ourselves. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> CC: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-07ACPI: thermal: use .notify method instead of installing handler directlyBjorn Helgaas
This patch adds a .notify() method. The presence of .notify() causes Linux/ACPI to manage event handlers and notify handlers on our behalf, so we don't have to install and remove them ourselves. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> CC: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-07ACPI battery: fix async boot oopsVegard Nossum
> BUG: unable to handle kernel NULL pointer dereference at (null) What happens is that the battery module's init sections are being freed before the async callback (which was marked __init) has run. This theory is supported by the fact that the bad RIP value is a vmalloc address. The immediate fix is to make this a non-init call. (A better long-term fix is of course to wait with init-section unloading until a module's async initcalls have been run, which would allow us to discard this function which is still only run once, after all. Perhaps a new async_initcall() function for the async/module API, if this is needed for other modules in the future?) Reported-by: Arkadiusz Miskiewicz <a.miskiewicz@gmail.com> Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com> Tested-by: Alessandro Suardi <alessandro.suardi@gmail.com> Tested-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-07Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: PCI: pci_slot: grab refcount on slot's bus PCI Hotplug: acpiphp: grab refcount on p2p subordinate bus PCI: allow PCI core hotplug to remove PCI root bus PCI: Fix oops in pci_vpd_truncate PCI: don't corrupt enable_cnt when doing manual resource alignment PCI: annotate pci_rescan_bus as __ref, not __devinit PCI-IOV: fix missing kernel-doc PCI: Setup disabled bridges even if buses are added PCI: SR-IOV quirk for Intel 82576 NIC
2009-04-07hwmon: Add Asus ATK0110 supportLuca Tettamanti
Asus boards have an ACPI interface for interacting with the hwmon (fan, temperatures, voltages) subsystem; this driver exposes the relevant information via the standard sysfs interface. There are two different ACPI interfaces: - an old one (based on RVLT/RFAN/RTMP) - a new one (GGRP/GITM) Both may be present but there a few cases (my board, sigh) where the new interface is just an empty stub; the driver defaults to the old one when both are present. The old interface has received a considerable testing, but I'm still awaiting confirmation from my tester that the new one is working as expected (hence the debug code is still enabled). Currently all the attributes are read-only, though a (partial) control should be possible with a bit more work. Signed-off-by: Luca Tettamanti <kronos.it@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-04-07ACPI: delete acpi_device.g_listLen Brown
unused Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-07ACPI: Adjust Kelvin offset to match local implementationJean Delvare
The exact offset between Kelvin and degree Celsius is 273.15. However ACPI handles temperature values with a single decimal place. As a consequence, some implementations use an offset of 273.1 and others use an offset of 273.2. Try to find out which one is being used, to present the most accurate and visually appealing number. Tested on a Sony Vaio PGC-GR214EP (which uses 273.1) and a Lenovo Thinkpad T60p (which uses 273.2). Signed-off-by: Jean Delvare <khali@linux-fr.org> Acked-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-07ACPI: convert acpi_device_lock spinlock to mutexShaohua Li
Convert acpi_device_lock to a mutex to avoid a potential race upon access to /proc/acpi/wakeup Delete the lock entirely in wakeup.c since it is not necessary (and can not sleep) Found-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-06PCI: pci_slot: grab refcount on slot's busAlex Chiang
If a logical hot unplug (remove) is performed on a physical PCI slot's parent bridge, and then pci_slot is unloaded, we will encounter an oops: [<ffffffff803a788a>] kobject_release+0x9a/0x290 [<ffffffff803a77f0>] ? kobject_release+0x0/0x290 [<ffffffff803a8ce7>] kref_put+0x37/0x80 [<ffffffff803a76f7>] kobject_put+0x27/0x60 [<ffffffff803bebcc>] ? pci_destroy_slot+0x3c/0xc0 [<ffffffff803bebd5>] pci_destroy_slot+0x45/0xc0 [<ffffffffa000f05c>] acpi_pci_slot_remove+0x5c/0x91 [pci_slot] [<ffffffff8040064b>] acpi_pci_unregister_driver+0x4b/0x62 [<ffffffffa000f5c8>] acpi_pci_slot_exit+0x10/0x12 [pci_slot] [<ffffffff80276ce1>] sys_delete_module+0x161/0x250 We need to grab a reference to the parent PCI bus, which will pin the bus and prevent it from being released until pci_slot is unloaded. Cc: lenb@kernel.org Reviewed-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Tested-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Reported-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Alex Chiang <achiang@hp.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-04-05ACPI: processor: use .notify method instead of installing handler directlyBjorn Helgaas
This patch adds a .notify() method. The presence of .notify() causes Linux/ACPI to manage event handlers and notify handlers on our behalf, so we don't have to install and remove them ourselves. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> CC: Zhang Rui <rui.zhang@intel.com> CC: Zhao Yakui <yakui.zhao@intel.com> CC: Venki Pallipadi <venkatesh.pallipadi@intel.com> CC: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-05ACPI: button: use .notify method instead of installing handler directlyBjorn Helgaas
This patch adds a .notify() method. The presence of .notify() causes Linux/ACPI to manage event handlers and notify handlers on our behalf, so we don't have to install and remove them ourselves. Note that events from fixed hardware buttons now show up as a special notify event, so to preserve user-space backward compatibility, we convert that back to ACPI_BUTTON_NOTIFY_STATUS. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Reviewed-by: Alex Chiang <achiang@hp.com> CC: Alexey Starikovskiy <alexey.y.starikovskiy@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-05ACPI: support acpi_device_ops .notify methodsBjorn Helgaas
This patch adds support for ACPI device driver .notify() methods. If such a method is present, Linux/ACPI installs a handler for device notifications (but not for system notifications such as Bus Check, Device Check, etc). When a device notification occurs, Linux/ACPI passes it on to the driver's .notify() method. In most cases, this removes the need for drivers to install their own handlers for device-specific notifications. For fixed hardware devices like some power and sleep buttons, there's no notification value because there's no control method to execute a Notify opcode. When a fixed hardware device generates an event, we handle it the same as a regular device notification, except we send a ACPI_FIXED_HARDWARE_EVENT value. This is outside the normal 0x0-0xff range used by Notify opcodes. Several drivers install their own handlers for system Bus Check and Device Check notifications so they can support hot-plug. This patch doesn't affect that usage. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Reviewed-by: Alex Chiang <achiang@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-05Merge branch 'linus' into releaseLen Brown
Conflicts: arch/x86/kernel/cpu/cpufreq/longhaul.c Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-05Merge branch 'misc' into releaseLen Brown
2009-04-05Merge branch 'x2apic' into releaseLen Brown
2009-04-05Merge branch 'constify' into releaseLen Brown
2009-04-05Merge branches 'bugzilla-12461' and 'bugzilla-9998' into releaseLen Brown
2009-04-05Merge branch 'acpi_enforce_resources' into releaseLen Brown
2009-04-05Merge branch 'async-battery' into releaseLen Brown
Conflicts: drivers/acpi/Makefile Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-05Merge branch 'acpi-modparam' into releaseLen Brown
Conflicts: drivers/acpi/Makefile Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-05Merge branch 'video' into releaseLen Brown
Conflicts: drivers/acpi/video.c Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-05Merge branch 'psd' into releaseLen Brown
2009-04-05Merge branch 'battery' into releaseLen Brown
2009-04-05Merge branch 'thermal' into releaseLen Brown
2009-04-05Merge branch 'pmtimer-overflow' into releaseLen Brown
2009-04-05Merge branch 'dynamic-ssdt' into releaseLen Brown
2009-04-05Merge branch 'driver-ops-cleanup' into releaseLen Brown
2009-04-05Merge branch 'bjorn-cleanups' into releaseLen Brown
2009-04-05Merge branch 'bjorn-initcall-cleanup' into releaseLen Brown
2009-04-04ACPI: battery: asynchronous initArjan van de Ven
The battery driver tends to take quite some time to initialize (100ms-300ms is quite typical). This patch initializes the batter driver asynchronously, so that other things in the kernel can initialize in parallel to this 300 msec. As part of this, the battery driver had to move to the back of the ACPI init order (hence the Makefile change). Without this move, the next ACPI driver would just block on the ACPI/devicee layer semaphores until the battery driver was done anyway, not gaining any boot time. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-04video: build fixLen Brown
acpi_video_device_write_state() and friends now return ssize_t, while the constify patch assumed it was still int. Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-03ACPI: constify VFTs (2/2)Jan Engelhardt
Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-03ACPI: constify VFTs (1/2)Jan Engelhardt
Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-03ACPI: constify tables in pci_irq.cJan Beulich
Signed-off-by: Jan Beulich <jbeulich@novell.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-03x86, ACPI: add support for x2apic ACPI extensionsSuresh Siddha
All logical processors with APIC ID values of 255 and greater will have their APIC reported through Processor X2APIC structure (type-9 entry type) and all logical processors with APIC ID less than 255 will have their APIC reported through legacy Processor Local APIC (type-0 entry type) only. This is the same case even for NMI structure reporting. The Processor X2APIC Affinity structure provides the association between the X2APIC ID of a logical processor and the proximity domain to which the logical processor belongs. For OSPM, Procssor IDs outside the 0-254 range are to be declared as Device() objects in the ACPI namespace. Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-03Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (28 commits) trivial: Update my email address trivial: NULL noise: drivers/mtd/tests/mtd_*test.c trivial: NULL noise: drivers/media/dvb/frontends/drx397xD_fw.h trivial: Fix misspelling of "Celsius". trivial: remove unused variable 'path' in alloc_file() trivial: fix a pdlfush -> pdflush typo in comment trivial: jbd header comment typo fix for JBD_PARANOID_IOFAIL trivial: wusb: Storage class should be before const qualifier trivial: drivers/char/bsr.c: Storage class should be before const qualifier trivial: h8300: Storage class should be before const qualifier trivial: fix where cgroup documentation is not correctly referred to trivial: Give the right path in Documentation example trivial: MTD: remove EOL from MODULE_DESCRIPTION trivial: Fix typo in bio_split()'s documentation trivial: PWM: fix of #endif comment trivial: fix typos/grammar errors in Kconfig texts trivial: Fix misspelling of firmware trivial: cgroups: documentation typo and spelling corrections trivial: Update contact info for Jochen Hein trivial: fix typo "resgister" -> "register" ...
2009-04-03dock: fix dereference after kfree()Dan Carpenter
dock_remove() calls kfree() on dock_station so we should use list_for_each_entry_safe() to avoid dereferencing freed memory. Found by smatch (http://repo.or.cz/w/smatch.git/). Compile tested. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-03ACPI: Remove R40e c-state blacklistThomas Renninger
The recent ACPICA patch (ACPICA: FADT: Favor 32-bit register addresses for compatibility) makes machine to use the right FADT HW addresses and C-states now work fine. http://bugzilla.kernel.org/show_bug.cgi?id=8246 Signed-off-by: Thomas Renninger <trenn@suse.de> Tested-by: Mark Doughty <me@markdoughty.co.uk> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-03ACPI: get_throttling_state() cannot be larger than state_countLen Brown
Reported-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-03ACPI: suspend: Add the Pansonic CF51 box to the dmi check tableZhao Yakui
The Pansonic CF51-2L requires "acpi_sleep=old_ordering", so invoke it automatically via DMI. http://bugzilla.kernel.org/show_bug.cgi?id=12561 Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-02ACPI: simplify processor lines in MakefileLen Brown
Suggested-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-02ACPI: acpi_enforce_resource=strict by defaultLuca Tettamanti
Enforce strict resource checking - disallowing access by native drivers to IO ports and memory regions claimed by ACPI firmware. The patch is mainly aimed to block native hwmon drivers from touching monitoring chips that ACPI thinks it own. If this causes a regression, boot with "acpi_enforce_resources=lax" which was the previous default. http://bugzilla.kernel.org/show_bug.cgi?id=12376 http://bugzilla.kernel.org/show_bug.cgi?id=12541 Signed-off-by: Luca Tettamanti <kronos.it@gmail.com> Acked-by: Pavel Machek <pavel@suse.cz> Acked-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-02ACPI: simplify module_param namespaceRusty Russell
Impact: cleanup Rather than overriding MODULE_PARAM_PREFIX, build via acpi.o so KBUILD_MODNAME is set to "acpi". This is the logical way to do it, even though acpi cannot be a module due to these config options being bool. Those parts of ACPI which can be modular are not built into the acpi "module". Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-01Merge branch 'linux-next' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 * 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6: (88 commits) PCI: fix HT MSI mapping fix PCI: don't enable too much HT MSI mapping x86/PCI: make pci=lastbus=255 work when acpi is on PCI: save and restore PCIe 2.0 registers PCI: update fakephp for bus_id removal PCI: fix kernel oops on bridge removal PCI: fix conflict between SR-IOV and config space sizing powerpc/PCI: include pci.h in powerpc MSI implementation PCI Hotplug: schedule fakephp for feature removal PCI Hotplug: rename legacy_fakephp to fakephp PCI Hotplug: restore fakephp interface with complete reimplementation PCI: Introduce /sys/bus/pci/devices/.../rescan PCI: Introduce /sys/bus/pci/devices/.../remove PCI: Introduce /sys/bus/pci/rescan PCI: Introduce pci_rescan_bus() PCI: do not enable bridges more than once PCI: do not initialize bridges more than once PCI: always scan child buses PCI: pci_scan_slot() returns newly found devices PCI: don't scan existing devices ... Fix trivial append-only conflict in Documentation/feature-removal-schedule.txt
2009-04-01ACPI: EC: Always parse EC deviceAlexey Starikovskiy
If ECDT info is not valid, we have last chance to configure EC driver properly at this point, don't miss it. http://bugzilla.kernel.org/show_bug.cgi?id=12461 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-01ACPI: EC: Separate delays for MSI hardwareAlexey Starikovskiy
MSI notebooks require very strict delays, while all others are happy with msleep(). References: http://bugzilla.kernel.org/show_bug.cgi?id=9998 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2009-03-31proc 2/2: remove struct proc_dir_entry::ownerAlexey Dobriyan
Setting ->owner as done currently (pde->owner = THIS_MODULE) is racy as correctly noted at bug #12454. Someone can lookup entry with NULL ->owner, thus not pinning enything, and release it later resulting in module refcount underflow. We can keep ->owner and supply it at registration time like ->proc_fops and ->data. But this leaves ->owner as easy-manipulative field (just one C assignment) and somebody will forget to unpin previous/pin current module when switching ->owner. ->proc_fops is declared as "const" which should give some thoughts. ->read_proc/->write_proc were just fixed to not require ->owner for protection. rmmod'ed directories will be empty and return "." and ".." -- no harm. And directories with tricky enough readdir and lookup shouldn't be modular. We definitely don't want such modular code. Removing ->owner will also make PDE smaller. So, let's nuke it. Kudos to Jeff Layton for reminding about this, let's say, oversight. http://bugzilla.kernel.org/show_bug.cgi?id=12454 Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>