aboutsummaryrefslogtreecommitdiff
path: root/drivers/acpi
AgeCommit message (Collapse)Author
2007-07-29Introduce CONFIG_SUSPEND for suspend-to-Ram and standbyRafael J. Wysocki
Introduce CONFIG_SUSPEND representing the ability to enter system sleep states, such as the ACPI S3 state, and allow the user to choose SUSPEND and HIBERNATION independently of each other. Make HOTPLUG_CPU be selected automatically if SUSPEND or HIBERNATION has been chosen and the kernel is intended for SMP systems. Also, introduce CONFIG_PM_SLEEP which is automatically selected if CONFIG_SUSPEND or CONFIG_HIBERNATION is set and use it to select the code needed for both suspend and hibernation. The top-level power management headers and the ACPI code related to suspend and hibernation are modified to use the new definitions (the changes in drivers/acpi/sleep/main.c are, mostly, moving code to reduce the number of ifdefs). There are many other files in which CONFIG_PM can be replaced with CONFIG_PM_SLEEP or even with CONFIG_SUSPEND, but they can be updated in the future. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-29Replace CONFIG_SOFTWARE_SUSPEND with CONFIG_HIBERNATIONRafael J. Wysocki
Replace CONFIG_SOFTWARE_SUSPEND with CONFIG_HIBERNATION to avoid confusion (among other things, with CONFIG_SUSPEND introduced in the next patch). Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-26Don't force-enable suspend/hibernate support just for ACPILinus Torvalds
It's a totally independent decision for the user whether he wants suspend and/or hibernation support, and ACPI shouldn't care. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-25Pull auto-load-modules into release branchLen Brown
2007-07-25Pull d-states into release branchLen Brown
Conflicts: drivers/acpi/sleep/main.c Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-25Pull kconfig into release branchLen Brown
2007-07-25ACPI: Kconfig: remove CONFIG_ACPI_SLEEP from sourceLen Brown
As it was a synonym for (CONFIG_ACPI && CONFIG_X86), the ifdefs for it were more clutter than they were worth. For ia64, just add a few stubs in anticipation of future S3 or S4 support. Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-25ACPI: quiet ACPI Exceptions due to no _PTC or _TSSLen Brown
ACPI Exception (processor_throttling-0084): AE_NOT_FOUND, Evaluating _PTC [20070126] ACPI Exception (processor_throttling-0147): AE_NOT_FOUND, Evaluating _TSS [20070126] These methods are optional, so Linux should not alarm users when they are not found. http://bugzilla.kernel.org/show_bug.cgi?id=8802 Signed-off-by: Len Brown <len.brown@intel.com> Acked-by: Luming Yu <luming.yu@intel.com>
2007-07-24ACPI: Remove references to ACPI_STATE_S2 from acpi_pm_enterRafael J. Wysocki
Remove references to ACPI_STATE_S2, introduced by acpi-implement-the-set_target-callback-from-pm_ops.patch, from acpi_pm_enter(). Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-24ACPI: Kconfig: always enable CONFIG_ACPI_SLEEP on X86Len Brown
The SMP dependency on HOTPLUG_CPU and SUSPEND_SMP caused more harm than good -- making ACPI sleep support vanish for configs missing those options. So simply select them on the (ACPI && SMP && X86) systems that need them. Also, remove the prompt for ACPI_SLEEP, virtually nobody (intentionally) enables ACPI without it. Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-24ACPI: Kconfig: fold /proc/acpi/sleep under CONFIG_ACPI_PROCFSLen Brown
/proc/acpi/sleep has had its own "default n" option, ACPI_SLEEP_PROC_SLEEP, for many months. Time to delete ACPI_SLEEP_PROC_SLEEP. Users that still need /proc/acpi/sleep can still get it along with the other deprecated /proc/acpi files by enabling CONFIG_ACPI_PROCFS. Also delete ACPI_SLEEP_PROC_FS, which was an umbrella for /proc/acpi/sleep, wakeup, alarm, because it was effectively just a synonym for ACPI_SLEEP. Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-24ACPI: Kconfig: CONFIG_ACPI_PROCFS now defaults to NLen Brown
delete "default y" from CONFIG_ACPI_PROCFS (effectively making the default 'N') List exactly what /proc files this option controls, and clarify that it doesn't change non-deprecated files. Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-23ACPI: autoload modules - Create __mod_acpi_device_table symbol for all ACPI ↵Thomas Renninger
drivers modpost is going to use these to create e.g. acpi:ACPI0001 in modules.alias. Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-23ACPI: autoload modules - Create ACPI alias interfaceThomas Renninger
Modify modpost (file2alias.c) to add acpi*:XYZ0001: alias in modules.alias like: grep acpi /lib/modules/2.6.22-rc4-default/modules.alias alias acpi*:SNY5001:* sony_laptop alias acpi*:SNY6001:* sony_laptop for e.g. the sony_laptop module. This module matches against all ACPI devices with a HID or CID of SNY5001 or SNY6001 Export an uevent and modalias sysfs file containing the string: [MODALIAS=]acpi:PNP0C0C: additional CIDs are concatenated at the end. Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-23ACPI: autoload modules - ACPICA modificationsThomas Renninger
Define standardized HIDs - Rename current acpi_device_id to acpica_device_id Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-23ACPI: fix oops due to typo in new throttling codeLuming Yu
Signed-off-by: Luming Yu <luming.yu@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-22Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlightLinus Torvalds
* 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight: leds: cr_bllcd.c: build fix backlight: Convert from struct class_device to struct device backlight: Fix order of Kconfig entries
2007-07-22ACPI: Add acpi_pm_device_sleep_state helper routineShaohua Li
Based on the David Brownell's patch at http://marc.info/?l=linux-acpi&m=117873972806360&w=2 updated by: Rafael J. Wysocki <rjw@sisk.pl> Add a helper routine returning the lowest power (highest number) ACPI device power state that given device can be in while the system is in the sleep state indicated by acpi_target_sleep_state . Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-22ACPI: Implement the set_target() callback from pm_opsRafael J. Wysocki
In the future some drivers may need to use ACPI to determine the low power states in which to place their devices, but to provide the drivers with this information the ACPI core needs to know what sleep state the system is going to enter. Namely, the device's state should not be too high power for given system sleep state and, if the device is supposed to be able to wake up the system, its state should not be too low power for the wake up to be possible). For this purpose, the ACPI core needs to implement the set_target() method in 'struct pm_ops' and store the target system sleep state passed by the PM core in a variable. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Pavel Machek <pavel@ucw.cz> Acked-by: David Brownell <david-b@pacbell.net> Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-22Pull tables-in-sysfs into release branchLen Brown
2007-07-22Pull netlink into release branchLen Brown
2007-07-22ACPI: Populate /sys/firmware/acpi/tables/Zhang Rui
The file name is the signature, such as DSDT, and the contents are the binary table image. Some tables, such as the SSDT, can have multiple instances. If just one, the file is SSDT, but if 3 instances, for example, it will be SSDT1, SSDT2, SSDT3 All static tables (besides teh RSDP and RSDT themselves are exported. Dynamic tables, such as SSDT op-regions that are not declared in the RSDT, will be added in a subsequent patch. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-22Pull osi into release branchLen Brown
2007-07-22Pull video into release branchLen Brown
2007-07-22Pull throttle into release branchLen Brown
2007-07-22Pull misc into release branchLen Brown
Conflicts: Documentation/feature-removal-schedule.txt
2007-07-22Pull dock-bay into release branchLen Brown
2007-07-22Pull ec into release branchLen Brown
2007-07-22Pull sbs into release branchLen Brown
2007-07-22Pull battery into release branchLen Brown
2007-07-22Pull acpi-debug into release branchLen Brown
2007-07-22Pull acpica into release branchLen Brown
2007-07-22ACPI: create CONFIG_ACPI_DEBUG_FUNC_TRACEThomas Renninger
Split ACPI_DEBUG into function trace enabled and not enabled. Function trace is most of the ACPI_DEBUG costs, but is not much of use for kernel ACPI debugging. Size of kernel image increased on test compile: + 48k (Full ACPI_DEBUG) + 35k (ACPI_DEBUG with function trace compiled out) Performance without function trace is also much better. Also remove ACPI_LV_DEBUG_OBJECT from default debug level as a lot vendors let Store (value, debug) in their code and this might confuse users when it pops up in syslog. Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-22ACPI: export ACPI events via acpi_mc_group multicast groupZhang Rui
This is an incremental patch for the recent genetlink multicast changes. Now ACPI events are exported via generic netlink multicast group. Thanks for Johannes' help on developing this patch Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-22ACPI: fix empty macros found by -WextraDave Jones
ACPI has a ton of macros which make a bunch of empty if's when configured in non-debug mode. [lenb: The code it complaines about is functionally correct, so this patch is just to make -Wextra happier] #define DBG() if(...) DBG(); next_c_statement which turns into if(...) ; next_c_statement Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-22ACPI: drivers/acpi/pci_link.c: lower printk severityDan Aloni
Signed-off-by: Dan Aloni <da-x@monatomic.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-21x86_64: fake pxm-to-node mapping for fake numaDavid Rientjes
For NUMA emulation, our SLIT should represent the true NUMA topology of the system but our proximity domain to node ID mapping needs to reflect the emulated state. When NUMA emulation has successfully setup fake nodes on the system, a new function, acpi_fake_nodes() is called. This function determines the proximity domain (_PXM) for each true node found on the system. It then finds which emulated nodes have been allocated on this true node as determined by its starting address. The node ID to PXM mapping is changed so that each fake node ID points to the PXM of the true node that it is located on. If the machine failed to register a SLIT, then we assume there is no special requirement for emulated node affinity so we use the default LOCAL_DISTANCE, which is newly exported to this code, as our measurement if the emulated nodes appear in the same PXM. Otherwise, we use REMOTE_DISTANCE. PXM_INVAL and NID_INVAL are also exported to the ACPI header file so that we can compare node_to_pxm() results in generic code (in this case, the SRAT code). Cc: Len Brown <lenb@kernel.org> Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-21x86_64: various cleanups in NUMA scan nodeDavid Rientjes
In acpi_scan_nodes(), we immediately return -1 if acpi_numa <= 0, meaning we haven't detected any underlying ACPI topology or we have explicitly disabled its use from the command-line with numa=noacpi. acpi_table_print_srat_entry() and acpi_table_parse_srat() are only referenced within drivers/acpi/numa.c, so we can mark them as static and remove their prototypes from the header file. Likewise, pxm_to_node_map[] and node_to_pxm_map[] are only used within drivers/acpi/numa.c, so we mark them as static and remove their externs from the header file. The automatic 'result' variable is unused in acpi_numa_init(), so it's removed. Signed-off-by: David Rientjes <rientjes@google.com> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-20Merge branch 'release' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6: [IA64] Prevent people from directly including <asm/rwsem.h>. [IA64] remove time interpolator [IA64] Convert to generic timekeeping/clocksource [IA64] refresh some config files for 64K pagesize [IA64] Delete iosapic_free_rte() [IA64] fallocate system call [IA64] Enable percpu vector domain for IA64_DIG [IA64] Enable percpu vector domain for IA64_GENERIC [IA64] Support irq migration across domain [IA64] Add support for vector domain [IA64] Add mapping table between irq and vector [IA64] Check if irq is sharable [IA64] Fix invalid irq vector assumption for iosapic [IA64] Use dynamic irq for iosapic interrupts [IA64] Use per iosapic lock for indirect iosapic register access [IA64] Cleanup lock order in iosapic_register_intr [IA64] Remove duplicated members in iosapic_rte_info [IA64] Remove block structure for locking in iosapic.c
2007-07-20Pull ia64-clocksource into release branchTony Luck
2007-07-20[IA64] Convert to generic timekeeping/clocksourceTony Luck
This is a merge of Peter Keilty's initial patch (which was revived by Bob Picco) for this with Hidetoshi Seto's fixes and scaling improvements. Acked-by: Bob Picco <bob.picco@hp.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
2007-07-20mm: Remove slab destructors from kmem_cache_create().Paul Mundt
Slab destructors were no longer supported after Christoph's c59def9f222d44bb7e2f0a559f2906191a0862d7 change. They've been BUGs for both slab and slub, and slob never supported them either. This rips out support for the dtor pointer from kmem_cache_create() completely and fixes up every single callsite in the kernel (there were about 224, not including the slab allocator definitions themselves, or the documentation references). Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2007-07-19PM: Introduce pm_power_off_prepareRafael J. Wysocki
Introduce the pm_power_off_prepare() callback that can be registered by the interested platforms in analogy with pm_idle() and pm_power_off(), used for preparing the system to power off (needed by ACPI). This allows us to drop acpi_sysclass and device_acpi that are only defined in order to register the ACPI power off preparation callback, which is needed by pm_power_off() registered in a much different way. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-19ACPI: Do not prepare for hibernation in acpi_shutdownRafael J. Wysocki
Since we are now explicitly calling hibernation_ops->prepare() before hibernation_ops->enter() in hibernation_platform_enter() (defined in kernel/power/disk.c), ACPI should not call acpi_sleep_prepare(ACPI_STATE_S4) from acpi_shutdown(). Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Pavel Machek <pavel@ucw.cz> Cc: Len Brown <lenb@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-19swsusp: introduce restore platform operationsRafael J. Wysocki
At least on some machines it is necessary to prepare the ACPI firmware for the restoration of the system memory state from the hibernation image if the "platform" mode of hibernation has been used. Namely, in that cases we need to disable the GPEs before replacing the "boot" kernel with the "frozen" kernel (cf. http://bugzilla.kernel.org/show_bug.cgi?id=7887). After the restore they will be re-enabled by hibernation_ops->finish(), but if the restore fails, they have to be re-enabled by the restore code explicitly. For this purpose we can introduce two additional hibernation operations, called pre_restore() and restore_cleanup() and call them from the restore code path. Still, they should be called if the "platform" mode of hibernation has been used, so we need to pass the information about the hibernation mode from the "frozen" kernel to the "boot" kernel in the image header. Apparently, we can't drop the disabling of GPEs before the restore because of Bug #7887 .  We also can't do it unconditionally, because the GPEs wouldn't have been enabled after a successful restore if the suspend had been done in the 'shutdown' or 'reboot' mode. In principle we could (and probably should) unconditionally disable the GPEs before each snapshot creation *and* before the restore, but then we'd have to unconditionally enable them after the snapshot creation as well as after the restore (or restore failure)   Still, for this purpose we'd need to modify acpi_enter_sleep_state_prep() and acpi_leave_sleep_state() and we'd have to introduce some mechanism synchronizing the disablind/enabling of the GPEs with the device drivers' .suspend()/.resume() routines and with disable_/enable_nonboot_cpus().  However, this would have affected the suspend (ie. s2ram) code as well as the hibernation, which I'd like to avoid in this patch series. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Cc: Nigel Cunningham <nigel@nigel.suspend2.net> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-18ACPI: Enable C3 even when PM2_control is zeroVenkatesh Pallipadi
On systems that do not have pm2_control_block, we cannot really use ARB_DISABLE before C3. We used to disable C3 totally on such systems. To be compatible with Windows, we need to enable C3 on such systems now. We just skip ARB_DISABLE step before entering the C3-state and assume hardware is handling things correctly. Also, ACPI spec is not clear about pm2_control is _needed_ for C3 or not. We have atleast one system that need this to enable C3. Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-18ACPICA: fix memory leak in acpi_ev_pci_config_region_setup() error pathJesper Juhl
acpi_ev_pci_config_region_setup() leaks pci_id in the error case of "if (!pci_device_node)" Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-18ACPI: dock: fix oops when _DCK evaluation failsDmitry Torokhov
Data returned by acpi_get_name in acpi_buffer is not acpi_object and therefore should not be cast to it, otherwise we'll get an nice oops trying to print error message. Also print name of the ACPI object corresponding to the docking station and elevate severity of the message printed when _DCK fails to KERN_ERR. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Cc: Kristen Carlson Accardi <kristen.c.accardi@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-18Add common orderly_poweroff()Jeremy Fitzhardinge
Various pieces of code around the kernel want to be able to trigger an orderly poweroff. This pulls them together into a single implementation. By default the poweroff command is /sbin/poweroff, but it can be set via sysctl: kernel/poweroff_cmd. This is split at whitespace, so it can include command-line arguments. This patch replaces four other instances of invoking either "poweroff" or "shutdown -h now": two sbus drivers, and acpi thermal management. sparc64 has its own "powerd"; still need to determine whether it should be replaced by orderly_poweroff(). Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> Acked-by: Len Brown <lenb@kernel.org> Signed-off-by: Chris Wright <chrisw@sous-sol.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Randy Dunlap <randy.dunlap@oracle.com> Cc: Andi Kleen <ak@suse.de> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Arnd Bergmann <arnd@arndb.de> Cc: David S. Miller <davem@davemloft.net>
2007-07-16backlight: Convert from struct class_device to struct deviceRichard Purdie
Convert the backlight and LCD classes from struct class_device to struct device since class_device is scheduled for removal. One nasty API break is the backlight power attribute has had to be renamed to bl_power and the LCD power attribute has had to be renamed to lcd_power since the original names clash with the core. I can't see a way around this. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Acked-by: Greg Kroah-Hartman <gregkh@suse.de>