dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

1339 Commits

Author SHA1 Message Date
Matthew Garrett 863c1490e5 ACPI: video: reset brightness on resume
Some machines seem to need the backlight brightness to be reset on resume.
Add support for doing so to the video module.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-07 03:22:57 -05:00
Zhang Rui 7761f638f6 ACPI: video: call ACPI notifier chain for ACPI video notifications
Call notifier chain for display/brightness switch events.
The kernel mode graphics driver is interested in this.

Sign-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-07 03:22:57 -05:00
Zhang Rui 9ee85241fd ACPI: create notifier chain to get hotkey events to graphics driver
Kernel mode graphics drivers need this ACPI notifier chaine
so that they can get notified upon hotkey events.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-07 03:22:57 -05:00
Zhang Rui ba5e122342 ACPI: video: delete unused display switch on hotkey event code
Display switching via ACPI control methods are
not known to work on any platforms.

Further, the X community wants to control the display
switching all by themselves without BIOS/AML involvement.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-07 03:22:57 -05:00
Zhang Rui 8a681a4dee ACPI: video: create "brightness_switch_enabled" modparam
Introduce new module parameter for brightness control.
"brightness_switch_enabled" is set by default which means
nothing changes upon brightness switch events.

When "brightness_switch_enabled" is cleared via
"echo 0 > /sys/module/video/parameters/brightness_switch_enabled",
ACPI will not try to change the brightness level any more.

Either X will take charge of this or users can change the brightness level
by poking /sys/class/backlight/acpi_videoX/...

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-07 03:22:56 -05:00
Len Brown 060195500e Merge branches 'release' and 'wmi-2.6.25' into release 2008-02-07 03:19:43 -05:00
Len Brown 26b6f22366 Merge branches 'release' and 'menlo' into release
Conflicts:

	drivers/acpi/video.c

Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-07 03:18:04 -05:00
Len Brown e5e54bc86a Merge branches 'release' and 'stats' into release 2008-02-07 03:13:36 -05:00
Len Brown 70ec75c5b8 Merge branches 'release', 'misc' and 'misc-2.6.25' into release 2008-02-07 03:13:13 -05:00
Len Brown 4f4ae0d426 Merge branches 'release' and 'ppc-workaround' into release 2008-02-07 03:12:17 -05:00
Len Brown d870ec7281 Merge branches 'release' and 'hp-cid' into release 2008-02-07 03:11:56 -05:00
Len Brown 7924e4f651 Merge branches 'release' and 'gpe-ack' into release 2008-02-07 03:11:47 -05:00
Len Brown 5531d28504 Merge branches 'release' and 'dmi' into release 2008-02-07 03:11:31 -05:00
Len Brown acf63867ae Merge branches 'release', 'cpuidle-2.6.25' and 'idle' into release 2008-02-07 03:11:05 -05:00
Len Brown c64768a7d6 Merge branches 'release', 'bugzilla-6217', 'bugzilla-6629', 'bugzilla-6933', 'bugzilla-7186', 'bugzilla-8269', 'bugzilla-8570', 'bugzilla-9139', 'bugzilla-9277', 'bugzilla-9341', 'bugzilla-9444', 'bugzilla-9614', 'bugzilla-9643' and 'bugzilla-9644' into release 2008-02-07 03:09:43 -05:00
Len Brown 8f859016ea Merge branches 'release' and 'autoload' into release 2008-02-07 03:07:55 -05:00
Len Brown dd07a8db72 Merge branches 'release', 'asus', 'sony-laptop' and 'thinkpad' into release 2008-02-07 03:07:35 -05:00
Len Brown 877c357e75 Merge branches 'release', 'acpi_pm_device_sleep_state' and 'battery' into release 2008-02-07 03:07:03 -05:00
venkatesh.pallipadi@intel.com 9a0b841586 cpuidle: Add a poll_idle method
Add a default poll idle state with 0 latency. Provides an option to users
to use poll_idle by using 0 as the latency requirement.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-07 02:20:15 -05:00
venkatesh.pallipadi@intel.com 9b12e18cdc ACPI: cpuidle: Support C1 idle time accounting
Show C1 idle time in /sysfs cpuidle interface. C1 idle time may not
be entirely accurate in all cases. It includes the time spent
in the interrupt handler after wakeup with "hlt" based C1. But, it will
be accurate with "mwait" based C1.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-07 02:14:16 -05:00
venkatesh.pallipadi@intel.com bc71bec91f ACPI: enable MWAIT for C1 idle
Add MWAIT idle for C1 state instead of halt, on platforms that support
C1 state with MWAIT.

Renames cx->space_id to something more appropriate.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-07 02:12:13 -05:00
venkatesh.pallipadi@intel.com 2e906655ba ACPI: idle: Fix acpi_safe_halt usages and interrupt enabling/disabling
acpi_safe_halt() needs interrupts to be disabled for atomic
need_resched check and safe halt. Otherwise we may miss an
interrupt and go into halt.

acpi_safe_halt() also does not enable interrupts on all return paths.

So the callers should handle enable and disable interrupts around it.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-07 02:11:14 -05:00
Pavel Machek 23b168d425 PM: documentation cleanups
Signed-off-by: Pavel Machek <pavel@suse.cz>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-07 01:27:17 -05:00
Thomas Renninger 443dea72d5 ACPI: Export acpi_check_resource_conflict
Export acpi_check_resource_conflict(), sometimes drivers already have
a struct resource at hand so no need to use the wrappers to build a new
one.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: "Mark M. Hoffman" <mhoffman@lightlink.com>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-07 01:00:23 -05:00
Thomas Renninger df92e69599 ACPI: track opregion names to avoid driver resource conflicts.
Small ACPICA extension to be able to store the name of operation regions in osl.c later

In ACPI, AML can define accesses to IO ports and System Memory by Operation
Regions.  Those are not registered as done by PNPACPI using resource templates
(and _CRS/_SRS methods).

The IO ports and System Memory regions may get accessed by arbitrary AML code.
 When native drivers are accessing the same resources bad things can happen
(e.g.  a critical shutdown temperature of 3000 C every 2 months or so).

It is not really possible to register the operation regions via
request_resource, as they often overlap with pnp or other resources (e.g.
statically setup IO resources below 0x100).

This approach stores all Operation Region declarations (IO and System Memory
only) at ACPI table parse time.  It offers a similar functionality like
request_region and let drivers which are known to possibly use the same IO
ports and Memory which are also often used by ACPI (hwmon and i2c) check for
ACPI interference.

A boot parameter acpi_enforce_resources=strict/lax/no is provided, which
is default set to lax:
  - strict: let conflicting drivers fail to load with an error message
  - lax:    let conflicting driver work normal with a warning message
  - no:     no functional change at all
Depending on the feedback and the kind of interferences we see, this
should be set to strict at later time.

Goal of this patch set is:
  - Identify ACPI interferences in bug reports (very hard to reproduce
    and to identify)
  - Find BIOSes for that an ACPI driver should exist for specific HW
    instead of a native one.
  - stability in general

Provide acpi_check_{mem_}region.

Drivers can additionally check against possible ACPI interference by also
invoking this shortly before they call request_region.
If -EBUSY is returned, the driver must not load.
Use acpi_enforce_resources=strict/lax/no options to:
  - strict: let conflicting drivers fail to load with an error message
  - lax:    let conflicting driver work normal with a warning message
  - no:     no functional change at all

Cc: "Mark M. Hoffman" <mhoffman@lightlink.com>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Len Brown <lenb@kernel.org>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-07 00:59:18 -05:00
Matthias Kaehlcke 1a3b77ae60 ACPI: acpi_pci_irq_find_prt_entry(): use list_for_each_entry() instead of list_for_each()
Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-07 00:51:06 -05:00
Miguel Botón e76d5f7e83 ACPI: remove duplicated warning message
Remove duplicated warning message in acpi_power_transition()

ACPI: Transitioning device [%s] to D%d\n

This warning message is printed by acpi_bus_set_power() so we don't
need to print it again.

Signed-off-by: Miguel Botón <mboton@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-07 00:49:28 -05:00
Luca Tettamanti 31e0729a85 asus_acpi: add support for F3Sa
Add support for ASUS F3Sa notebook. Features:
- LCD on/off
- Brightness
- Wifi kill
- Bluetooth kill

Signed-off-by: Luca Tettamanti <kronos.it@gmail.com>
Cc: Corentin Chary <corentincj@iksaif.net>
Cc: Karol Kozimor <sziwan@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-07 00:46:38 -05:00
Len Brown 5229e87d59 ACPI: create /sys/firmware/acpi/interrupts
See Documentation/ABI/testing/sysfs-firmware-acpi

Based-on-original-patch-by: Luming Yu <luming.yu@intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-06 22:27:06 -05:00
Éric Piel 6ed31e92e9 ACPI: Taint kernel on ACPI table override (format corrected)
When an ACPI table is overridden (for now this can happen only for DSDT)
display a big warning and taint the kernel with flag A.

Signed-off-by: Eric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-06 22:07:51 -05:00
Markus Gaugusch 71fc47a9ad ACPI: basic initramfs DSDT override support
The basics of DSDT from initramfs. In case this option is selected,
populate_rootfs() is called a bit earlier to have the initramfs content
available during ACPI initialization.

This is a very similar path to the one available at
http://gaugusch.at/kernel.shtml but with some update in the
documentation, default set to No and the change of populate_rootfs() the
"Jeff Mahony way" (which avoids reading the initramfs twice).

Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Eric Piel <eric.piel@tremplin-utc.net>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-06 22:07:41 -05:00
maximilian attems 7c2670bbb5 ACPI: battery: add sysfs serial number
egrep serial /proc/acpi/battery/BAT0/info
serial number:           32090

serial number can tell you from the imminent danger
of beeing set on fire.

Signed-off-by: maximilian attems <max@stro.at>
Acked-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-05 21:15:50 -05:00
Carlos Corbacho bff431e49f ACPI: WMI: Add ACPI-WMI mapping driver
The following is an implementation of the Windows Management
Instrumentation (WMI) ACPI interface mapper (PNP0C14).

What it does:

Parses the _WDG method and exports functions to process WMI method calls,
data block query/ set commands (both based on GUID) and does basic event
handling.

How: WMI presents an in kernel interface here (essentially, a minimal
wrapper around ACPI)

(const char *guid assume the 36 character ASCII representation of
a GUID - e.g. 67C3371D-95A3-4C37-BB61-DD47B491DAAB)

wmi_evaluate_method(const char *guid, u8 instance, u32 method_id,
const struct acpi_buffer *in, struct acpi_buffer *out)

wmi_query_block(const char *guid, u8 instance,
struct acpi_buffer *out)

wmi_set_block(const char *guid, u38 instance,
const struct acpi_buffer *in)

wmi_install_notify_handler(acpi_notify_handler handler);

wmi_remove_notify_handler(void);

wmi_get_event_data(u32 event, struct acpi_buffer *out)

wmi_has_guid(const char guid*)

wmi_has_guid() is a helper function to find if a GUID exists or not on the
system (a quick and easy way for WMI dependant drivers to see if the
the method/ block they want exists, since GUIDs are supposed to be unique).

Event handling - allow a WMI based driver to register a notifier handler
for each GUID with WMI. When a notification is sent to a GUID in WMI, the
handler registered with WMI is then called (it is left to the caller to
ask for the WMI event data associated with the GUID, if needed).

What it won't do:

Unicode - The MS article[1] calls for converting between ASCII and Unicode (or
vice versa) if a GUID is marked as "string". This is left up to the calling
driver.

Handle a MOF[1] - the WMI mapper just exports methods, data and events to
userspace. MOF handling is down to userspace.

Userspace interface - this will be added later.

[1] http://www.microsoft.com/whdc/system/pnppwr/wmi/wmi-acpi.mspx

===
ChangeLog
==

v1 (2007-10-02):

* Initial release

v2 (2007-10-05):

* Cleaned up code - split up super "wmi_evaluate_block" -> each external
  symbol now handles its own ACPI calls, rather than handing off to
  a "super" method (and in turn, is a lot simpler to read)
* Added a find_guid() symbol - return true if a given GUID exists on
  the system
* wmi_* functions now return type acpi_status (since they are just
  fancy wrappers around acpi_evaluate_object())
* Removed extra debug code

v3 (2007-10-27)

* More code clean up - now passes checkpatch.pl
* Change data block calls - ref MS spec, method ID is not required for
  them, so drop it from the function parameters.
* Const'ify guid in the function call parameters.
* Fix _WDG buffer handling - copy the data to our own private structure.
* Change WMI from tristate to bool - otherwise the external functions are
  not exported in linux/acpi.h if you try to build WMI as a module.
* Fix more flag comparisons.
* Add a maintainers entry - since I wrote this, I should take the blame
  for it.

v4 (2007-10-30)

* Add missing brace from after fixing checkpatch errors.
* Rewrote event handling - allow external drivers to register with WMI to
  handle WMI events
* Clean up flags and sanitise flag handling

v5 (2007-11-03)

* Add sysfs interface for userspace. Export events over netlink again.
* Remove module left overs, fully convert to built-in driver.
* Tweak in-kernel API to use u8 for instance, since this is what the GUID
  blocks use (so instance cannot be greater than u8).
* Export wmi_get_event_data() for in kernel WMI drivers.

v6 (2007-11-07)

* Split out userspace into a different patch

v7 (2007-11-20)

* Fix driver to handle multiple PNP0C14 devices - store all GUIDs using
  the kernel's built in list functions, and just keep adding to the list
  every time we handle a PNP0C14 devices - GUIDs will always be unique,
  and WMI callers do not know or care about different devices.
* Change WMI event handler registration to use its' own event handling
  struct; we should not pass an acpi_handle down to any WMI based drivers
  - they should be able to function with only the calls provided in WMI.
* Update my e-mail address

v8 (2007-11-28)

* Convert back to a module.
* Update Kconfig to default to building as a module.
* Remove an erroneous printk.
* Simply comments for string flag (since we now leave the handling to the
  caller).

v9 (2007-12-07)

* Add back missing MODULE_DEVICE_TABLE for autoloading
* Checkpatch fixes

v10 (2007-12-12)

* Workaround broken GUIDs declared expensive without a WCxx method.
* Minor cleanups

v11 (2007-12-17)

* More fixing for broken GUIDs declared expensive without a WCxx method.
* Add basic EmbeddedControl region handling.

v12 (2007-12-18)

* Changed EC region handling code, as per Alexey's comments.

v13 (2007-12-27)

* Changed event handling so that we can have one event handler registered
  per GUID, as per Matthew Garrett's suggestion.

v14 (2008-01-12)

* Remove ACPI debug statements

v15 (2008-02-01)

* Replace two remaining 'x == NULL' type tests with '!x'

v16 (2008-02-05)

* Change MAINTAINERS entry, as I am not, and never have been, paid to work
  on WMI
* Remove 'default' line from Kconfig

Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
CC: Matthew Garrett <mjg59@srcf.ucam.org>
CC: Alexey Starikovskiy <aystarik@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-05 15:06:40 -05:00
Len Brown a64217b922 ACPI: blacklist update
move some OSI(Linux) to "disable" from "unknown"
to reduce dmesg lines that we don't really need.

update Acer 5315 comment
update Dell entries, add R200 entry
update Apple entries

Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-05 14:43:38 -05:00
Mark Gross f011e2e2df latency.c: use QoS infrastructure
Replace latency.c use with pm_qos_params use.

Signed-off-by: mark gross <mgross@linux.intel.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: Len Brown <lenb@kernel.org>
Cc: Jaroslav Kysela <perex@suse.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-05 09:44:22 -08:00
Adrian Bunk 1d15d84e8b ACPI: make struct osi_linux static
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-03 17:37:02 -05:00
Adrian Bunk 12d3931c10 ACPI: make acpi_dmi_dump() static
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-03 17:37:02 -05:00
Len Brown d0280a02f7 ACPI: update blacklist comments
...based on additional feedback -- no code change.

Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-03 17:37:02 -05:00
Len Brown e6298c6d60 DMI: remove duplicate helper routine
Use existing dmi_get_system_info(),
Delete duplicate dmi_get_slot()

Spotted-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-03 17:37:02 -05:00
Len Brown 8964ebb8c3 ACPI: remove redundant Acer blacklist entry
dmi_check_system() does sub-string matching using strstr(),
rather than exact string compares with !strcmp().

So delete the longer of the Acer blacklist entries, as its
function is just a redundant console message.

Spotted-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-03 17:37:02 -05:00
Joe Perches 3c5f9be461 drivers/acpi/: Spelling fixes
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
2008-02-03 17:06:17 +02:00
Len Brown 3c60284052 ACPI: fan: build fix for CONFIG_ACPI_PROCFS=n
drivers/acpi/fan.c:340: error: ‘acpi_fan_dir’ undeclared (first use in this function)

Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-02 04:05:54 -05:00
Len Brown 3391a76f2b ACPI: throttling: fix build warning
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-02 03:56:18 -05:00
Zhao Yakui 33a2a529f7 ACPI: Update the t-state for every affected cpu when t-state is changed
According to ACPI spec, the _TSD object provides T-state control cross
logical processor dependency information to OSPM. So the t-state
coordination should be considered when T-state for one cpu is changed.

According to ACPI spec, three types of coordination are defined.
SW_ALL, SW_ANY and HW_ALL.

SW_ALL: it means that OSPM needs to initiate T-state transition on
all processors in the domain. It is necessary to call throttling set function
for all affected cpus.

SW_ANY: it means that OSPM may initiate T-state transition on any processor in
the domain.

HW_ALL: Spec only says that hardware will perform the coordination and doesn't
recommend how OSPM coordinate T-state among the affected cpus. So it is treated
as the type of SW_ALL. It means that OSPM needs to initiate t-state transition
on all the processors in the domain.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-02 02:31:43 -05:00
Zhao Yakui e4aa5cb213 ACPI : Add T-state event notifier function
The t-state coordination should be considered when T-state for one cpu
is changed.It means that OSPM should select one proper target T-state for
the all affected cpus before updating T-state.

So the function of acpi_processor_throttling_notifier is added.
Before updating T-state it can be called for all  the affected cpus to get
the proper target T-state, which can meet the requirement of thermal, user and
_TPC. After updating T-state, it can be called to update T-state flag.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-02 02:30:21 -05:00
Zhao Yakui 1180509f6b ACPI : Update T-state coordination after getting _TSD info
Accordint to ACPI spec, the _TSD object provides T-state control cross
logical processor dependency information to OSPM.
After the _TSD data for all cpus are obtained, OSPM will set up
the T-state coordination between CPUs.

Of course if the _TSD doesn't exist or _TSD data is incorrect , it is
assumed that there is no T-state coordination and T-state is changed
independently.

Now there is no proper solution to update T-state coordination after
one cpu is hotplugged. So this patch won't support hotplugged cpu very well.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-02 02:30:11 -05:00
Zhao Yakui 87654273ef ACPI : Check parameter when calling acpi_processor_get/set_throttling
It is necessary to check the parameter when calling the function of
acpi_processor_get/set_throttling function so as to avoid the NULL
pointer reference in pr or throttling.

http://bugzilla.kernel.org/show_bug.cgi?id=9747

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-02 02:29:58 -05:00
Matthew Garrett 0119509c4f ACPI: video: Ignore devices that aren't present in hardware
Vendors often ship machines with a choice of integrated or discrete
graphics, and use the same DSDT for both. As a result, the ACPI video
module will locate devices that may not exist on this specific platform.
Attempt to determine whether the device exists or not, and abort the
device creation if it doesn't.

http://bugzilla.kernel.org/show_bug.cgi?id=9614

Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org>
Acked-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-02 02:15:52 -05:00
Zhang Rui 653a00c966 ACPI: thermal fixup
The alias name may be used in _PSL, _ALx and _TZD,
so we bind the cooling device only if the acpi_device node matches.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Thomas Sujith <sujith.thomas@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01 23:21:03 -05:00
Zhang Rui 041d4bbf12 ACPI: CELSIUS_TO_KELVIN fixup
Fix an imprecision in CELSIUS_TO_KELVIN and move these
two macroes to a proper place.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Thomas Sujith <sujith.thomas@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01 23:20:26 -05:00
Zhang Rui 207339398e ACPI: attach thermal zone info
Intel menlow driver needs to get the pointer of themal_zone_device
structure of an ACPI thermal zone.
Attach this to each ACPI thermal zone device object.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Thomas Sujith <sujith.thomas@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01 23:20:20 -05:00
Zhang Rui 702ed512de ACPI: register ACPI Video LCD as generic thermal cooling device
Register ACPI video device as thermal cooling devices as they may be listed
in _TZD method and the backlight control can be used for throttling.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Thomas Sujith <sujith.thomas@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01 23:18:33 -05:00
Zhang Rui d9460fd227 ACPI: register ACPI Processor as generic thermal cooling device
Register ACPI processor as thermal cooling devices.
A combination of processor T-state and P-state are used for thermal throttling.
the processor will reduce the frequency first and then set the T-state.

we use cpufreq_thermal_reduction_pctg to calculate the cpufreq limit,
and call cpufreq_verify_with_limit to set the cpufreq limit.
if cpufreq driver is loaded, then we have four cooling state for cpufreq control.
cooling state 0: cpufreq limit == max_freq
cooling state 1: cpufreq limit == max_freq * 80%
cooling state 2: cpufreq limit == max_freq * 60%
cooling state 3: cpufreq limit == max_freq * 40%

after the cpufreq limit is set to 40 percentage of the max_freq,
we use T-state for cooling.

eg. a processor has P-state support, and it has 8 T-state (T0-T7),
the max_state of the proceesor is 10:

state	cpufreq-limit  T-state
0:	max_freq	T0
1:	max_freq * 80%	T0
2:	max_freq * 60%	T0
3:	max_freq * 40%	T0
4:	max_freq * 40%	T1
5:	max_freq * 40%	T2
6:	max_freq * 40%	T3
7:	max_freq * 40%	T4
8:	max_freq * 40%	T5
9:	max_freq * 40%	T6
10:	max_freq * 40%	T7

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Thomas Sujith <sujith.thomas@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01 23:18:19 -05:00
Zhang Rui 05a83d9722 ACPI: register ACPI Fan as generic thermal cooling device
Register ACPI Fan as thermal cooling device.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Thomas Sujith <sujith.thomas@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01 23:17:18 -05:00
Zhang Rui ce44e19701 ACPI: ACPI thermal zone handle notification correctly
Change the ACPI thermal action upon notification 0x81 and 0x82.

According to the ACPI spec, we should:
re-evaluate _PSV and _ACx methods upon notification 0x81
re-evaluate _PSL and _ALx and _TZD upon notificaiton 0x82.
But the current code re-evaluates all the trip points for 0x81 while
only re-evaluates _TZD for 0x82.

Fix this violation of ACPI spec.

TODO: devices in _PSL, _ALx and _TZD may change after a notification 0x82.
      At this time, we need to re-bind the cooling devices with the thermal zone.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Thomas Sujith <sujith.thomas@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01 23:12:19 -05:00
Zhang Rui 3f655ef8c4 ACPI: register ACPI thermal zone as generic thermal zone devices
Register ACPI thermal zone as thermal zone device.

the new sys I/F for ACPI thermal zone will be like this:

/sys/class/thermal:
|thermal_zone1:
	|-----type:			"ACPI thermal zone". RO
	|-----temp:			the current temperature. RO
	|-----mode:			the current working mode. RW.
					the default value is "kernel"  which means  thermal
					management is done by ACPI thermal driver.
					"echo user > mode" prevents all the ACPI thermal driver
					actions upon any trip points.
	|-----trip_point_0_temp:	the threshold of trip point 0. RO.
	|-----trip_point_0_type:	"critical". RO.
					the type of trip point 0
					This may be one of critical/hot/passive/active[x]
					for an ACPI thermal zone.
	...
	|-----trip_point_3_temp:
	|-----trip_point_3_type:	"active[1]"

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Thomas Sujith <sujith.thomas@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01 23:12:19 -05:00
Matthew Garrett 38531e6fe5 ACPI: video: Rationalise ACPI backlight implementation
The sysfs backlight class provides no mechanism for querying the
acceptable brightness for a backlight. The ACPI spec states that values
are only valid if they are reported as available by the firmware. Since
we can't provide that information to userspace, instead collapse the
range to the number of actual values that can be set.

http://bugzilla.kernel.org/show_bug.cgi?id=9277

Signed-off-by: Matthew Garrett <mjg59@srcf.ucam.org>
Acked-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01 22:43:31 -05:00
Rafael J. Wysocki c9b6c8f68e ACPI: Print message before calling _PTS
Make acpi_sleep_prepare() static and cause it to print a message
specifying the ACPI system sleep state to be entered (helpful for
debugging the suspend/hibernation code).

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01 18:30:58 -05:00
Rafael J. Wysocki 7258ec5d11 ACPI hibernation: Call _PTS before suspending devices
The ACPI 1.0 specification wants us to put devices into low power
states after executing the _PTS global control method, while ACPI
2.0 and later want us to do that in the reverse order.  The current
hibernation code follows ACPI 2.0 in that respect which may cause some
ACPI 1.0x systems to hang during hibernation (ref.
http://bugzilla.kernel.org/show_bug.cgi?id=9528).

Make the hibernation code execute _PTS before putting devices into
low power states (ie. in accordance with ACPI 1.0x) with the
possibility to override that using the 'acpi_new_pts_ordering' kernel
command line option.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01 18:30:58 -05:00
Rafael J. Wysocki caea99ef33 Hibernation: Introduce begin() and end() callbacks
Introduce global hibernation callback .end() and rename global
hibernation callback .start() to .begin(), in analogy with the
recent modifications of the global suspend callbacks.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01 18:30:58 -05:00
Rafael J. Wysocki 60417f5976 ACPI suspend: Call _PTS before suspending devices
The ACPI 1.0 specification wants us to put devices into low power
states after executing the _PTS global control method, while ACPI
2.0 and later want us to do that in the reverse order.  The current
suspend code follows ACPI 2.0 in that respect which causes some
ACPI 1.0x systems to hang during suspend (ref.
http://bugzilla.kernel.org/show_bug.cgi?id=9528).

Make the suspend code execute _PTS before putting devices into low
power states (ie. in accordance with ACPI 1.0x) and provide a command
line option to override the default if need be.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01 18:30:58 -05:00
Rafael J. Wysocki 3c1d2b6085 ACPI: Separate disabling of GPEs from _PTS
The preparation to enter an ACPI system sleep state is now tied to
the disabling of GPEs, but the GPEs should not be disabled before
suspending devices.  Since on ACPI 1.0x systems the _PTS global
control method should be executed before suspending devices, we
need to disable GPEs separately.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01 18:30:56 -05:00
Rafael J. Wysocki c95d47a868 ACPI: Separate invocations of _GTS and _BFS from _PTS and _WAK
The execution of ACPI global control methods _GTS and _BFS is
currently tied to the preparation to enter a sleep state and to the
leaving of the sleep state, respectively.  However, these functions
are called before disabling the nonboot CPUs and after enabling
them, respectively (in fact, on ACPI 1.0x systems the first of them
ought to be called before suspending devices), while according to the
ACPI specification, _GTS is to be executed right prior to entering
the system sleep state and _BFS is to be executed right after the
platfor firmware has returned control to the OS on wake up.

Move the execution of _GTS and _BFS to the right places.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01 18:30:56 -05:00
Rafael J. Wysocki c697eecebc Suspend: Introduce begin() and end() callbacks
On ACPI systems the target state set by acpi_pm_set_target() is
reset by acpi_pm_finish(), but that need not be called if the
suspend fails.  All platforms that use the .set_target() global
suspend callback are affected by analogous issues.

For this reason, we need an additional global suspend callback that
will reset the target state regardless of whether or not the suspend
is successful.  Also, it is reasonable to rename the .set_target()
callback, since it will be used for a different purpose on ACPI
systems (due to ACPI 1.0x code ordering requirements).

Introduce the global suspend callback .end() to be executed at the
end of the suspend sequence and rename the .set_target() global
suspend callback to .begin().

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01 18:30:56 -05:00
Shaohua Li a3627f67b1 ACPI: clear GPE earily in resume to avoid warning
Wakeup GPE hasn't a handler. If system is waked up by such GPE like a
USB hotplug, I saw a lot of error reporting the GPE hasn't handler.
acpi_leave_sleep_state will clear the GPE but it's too late, we should
do it before interrupt is re-enabled.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01 18:30:55 -05:00
Rafael J. Wysocki 964756a52f ACPI: Fix mismerge in acpi_hibernation_finish
Some code in acpi_hibernation_finish() was moved to acpi_hibernation_leave(),
but the old copy had been left (it's harmless, but also useless).  Remove it.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-02-01 18:30:53 -05:00
Andi Kleen ddb25f9ac1 x86: don't disable TSC in any C states on AMD Fam10h
The ACPI code currently disables TSC use in any C2 and C3
states. But the AMD Fam10h BKDG documents that the TSC
will never stop in any C states when the CONSTANT_TSC bit is
set. Make this disabling conditional on CONSTANT_TSC
not set on AMD.

I actually think this is true on Intel too for C2 states
on CPUs with p-state invariant TSC, but this needs
further discussions with Len to really confirm :-)

So far it is only enabled on AMD.

Cc: lenb@kernel.org

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-01-30 13:32:41 +01:00
Venki Pallipadi bde6f5f59c x86: voluntary leave_mm before entering ACPI C3
Aviod TLB flush IPIs during C3 states by voluntary leave_mm()
before entering C3.

The performance impact of TLB flush on C3 should not be significant with
respect to C3 wakeup latency. Also, CPUs tend to flush TLB in hardware while in
C3 anyways.

On a 8 logical CPU system, running make -j2, the number of tlbflush IPIs goes
down from 40 per second to ~ 0. Total number of interrupts during the run
of this workload was ~1200 per second, which makes it ~3% savings in wakeups.

There was no measurable performance or power impact however.

[ akpm@linux-foundation.org: symbol export fixes. ]

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-01-30 13:32:01 +01:00
Kay Sievers af5ca3f4ec Driver core: change sysdev classes to use dynamic kobject names
All kobjects require a dynamically allocated name now. We no longer
need to keep track if the name is statically assigned, we can just
unconditionally free() all kobject names on cleanup.

Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24 20:40:40 -08:00
Greg Kroah-Hartman a77aa28a2d Kobject: change drivers/acpi/system.c to use kobject_create_and_add
Stop using kobject_register for this static kobject, as it's overkill.
This way is much simpler.

Cc: Len Brown <len.brown@intel.com>
Cc: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24 20:40:28 -08:00
Greg Kroah-Hartman f62ed9e33b firmware: change firmware_kset to firmware_kobj
There is no firmware "subsystem" it's just a directory in /sys that
other portions of the kernel want to hook into.  So make it a kobject
not a kset to help alivate anyone who tries to do some odd kset-like
things with this.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24 20:40:23 -08:00
Greg Kroah-Hartman 99e0d2fc6c kobject: convert /sys/firmware/acpi/ to use kobject_create
We don't need a kset here, a simple kobject will do just fine, so
dynamically create the kobject and use it.

Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24 20:40:23 -08:00
Greg Kroah-Hartman 3514faca19 kobject: remove struct kobj_type from struct kset
We don't need a "default" ktype for a kset.  We should set this
explicitly every time for each kset.  This change is needed so that we
can make ksets dynamic, and cleans up one of the odd, undocumented
assumption that the kset/kobject/ktype model has.

This patch is based on a lot of help from Kay Sievers.

Nasty bug in the block code was found by Dave Young
<hidave.darkstar@gmail.com>

Cc: Kay Sievers <kay.sievers@vrfy.org>
Cc: Dave Young <hidave.darkstar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-24 20:40:10 -08:00
Len Brown 63eac9badb Pull dmi-2.6.24 into release branch 2008-01-23 23:50:01 -05:00
Len Brown 3645ca8359 Pull bugzilla-9798 into release branch 2008-01-23 23:48:46 -05:00
Len Brown 0f23a6b0c1 Pull bugzilla-8459 into release branch 2008-01-23 23:48:33 -05:00
Len Brown ec68373c04 Revert "ACPI: Fan: Drop force_power_state acpi_device option"
This reverts commit 93ad7c07ad.

http://bugzilla.kernel.org/show_bug.cgi?id=9798

Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-23 22:41:20 -05:00
Márton Németh d772b3b323 ACPI: EC: "DEBUG" needs to be defined earlier
The "DEBUG" symbol needs to be defined before #including <linux/kernel.h> to
get the pr_debug() working.

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-23 22:34:09 -05:00
Márton Németh 86dae0154a ACPI: EC: add leading zeros to debug messages
Add leading zeros to pr_debug() calls. For example if x=0x0a, the format
"0x%2x" will result the string "0x a", the format "0x%2.2x" will result "0x0a".

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-23 22:33:06 -05:00
Alexey Starikovskiy 03d1d99c55 ACPI: EC: fix dmesg spam regression
Return OBF_1 optimization workaround

http://bugzilla.kernel.org/show_bug.cgi?id=8459

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-23 22:28:34 -05:00
Len Brown a1bd4e35e8 ACPI: DMI blacklist to reduce console warnings on OSI(Linux) systems.
This DMI blacklist reduces the console messages
on systems which have a BIOS that invokes OSI(Linux).

As the DMI blacklist already knows about these systems,
the request for DMI info itself is disabled.

Further, if OSI(Linux) has already been determined
to have no beneift, we disable the console message
requesting acpi_osi=Linux test results.

Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-23 21:28:12 -05:00
Len Brown 98f1db22d7 ACPI: Add ThinkPad R61, ThinkPad T61 to OSI(Linux) white-list
acpi_osi=Linux helps sound on these systems.

Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-23 21:26:28 -05:00
Len Brown d4b7dc499d ACPI: make _OSI(Linux) console messages smarter
If BIOS invokes _OSI(Linux), the kernel response
depends on what the ACPI DMI list knows about the system,
and that is reflectd in dmesg:

1) System unknown to DMI:

ACPI: BIOS _OSI(Linux) query ignored
ACPI: DMI System Vendor: LENOVO
ACPI: DMI Product Name: 7661W1P
ACPI: DMI Product Version: ThinkPad T61
ACPI: DMI Board Name: 7661W1P
ACPI: DMI BIOS Vendor: LENOVO
ACPI: DMI BIOS Date: 10/18/2007
ACPI: Please send DMI info above to linux-acpi@vger.kernel.org
ACPI: If "acpi_osi=Linux" works better, please notify linux-acpi@vger.kernel.org

2) System known to DMI, but effect of OSI(Linux) unknown:

ACPI: DMI detected: Lenovo ThinkPad T61
...
ACPI: BIOS _OSI(Linux) query ignored via DMI
ACPI: If "acpi_osi=Linux" works better, please notify linux-acpi@vger.kernel.org

3) System known to DMI, which disables _OSI(Linux):

ACPI: DMI detected: Lenovo ThinkPad T61
...
ACPI: BIOS _OSI(Linux) query ignored via DMI

4) System known to DMI, which enable _OSI(Linux):

ACPI: DMI detected: Lenovo ThinkPad T61
ACPI: Added _OSI(Linux)
...
ACPI: BIOS _OSI(Linux) query honored via DMI

cmdline overrides take precidence over the built-in
default and the DMI prescribed default.
cmdline "acpi_osi=Linux" results in:

ACPI: BIOS _OSI(Linux) query honored via cmdline

Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-23 21:26:15 -05:00
Len Brown 7ce95ce5c6 ACPI: Delete Intel Customer Reference Board (CRB) from OSI(Linux) DMI list
Linux does not want BIOS writers to invoke _OSI(Linux) -
for in the field it causes more Windows incompatibility problems
than it solves.

So when it is seen in the BIOS for an Intel Customer Reference Board,
Linux should ignore its effect by default, and should complain loudly.
Otherwise, the reference BIOS will go unfixed, and the bad BIOS
will spread to the field.

Users of this board can get the old behavior with "acpi_osi=Linux"

As this was the only entry, delete acpi_osl_dmi_table[].

Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-23 21:24:13 -05:00
Len Brown f40cd6fddc ACPI: on OSI(Linux), print needed DMI rather than requesting dmidecode output
Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-23 21:23:51 -05:00
Len Brown 5a4e143271 ACPI: create acpi_dmi_dump()
A utility routine to print common entries used
for ACPI-related DMI blacklist entries.

Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-23 21:23:29 -05:00
Andrew Patterson 02f8a85865 ACPI: Check for any matching CID when walking namespace.
The callback function acpi_ns_get_device_callback called from
acpi_get_devices() will check CID's if the HID does not match.  This code
has a bug where it requires that all CIDs match the HID. Changed the code
so that any CID match will do.

Signed-off-by: Andrew Patterson <andrew.patterson@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-23 14:43:44 -05:00
Alexey Starikovskiy d1154be300 ACPI: processor: Fix null pointer dereference in throttling
http://bugzilla.kernel.org/show_bug.cgi?id=9747

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-15 00:47:47 -05:00
Dave Jones 37748ebf88 ACPI: remove P2B-S from blacklist.
According to http://bugzilla.kernel.org/show_bug.cgi?id=6933
The latest BIOS for the P2B-S works fine.
Remove it from the blacklist.

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-12 19:28:56 -05:00
Rafael J. Wysocki ad3399c378 ACPI: Fix acpi_pm_device_sleep_state()
Fix acpi_pm_device_sleep_state() to return the value returned
by _SxD if the device is supposed to wake up the system from
given sleep state and the evaluation of _SxW fails (e.g. _SxW
is not present).

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-11 23:21:52 -05:00
Len Brown 8df042e85c Pull bugzilla-9683 into release branch 2008-01-11 12:28:38 -05:00
Len Brown 456212017b Pull bugzilla-9627 into release branch 2008-01-11 12:28:22 -05:00
Len Brown 4e1b83ad61 Pull bugzilla-9494 into release branch 2008-01-11 12:27:32 -05:00
Len Brown 02d5bccf8e Pull bugzilla-9194 into release branch 2008-01-11 12:27:13 -05:00
Len Brown 9f9adecd2d PM: ACPI and APM must not be enabled at the same time
ACPI and APM used "pm_active" to guarantee that
they would not be simultaneously active.

But pm_active was recently moved under CONFIG_PM_LEGACY,
so that without CONFIG_PM_LEGACY, pm_active became a NOP --
allowing ACPI and APM to both be simultaneously enabled.
This caused unpredictable results, including boot hangs.

Further, the code under CONFIG_PM_LEGACY is scheduled
for removal.

So replace pm_active with pm_flags.
pm_flags depends only on CONFIG_PM,
which is present for both CONFIG_APM and CONFIG_ACPI.

http://bugzilla.kernel.org/show_bug.cgi?id=9194

Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
2008-01-11 12:26:47 -05:00
Len Brown aa7f00741d Pull bugzilla-8171 into release branch 2008-01-11 12:22:57 -05:00
Bob Moore 014d433f35 ACPICA: fix acpi_serialize hang regression
http://bugzilla.kernel.org/show_bug.cgi?id=8171

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-10 23:04:10 -05:00
Alan Cox 96c2a8766b ACPI : Not register gsi for PCI IDE controller in legacy mode
When PCI IDE controller works in legacy mode and no PRT entry is found
in ACPI PRT table, OSPM will neither read the irq number from the IDE
PCI configuration space nor call the function of acpi_register_gsi to
register gsi.

http://bugzilla.kernel.org/show_bug.cgi?id=5637

Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-10 22:49:58 -05:00
Alexey Starikovskiy b3b233c7d9 ACPI: EC: Some hardware requires burst mode to operate properly
Burst mode temporary (50 ms) locks EC to do only transactions with
driver, without it some hardware returns abstract garbage.

Reference: http://bugzilla.kernel.org/show_bug.cgi?id=9341

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-10 20:50:12 -05:00
Alexey Starikovskiy 3e71a87d03 ACPI: EC: Do the byte access with a fast path
Specification allows only byte access for EC region, so
make it separate from bug-compatible multi-byte access.
Also do not allow return of garbage in supplied *value.

Reference: http://bugzilla.kernel.org/show_bug.cgi?id=9341

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-10 20:49:14 -05:00
Zhang Rui cfaf3747ff ACPI: ACPI Exception (): AE_NOT_FOUND, Processor Device is not present
ACPI Exception (acpi_processor-0677): AE_NOT_FOUND, Processor Device is not
present [20060707]

According to the ACPI spec 6.3.7,
"If a device object (including the processor object) does not have an
_STA object, then OSPM assumes that all of the above bits are set,
(in other words, the device is present, enabled, shown in the UI
and funtioning)".

is_processor_present shoud return 1 if the processor device object exists
while it doesn't have an _STA object.

http://bugzilla.kernel.org/show_bug.cgi?id=8570

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-09 02:17:47 -05:00
Venki Pallipadi 5b3f0e6c1c ACPI: Reintroduce run time configurable max_cstate for !CPU_IDLE case
This was writeable in 2.6.23 but the cpuidle merge made it read-only.  But
some people's scripts (ie: Mark's) were writing to it.

As an unhappy compromise, make max_cstate writeable again if the kernel was
configured without CONFIG_CPU_IDLE.

http://bugzilla.kernel.org/show_bug.cgi?id=9683

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Cc: Mark Lord <lkml@rtr.ca>
Cc: Arjan van de Ven <arjan@infradead.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-07 17:50:10 -05:00
Alexey Starikovskiy 97749cd9ad ACPI: Make sysfs interface in ACPI power optional.
Reference: http://bugzilla.kernel.org/show_bug.cgi?id=9494

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-01 14:27:24 -05:00
Alexey Starikovskiy c04209a794 ACPI: EC: Enable boot EC before bus_scan
Some _STA methods called during bus_scan() might require EC region handler,
which might be enabled later in the scan.
Enable it explicitly before scan to avoid errors.

Reference: http://bugzilla.kernel.org/show_bug.cgi?id=9627

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-01 14:12:55 -05:00
Thomas Renninger 623b78c39c ACPI: add "processor.ignore_ppc" hook to workaround BIOS _PPC weirdness
There have been fixes using _PPC, which seem to unhide a problem
on HP nx6125 (double cpufreq switch freezes the machine for
several seconds).

This one should provide a workaround for the nx6125 and for
possible other machines that show any weird _PPC behaviour.

Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-01-01 13:24:38 -05:00
Signed-off by Yi Yang 975c30257e ACPI: detect invalid argument written to /proc/acpi/alarm
/proc/acpi/alarm can't be set correctly, here is a sample:

[root@localhost /]# echo "2006 09" > /proc/acpi/alarm
[root@localhost /]# cat /proc/acpi/alarm
2007-12-09 09:09:09
[root@localhost /]# echo "2006 04" > /proc/acpi/alarm
[root@localhost /]# cat /proc/acpi/alarm
2007-12-04 04:04:04
[root@localhost /]#

Obviously, it is wrong, it should consider it as an invalid input.

after this patch:

[root@localhost /]# echo "2008 09" > /proc/acpi/alarm
-bash: echo: write error: Invalid argument
[root@localhost /]#

Signed-off-by: Yi Yang <yi.y.yang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-12-27 22:19:27 -05:00
Yi Yang 0879802950 ACPI: /proc/acpi/alarm parsing: handle large numbers properly
In function acpi_system_write_alarm in file drivers/acpi/sleep/proc.c,
big sec, min, hr, mo, day and yr are counted twice to get reasonable
values, that is very superfluous, we can do that only once.

In additon, /proc/acpi/alarm can set a related value which can be
specified as YYYY years MM months DD days HH hours MM minutes SS
senconds, it isn't a date, so you can specify as +0000-00-00 96:00:00
, that means 3 days later, current code can't handle such a case.

This patch removes unnecessary code and does with the aforementioned
situation.

Before applying this patch:

[root@localhost /]# cat /proc/acpi/alarm
2007-12-00 00:00:00
[root@localhost /]# echo "0000-00-00 96:180:180" > /proc/acpi/alarm
[root@localhost /]# cat /proc/acpi/alarm
0007-12-02 **:**:**
[root@localhost /]#

After applying this patch:

[root@localhost ~]# echo "2007-12-00 00:00:00" > /proc/acpi/alarm
[root@localhost ~]# cat /proc/acpi/alarm
2007-12-00 00:00:00
[root@localhost ~]# echo "0000-00-00 96:180:180" > /proc/acpi/alarm
[root@localhost ~]# cat /proc/acpi/alarm
0007-12-04 03:03:00
[root@localhost ~]#

Signed-off-by: Yi Yang <yi.y.yang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-12-27 22:04:26 -05:00
Len Brown 6e3013932e Pull bugzilla-9362 into release branch 2007-12-14 15:14:52 -05:00
Alexey Starikovskiy 5a21e4fe58 ACPI: SBS: Return rate in mW if capacity in mWh
klaptopd assumes rate to be in same units as capacity.

http://bugzilla.kernel.org/show_bug.cgi?id=9362

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-12-14 15:14:23 -05:00
Alexey Starikovskiy c2d00f2d1b ACPI: SBS: Ignore alarms coming from unknown devices
http://bugzilla.kernel.org/show_bug.cgi?id=9362

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-12-14 15:14:06 -05:00
Alexey Starikovskiy 09f1fb41ad ACPI: SBS: Reset alarm bit
Alarm bit should be cleared in order for other alarms to be sent.
http://bugzilla.kernel.org/show_bug.cgi?id=9362

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-12-14 15:13:51 -05:00
Len Brown 5889ba0a6a Pull hotplug into release branch 2007-12-14 14:54:09 -05:00
Len Brown 239665a3bb ACPI: tables: complete searching upon RSDP w/ bad checksum.
ACPI tables follow a tree structure in memory.
The root of the tree is the RSDP (Root System Description Pointer).

To find the RSDP, the OS searches for the signature "RSD PTR "
in well known physical memory locations.  Then the OS computes
a table checksum to verify that the signature is really part
of a valid table header.

Some systems have a proper signature but an invalid checksum;
followed elsewhere by a proper signature with valid checksum.

http://bugzilla.kernel.org/show_bug.cgi?id=9444

The Linux RSDP scanning code bailed out on those systems
and as a result they booted with ACPI disabled.

Fix this by deleting the Linux RSDP scanning code and
plugging in the ACPICA RSDP scanning code.

Signed-off-by: Len Brown <len.brown@intel.com>
2007-12-14 02:36:24 -05:00
Len Brown 25de571835 cpuidle: default processor.latency_factor=2
More aggressively request deep C-states.

Note that the job of the OS is to minimize latency
impact to expected break events such as interrupts.

It is not the job of the OS to try to calculate if
the C-state will reach energy break-even.
The platform doesn't give the OS enough information
for it to make that calculation.  Thus, it is up
to the platform to decide if it is worth it to
go as deep as the OS requested it to, or if it
should internally demote to a more shallow C-state.

But the converse is not true.  The platform can not
promote into a deeper C-state than the OS requested
else it may violate latency constraints.  So it is
important that the OS be aggressive in giving the
platform permission to enter deep C-states.

Signed-off-by: Len Brown <len.brown@intel.com>
2007-12-14 00:24:15 -05:00
Len Brown 4963f62045 cpuidle: create processor.latency_factor tunable
Start with default value of 6, so by default,
there is no functional change in this patch.

Signed-off-by: Len Brown <len.brown@intel.com>
2007-12-14 00:09:39 -05:00
Len Brown d020c36685 Pull battery-2.6.24 into release branch 2007-12-13 22:16:14 -05:00
Jan Beulich ffada8913e ACPI: fix modpost warnings
for sn2_defconfig:

WARNING: vmlinux.o(.text+0x4b8601): Section mismatch: reference to .init.data:node_to_pxm_map (between '__acpi_map_pxm_to_node' and 'acpi_get_pxm')
WARNING: vmlinux.o(.text+0x4b8741): Section mismatch: reference to .init.data:pxm_to_node_map (between 'acpi_map_pxm_to_node' and 'acpi_get_node')

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-12-13 17:50:09 -05:00
Jan Beulich 2fdf07417e acpi: make __acpi_map_table() and __init function
.. as it it used only during early boot.

Signed-off-by: Jan Beulich <jbeulich@novell.com>

 arch/ia64/kernel/acpi.c     |    2 +-
 arch/x86/kernel/acpi/boot.c |    4 ++--
 drivers/acpi/osl.c          |    3 ++-
 3 files changed, 5 insertions(+), 4 deletions(-)
Signed-off-by: Len Brown <len.brown@intel.com>
2007-12-13 17:17:50 -05:00
William Lee Irwin III 98934def70 ACPI: video_device_list corruption
The ->cap fields of struct acpi_video_device and struct acpi_video_bus
are 1B each, not 4B. The oversized memset()'s corrupted the subsequent
list_head fields. This resulted in silent corruption without
CONFIG_DEBUG_LIST and BUG's with it. This patch uses sizeof() to pass
the proper bounds to the memset() calls and thereby correct the bugs.

Signed-off-by: William Irwin <wli@holomorphy.com>
Acked-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-12-13 16:24:10 -05:00
Thomas Renninger 17196d6e53 ACPI: Also autoload the bay driver, was forgotten...
Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-12-08 01:51:44 -05:00
Frank Seidel a340af14b4 ACPI: Add autoload info to dock driver
References: https://bugzilla.novell.com/show_bug.cgi?id=302482

Signed-off-by: Thomas Renninger <trenn@novell.com>
Signed-off-by: Kay Sievers <kasievers@novell.com>
Signed-off-by: Frank Seidel <fseidel@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-12-08 01:51:38 -05:00
Frank Seidel 3620f2f2f3 ACPI: Fix autloading of dock, video, bay and all linux specific HID drivers
References: https://bugzilla.novell.com/show_bug.cgi?id=302482

Due to the new autloading of acpi drivers, the dock driver
wasn't loaded anymore as there is no HID to identify it with
(dock is needed if ACPI has a  _DCK method).
This patch is a workaround for this, original by Thomas Renninger,
revised first by Kay Sievers and last by Frank Seidel.
V2 of this patch fixed problems on systems without a defined _CID for
the docking devices.

Signed-off-by: Thomas Renninger <trenn@novell.com>
Signed-off-by: Kay Sievers <kasievers@novell.com>
Signed-off-by: Frank Seidel <fseidel@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-12-08 01:51:27 -05:00
Thomas Gleixner e17bcb43a2 ACPI: move timer broadcast before busmaster disable
The timer broadcast code might access HPET, which should not be
accessed after the busmaster disable.

In acpi_idle_enter_simple() this change also prevents, that we modify
the busmaster state without going actually idle. This might leave the
ACPI bm state in a stale state, when we leave the function early in
the need_resched() check.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
2007-12-07 19:16:17 +01:00
Zhang Rui 223630fe3d export thermal notification to userspace when nocrt is set
module parameter is used to prevent the thermal_zone action upon
critical trip points.
But exporting this notification to userspace is still useful.
By setting nocrt with this patch applied, ACPI will take no action
but exporting the events to userspace upon critical/hot trip points.

http://bugzilla.kernel.org/show_bug.cgi?id=9139

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-12-06 23:36:35 -05:00
Andrey Borzenkov ad40e68bf5 ACPI: battery: fix ACPI battery technology reporting
At least some systems report technology information with trailing spaces:

{pts/1}% cat -E /var/tmp/bat/2.6.23 | grep type
battery type:            Li-ION  $

Use strncasecmp to compare model string to skip trailing part

Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru>
Acked-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-12-06 22:29:22 -05:00
Alexey Starikovskiy 17bc54eef9 ACPI: Defer enabling of level GPE until all pending notifies done
Level GPE should not be enabled until all work caused by it is done,
e.g. all Notify() methods are completed.
This can be accomplished by appending enable_gpe function to the end
of notify queue.

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Acked-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-12-06 21:54:43 -05:00
Len Brown 6ac47735cd Pull bugzilla-9429 into release branch 2007-12-02 14:33:33 -05:00
Len Brown 7ac3ae32d1 Pull thermal into release branch 2007-12-02 14:33:21 -05:00
Bob Moore 152c300d00 ACPICA: fix acpi-cpufreq boot crash due to _PSD return-by-reference
Changed resolution of named references in packages

Fixed a problem with the Package operator where all named
references were created as object references and left otherwise
unresolved. According to the ACPI specification, a Package can
only contain Data Objects or references to control methods. The
implication is that named references to Data Objects (Integer,
Buffer, String, Package, BufferField, Field) should be resolved
immediately upon package creation. This is the approach taken
with this change. References to all other named objects (Methods,
Devices, Scopes, etc.) are all now properly created as reference objects.

http://bugzilla.kernel.org/show_bug.cgi?id=5328
http://bugzilla.kernel.org/show_bug.cgi?id=9429

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-12-02 14:26:55 -05:00
Zhao Yakui 357dc4c3f1 ACPI: Delete the IRQ operation in throttling controll via PTC
The IRQ operation(enable/disable) should be avoided when throttling is
controlled via PTC method. It is replaced by the migration of task.

This fixes an oops on T61 -- a regression due to
f79f06ab9f b/c FixedHW support tried to read remote MSR with interrupts disabled.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-12-01 23:27:15 -05:00
Christoph Lameter fbb43ab03c ACPI: avoid references to impossible processors.
ACPI uses NR_CPUS in various loops and in some it accesses per cpu data of
processors that are not present(!) and that will never be present.

The pointers to per cpu data are typically not initialized for processors
that are not present.  So we seem to be reading something here from offset
0 in memory.

Make ACPI use nr_cpu_ids instead. That stops at the end of the possible
processors.

Convert one loop to NR_CPUS to use the cpu_possible map instead.  That way
ranges of processor that can never be brought online are skipped during the
loop.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: Len Brown <lenb@kernel.org>
Acked-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-29 09:24:55 -08:00
Linus Torvalds ff1ea52fa3 Merge git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86
* git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86:
  x86: fix APIC related bootup crash on Athlon XP CPUs
  time: add ADJ_OFFSET_SS_READ
  x86: export the symbol empty_zero_page on the 32-bit x86 architecture
  x86: fix kprobes_64.c inlining borkage
  pci: use pci=bfsort for HP DL385 G2, DL585 G2
  x86: correctly set UTS_MACHINE for "make ARCH=x86"
  lockdep: annotate do_debug() trap handler
  x86: turn off iommu merge by default
  x86: fix ACPI compile for LOCAL_APIC=n
  x86: printk kernel version in WARN_ON and other dump_stack users
  ACPI: Set max_cstate to 1 for early Opterons.
  x86: fix NMI watchdog & 'stopped time' problem
2007-11-26 19:41:28 -08:00
Alexey Starikovskiy c1c3063446 ACPI: Set max_cstate to 1 for early Opterons.
AMD Opteron processors before CG revision don't like C-states > 1.

This solves the long standing bugzilla #5303 and probably some more
on affected machines:

  http://bugzilla.kernel.org/show_bug.cgi?id=5303

[ tglx@linutronix.de: reworked the patch so it does not wreck ia64 ]

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2007-11-26 20:42:19 +01:00
Len Brown a3f095ade0 Pull bugzilla-9327 into release branch
Conflicts:

	drivers/acpi/ec.c

Signed-off-by: Len Brown <len.brown@intel.com>
2007-11-20 20:07:49 -05:00
Alexey Starikovskiy e790cc8bbb ACPI: EC: Workaround for optimized controllers (version 3)
Some controllers fail to send confirmation GPE after address or data write.
Detect this and don't expect such confirmation in future.
This is a generalization of previous workaround
(66c5f4e736), which did only read address.

Reference: http://bugzilla.kernel.org/show_bug.cgi?id=9327

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Tested-by: Romano Giannetti <romano.giannetti@gmail.com>
Tested-by: Mats Johannesson
Signed-off-by: Len Brown <len.brown@intel.com>
2007-11-20 20:06:15 -05:00
Márton Németh 3ebe08a749 ACPI: EC: use printk_ratelimit(), add some DEBUG mode messages
Sometimes it is usefull to see raw protocol dump.
Uncomment '#define DEBUG' at the beginning of file to make EC
really verbose.

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-11-20 20:04:39 -05:00
Len Brown 0af2f653c5 Revert "ACPI: EC: Workaround for optimized controllers"
This reverts commit f2d68935ba.
2007-11-20 19:59:08 -05:00
Gary Hade 6ce7641b87 ACPI: acpiphp: Remove dmesg spam on device remove
In cases where acpi_pci_bind() does not
attach device data, acpi_pci_unbind()
complains via an ACPI exception about the missing data when
the device is removed.  For example, acpi_pci_bind() does not
attach data for non-existent device functions so when the device
is removed using the ACPI PCI hotplug driver 'acpiphp' an ACPI
exception is logged for every non-existent function.  This patch
avoids the confusing log messages by removing the unnecessary
ACPI exception.

Signed-off-by: Gary Hade <garyhade@us.ibm.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-11-20 19:06:04 -05:00
Zhang Rui a7f9b1f249 ACPI: disable stray GPE, prevent ACPI interrupt storm
GPEs are disabled depending on their type --
WAKE, WAKE_RUN, and RUNTIME.  An error is returned
if we are asked to disable a GPE that has no type.

But at least one system exists that enables a GPE from AML
that is not the EC GPE, and has no _Lxx/_Exx AML handler,
and is thus never initialized.

In this case, when an external CRT is plugged in,
the GPE fires, we attempt to disable the GPE,
but instead just return an error.
So the GPE stays asserted and an ACPI interrupt storm follows.

The fix is to disable a firing GPE,
even if it comes from outer space.

http://bugzilla.kernel.org/show_bug.cgi?id=6217

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Acked-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-11-20 13:42:03 -05:00
Len Brown e6532b8883 Pull fluff into release branch
Conflicts:

	drivers/acpi/ec.c

Signed-off-by: Len Brown <len.brown@intel.com>
2007-11-20 01:21:47 -05:00
Len Brown d89a9bda14 Pull video-2.6.24 into release branch 2007-11-20 01:20:57 -05:00
Len Brown 614a6bbecc Pull thermal into release branch 2007-11-20 01:20:31 -05:00
Len Brown c2e46d2e2a Pull procfs-default into release branch
Conflicts:

	drivers/acpi/sbs.c

Signed-off-by: Len Brown <len.brown@intel.com>
2007-11-20 01:20:00 -05:00
Len Brown 95b00786f3 Pull cpuidle into release branch 2007-11-20 01:18:37 -05:00
Len Brown 22201f7402 Pull bugzilla-9327 into release branch 2007-11-20 01:18:19 -05:00
Len Brown 5824b45126 Pull bugzilla-9262 into release branch 2007-11-20 01:18:07 -05:00
Len Brown 86533e80e0 Pull battery into release branch 2007-11-20 01:17:42 -05:00
Joe Perches 4fdb2a05ef ACPI: Add missing spaces to printk format
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-11-19 21:53:32 -05:00
Venkatesh Pallipadi ddc081a195 cpuidle: fix HP nx6125 regression
Fix for http://bugzilla.kernel.org/show_bug.cgi?id=9355

cpuidle always used to fallback to C2 if there is some bm activity while
entering C3. But, presence of C2 is not always guaranteed. Change cpuidle
algorithm to detect a safe_state to fallback in case of bm_activity and
use that state instead of C2.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-11-19 21:43:22 -05:00
Venkatesh Pallipadi 5062911830 cpuidle: add sched_clock_idle_[sleep|wakeup]_event() hooks
Port 2aa44d0567
(sched: sched_clock_idle_[sleep|wakeup]_event()) to cpuidle.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-11-19 21:32:02 -05:00