Archived
14
0
Fork 0
Commit graph

279 commits

Author SHA1 Message Date
Len Brown
673d5b43da ACPI: restore CONFIG_ACPI_SLEEP
Restore the 2.6.22 CONFIG_ACPI_SLEEP build option, but now shadowing the
new CONFIG_PM_SLEEP option.

Signed-off-by: Len Brown <len.brown@intel.com>
[ Modified to work with the PM config setup changes. ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-29 16:53:59 -07:00
Rafael J. Wysocki
296699de6b Introduce CONFIG_SUSPEND for suspend-to-Ram and standby
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-29 16:45:38 -07:00
Len Brown
323ef30af3 Pull auto-load-modules into release branch 2007-07-25 01:36:53 -04:00
Len Brown
cb3e0c107b Pull d-states into release branch
Conflicts:

	drivers/acpi/sleep/main.c

Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-25 01:36:31 -04:00
Len Brown
e8b2fd0122 ACPI: Kconfig: remove CONFIG_ACPI_SLEEP from source
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-25 01:29:39 -04:00
Thomas Renninger
8c8eb78f67 ACPI: autoload modules - ACPICA modifications
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-23 13:56:00 -04:00
Shaohua Li
fd4aff1a28 ACPI: Add acpi_pm_device_sleep_state helper routine
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-22 04:17:47 -04:00
Len Brown
0d090b6819 Pull netlink into release branch 2007-07-22 04:14:07 -04:00
Len Brown
dcb76f8868 Pull throttle into release branch 2007-07-22 02:28:18 -04:00
Len Brown
f79e3185dd Pull misc into release branch
Conflicts:

	Documentation/feature-removal-schedule.txt
2007-07-22 02:27:40 -04:00
Len Brown
939ab20152 Pull acpi-debug into release branch 2007-07-22 02:22:55 -04:00
Len Brown
d9ff963801 Pull acpica into release branch 2007-07-22 02:22:43 -04:00
Thomas Renninger
798d910398 ACPI: create CONFIG_ACPI_DEBUG_FUNC_TRACE
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-22 02:20:07 -04:00
Dave Jones
4ebf83c8cf ACPI: fix empty macros found by -Wextra
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-22 00:54:24 -04:00
David Rientjes
3484d79813 x86_64: fake pxm-to-node mapping for fake numa
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-21 18:37:10 -07:00
Zhang Rui
864bdfb912 ACPI: Export events via generic netlink
Upon ACPI events, send an "acpi_event" via Generic Netlink.
This is in addition to /proc/acpi/event, which remains intact for now.

Thanks to Jamal for his great help.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-03 14:50:58 -04:00
Bob Moore
a0a3f6c69b ACPICA: Changes for Cygwin compatibility
Allow generation of ACPICA apps on Cygwin.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-03 01:55:36 -04:00
Len Brown
c4d36a822e Pull osi-now into release branch 2007-06-02 01:02:09 -04:00
Bob Moore
6287ee3295 ACPICA: Support for external package objects as method arguments
Implemented support to allow Package objects to be passed as
method arguments to the acpi_evaluate_object interface. Previously,
this would return an AE_NOT_IMPLEMENTED exception.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-06-02 00:20:29 -04:00
Luck, Tony
8ff6f48d99 ACPI: Section mismatch ... acpi_map_pxm_to_node
Last of the "Section mismatch" errors from ia64 builds! acpi_map_pxm_to_node()
is defined with attribute __cpuinit, but is called by "normal" kernel functions
acpi_getnode() and acpi_map_cpu2node().

Commit f363d16fbb moved the data structures on
which this routine operates from __cpuinitdata to regular memory, so this
routine can also move out of init space.

Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-06-02 00:20:07 -04:00
Len Brown
ff55a9ceba ACPI: Lindent processor throttling code
Signed-off-by: Len Brown <len.brown@intel.com>
2007-06-02 00:15:25 -04:00
Luming Yu
01854e697a ACPI: add ACPI 3.0 _TPC _TSS _PTC throttling support
adds _TPC _TSS _PTC -- Throttling Present Capabilities

Signed-off-by: Luming Yu <luming.yu@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-06-02 00:07:47 -04:00
Len Brown
dd272b5716 ACPI: add __init to acpi_initialize_subsystem()
Add __init to:
acpi_initialize_subsystem() (and un-export it)
acpi_os_initialize()

Add __initdata to:
acpi_osl_dmi_table[]

Signed-off-by: Len Brown <len.brown@intel.com>
2007-05-30 00:26:11 -04:00
Len Brown
ae00d81243 ACPI: extend "acpi_osi=" boot option
The boot option "acpi_osi=" has always disabled Linux _OSI support,
thus disabling all OS Interface strings which are advertised
by Linux to the BIOS.

Now...
acpi_osi="string" adds the interface string, and
acpi_osi="!string" invalidates the pre-defined interface string

eg. acpi_osi="!Windows 2006"
would disable Linux's claim of Vista compatibility.

Signed-off-by: Len Brown <len.brown@intel.com>
2007-05-29 18:43:33 -04:00
Aaron Durbin
f363d16fbb acpi: fix potential call to a freed memory section.
Strip __cpuinit[data] from Node <-> PXM routines and supporting data
structures.  Also make pxm_to_node_map and node_to_pxm_map local to the
numa acpi module.

This fixes a bug triggered by the following conditions:
- boot on a machine with a SLIT table defined
- kernel is configured w/ CONFIG_HOTPLUG_CPU=n
- cat /sys/devices/system/node/node*/distance
This will cause an oops by calling into a freed memory section.

In particular, on x86_64, __node_distance calls node_to_pxm().

Signed-off-by: Aaron Durbin <adurbin@google.com>
Cc: Len Brown <lenb@kernel.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-17 05:23:04 -07:00
Len Brown
fd3509436f ACPICA: Lindent
Signed-off-by: Len Brown <len.brown@intel.com>
2007-05-09 23:34:35 -04:00
Len Brown
262a7a28de Revert "ACPICA: fix AML mutex re-entrancy"
This reverts commit c0d127b569.

These changes to AML locking were made to allow
Notify handlers to be called on the stack
and not deadlock.  However, that scheme turns
out to be flawed and was reverted by the previous commit,
so this commit restores the locking to it previous design.

Signed-off-by: Len Brown <len.brown@intel.com>
2007-05-09 23:01:59 -04:00
Len Brown
4d2acd9ea5 Revert "ACPICA: revert "acpi_serialize" changes"
This reverts commit a8f4af6dc6.
Thus restoring ACPICA's new acpi_serialize code.

This commit by itself may cause a regression, but
it is reverted in this order so that subsequent
reverts reverts under this one can be made
without conflict.

Signed-off-by: Len Brown <len.brown@intel.com>
2007-05-09 22:56:38 -04:00
David Brownell
55955aad7c PNPACPI sets pnpdev->dev.archdata
Teach PNPACPI how to hook up its devices to their ACPI nodes, so that
pnpdev->dev.archdata points to the parallel acpi device node.  Previously
this only worked for PCI, leaving a notable hole.

Export "acpi_bus_type" so this can work.

Remove some extraneous whitespace.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Adam Belay <ambx1@neo.rr.com>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Len Brown <lenb@kernel.org>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08 11:15:08 -07:00
Greg Kroah-Hartman
823bccfc40 remove "struct subsystem" as it is no longer needed
We need to work on cleaning up the relationship between kobjects, ksets and
ktypes.  The removal of 'struct subsystem' is the first step of this,
especially as it is not really needed at all.

Thanks to Kay for fixing the bugs in this patch.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-02 18:57:59 -07:00
Shaohua Li
f8993aff8b ACPI: Disable MSI on request of FADT
The ACPI spec defines the bit and Microsoft uses it,
so Linux must use it too.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-04-25 01:13:47 -04:00
Len Brown
f5ea908c8f Pull bugzilla-8171 into release branch 2007-03-20 11:06:00 -04:00
Len Brown
0cd4554df0 ACPI: IA64: fix %ll build warnings
acpi_integer is 64-bits on all platforms, and so was defined as a u64.

i386 and x86_64 define u64 as unsigned long long.
ia64 defines u64 as long.

While these are all 64-bits, the kernel build warns about formating
a "long" with %ll:

drivers/ata/libata-acpi.c:176: warning: long long unsigned int format, acpi_integer arg (arg 5)

So skip using "u64" and define acpi_integer as "unsigned long long"
to make gcc happy with %ll.

Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-19 23:51:36 -04:00
Len Brown
a8f4af6dc6 ACPICA: revert "acpi_serialize" changes
This reverts 977a6226fe
and reverts 1ba753acb3
and updates acpi_ev_queue_notify_request()
to restore the previous implementation of the
"acpi_serialize" workaround.

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

Signed-off-by: Len Brown <len.brown@intel.com>
2007-03-15 04:10:36 -04:00
Len Brown
902b236c08 Pull bugzilla-7887 into release branch 2007-02-16 22:11:57 -05:00
Len Brown
f0e5ed7f32 Pull bugzilla-5534 into release branch 2007-02-16 22:11:21 -05:00
Len Brown
8800c0ebf5 Pull remove-hotkey into release branch 2007-02-16 22:11:02 -05:00
Len Brown
5ee6edbcde ACPI: hotkey: remove driver, per feature-removal-schedule.txt
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-16 21:45:57 -05:00
Len Brown
81450b73dd Pull misc-for-upstream into release branch
Conflicts:

	drivers/usb/misc/appledisplay.c

Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-16 18:52:41 -05:00
Thomas Gleixner
169a0abbe3 [PATCH] ACPI keep track of timer broadcasting
This is a preperatory patch for highres/dyntick:

- replace the big #ifdef ARCH_APICTIMER_STOPS_ON_C3 hackery by functions

- remove the double switch in the power verify function (in the worst case
  we switched ipi to apic and 20usec later apic to ipi)

- keep track of the the state which stops local APIC timer

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Len Brown <len.brown@intel.com>
Cc: <linux-acpi@vger.kernel.org>
Cc: Andi Kleen <ak@suse.de>
Cc: john stultz <johnstul@us.ibm.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-02-16 08:13:58 -08:00
Len Brown
fc955f670c ACPI: remove acpi_os_readable(), acpi_os_writable()
...which are now unused

Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-15 22:19:17 -05:00
Alexey Starikovskiy
c0d127b569 ACPICA: fix AML mutex re-entrancy
ACPI AML supports "serialized" methods which are protected
by an implicit mutex.  The mutex is re-entrant for that AML thread
to allow recursion.

However, Linux implements notify() by creating a new AML thread.
So for systems where notify() re-enters a serialized method,
deadlock results.

The fix is to use the Linux thread_id as the key to allowing
re-entrancy, not the AML thread pointer.

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

Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-15 16:13:16 -05:00
Alexey Starikovskiy
aafbcd165a ACPI: invoke acpi_sleep_init() earlier
late_initcall() is too late for acpi_sleep_init().
Call it directly from acpi_init code.

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

Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@linux.intel.com>
Signed-off-by: Vladimir Lebedev <vladimir.p.lebedev@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-10 01:32:16 -05:00
Andrew Morton
d94d3dff0d ACPI: bay: fix build warning
drivers/acpi/bay.c: In function 'bay_add':
drivers/acpi/bay.c:310: warning: statement with no effect

Fix it by rewriting those macros in C.  Much nicer.

Cc: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-09 01:18:32 -05:00
Len Brown
975a8e3ed2 Pull sysfs into test branch
Conflicts:

	Documentation/feature-removal-schedule.txt
	include/acpi/acpi_drivers.h

Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-03 01:14:35 -05:00
Bob Moore
5763d3c7a0 ACPICA: Update version to 20070126
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:32 -05:00
Bob Moore
6c9deb7201 ACPICA: Update copyright to 2007.
Added 2007 copyright to all module headers and signons. This affects
virtually every file in the ACPICA core subsystem, iASL compiler,
and the utilities.

Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:31 -05:00
Alexey Starikovskiy
11bf04c44f ACPICA: Allow processor to be declared with the Device() instead of Processor()
Allow processor to be declered with the Device(), such as:
Device(CPU1234) {
	Name(_HID, "ACPI007")
	Name(_UID, 1234)
}

Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:31 -05:00
Bob Moore
5008740e27 ACPICA: Update version to 20061215
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:31 -05:00
Bob Moore
d41eb99bac ACPICA: Added option to display memory statistics upon termination.
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:31 -05:00
Valery A. Podrezov
afbb9e659d ACPICA: Enhance debugger statistics/memory command.
Debugger: Enhanced the Statistics/Memory command to emit the
total (maximum) memory used during execution, as well as the
maximum memory consumed by each of the various object types.

Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:31 -05:00
Bob Moore
ea54157851 ACPICA: Update a comment.
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:30 -05:00
Bob Moore
2e23f8513e ACPICA: Debugger multithreading enhancements.
Implemented enhancements to the multithreading support within
the debugger to enable better multithreading evaluation of the subsystem.

Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:30 -05:00
Bob Moore
59fa85057e ACPICA: Removed all 16-bit support.
Support for 16-bit ACPICA has been completely removed since it is
no longer necessary and it clutters the code. All 16-bit macros,
types, and conditional compiles have been removed, cleaning up
and simplifying the code across the entire subsystem.
DOS support is no longer needed since the Linux firmware kit
is now available.

Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:30 -05:00
Bob Moore
ff40c8a3f2 ACPICA: Update version to 20061109
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:30 -05:00
Bob Moore
c857303ad4 ACPICA: Fail AcpiEnable if ACPI tables not loaded.
AcpiEnable will now fail if all of the required ACPI tables are not
loaded (FADT, FACS, DSDT). BZ 477

Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:30 -05:00
Bob Moore
987c21a0b0 ACPICA: Add ACPI_MAX macro
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:30 -05:00
Bob Moore
7c9626bade ACPICA: Ensure that all structures in acobject.h are aligned, via #pragma.
Thus, even if the default compiler setting is non-aligned, the header is compiled
 correctly.

Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:29 -05:00
Alexey Starikovskiy
a6823e12ca ACPICA: Fixes for load() operator.
Optimized the Load operator in the case where the source operand is an
operation region. Simply map the operation region memory, instead of
performing a bytewise read.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:29 -05:00
Alexey Starikovskiy
428f211297 ACPICA: Miscellaneous table manager updates and optimizations
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:29 -05:00
Alexey Starikovskiy
ad363f80c3 ACPICA: Remove duplicate table definitions.
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:28 -05:00
Alexey Starikovskiy
cee324b145 ACPICA: use new ACPI headers.
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:28 -05:00
Bob Moore
a7a22fa9c3 ACPICA: Update version to 20061011
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:28 -05:00
Bob Moore
ec3153fb0e ACPICA: Use manifest constants for parse pass number
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:27 -05:00
Bob Moore
d1fdda83f7 ACPICA: Fix race condition with AcpiWalkNamespace.
Fixed a problem with a possible race condition between threads executing
AcpiWalkNamespace and the AML interpreter. This condition was removed by
modifying AcpiWalkNamespace to (by default) ignore all temporary
namespace entries created during any concurrent control method execution

Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:27 -05:00
Mikhail Kouzmich
4d0b4af958 ACPICA: Restructured module into multiple functions.
Restructured the AML ParseLoop function, breaking it into several
subfunctions in order to reduce CPU stack use and improve maintainability

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:27 -05:00
Bob Moore
2b705a8abb ACPICA: Update version to 20060927
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:27 -05:00
Bob Moore
cb219bb6bf ACPICA: Add new subsystem state bit that is set after SubsystemInitialize is called
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:27 -05:00
Bob Moore
d8c71b6d3b ACPICA: Remove obsolete Flags parameter.
Remove flags parameter for acpi_{get,set}_register().
It is no longer necessary now that these functions use a
spinlock for mutual exclusion.

Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:26 -05:00
Bob Moore
14d64b5e36 ACPICA: Add full table name to disassembler output
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:26 -05:00
Bob Moore
4cdf469090 ACPICA: Update version to 20060912
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:26 -05:00
Bob Moore
7139284460 ACPICA: New common routine for creating and verifying a local FADT.
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:25 -05:00
Bob Moore
ea5d8ebcbb ACPICA: FADT verification is now table driven.
Disassembler now verifies an input

Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:25 -05:00
Bob Moore
775d85b6aa ACPICA: Add declarations for ASF! sub-tables
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:25 -05:00
Bob Moore
cc2a472b84 ACPICA: IsResourceTemplate now returns ACPI_STATUS
to differentiate the failure modes.

Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:25 -05:00
Bob Moore
77389e1263 ACPICA: re-factor table init routines for benefit of iASL
Required new table init interface since iASL does not use RSDP/XSDT.

Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:24 -05:00
Bob Moore
694b0b2092 ACPICA: add ASF comment
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:24 -05:00
Bob Moore
765ec20180 ACPICA: Delete stale FADT functions outside tbfadt.c.
Moved all FADT-related functions to a new file, tbfadt.c.
Eliminated the acpi_hw_initialize function - the
FADT registers are now validated when the table is loaded.

Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:24 -05:00
Bob Moore
1ba753acb3 ACPICA: Re-implement interpreters' "serialized mode"
Enhanced the implementation of the interpreters'
serialized mode (boot with "acpi_serialize" to set
acpi_glb_all_methods_serialized flag.)
When this mode is specified, instead of creating a serialization
semaphore per control method, the interpreter lock is
simply no longer released before a blocking operation
during control method execution. This effectively makes
the AML Interpreter single-threaded. The overhead of a
semaphore per-method is eliminated.

Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:24 -05:00
Bob Moore
0eaa14c028 ACPICA: Update version to 20060831
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:23 -05:00
Bob Moore
84fb2c9773 ACPICA: Split acpi_format_exception into two parts
Split acpi_format_exception into two parts. New
function is acpi_ut_verify_exception and will be used to
verify exception codes returned by user.

Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:23 -05:00
Alexey Starikovskiy
69874165ab ACPICA: Store GPE number instead of bitmask
Update internal GPE data structure to simplify
debug, use gpe_number instead of register bitmask.

Signed-off-by: Bob Moore <bob.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:23 -05:00
Bob Moore
3d81b236a8 ACPICA: Fix unalignment in acpi_ut_repair_name
Update interface to acpi_ut_repair_name() to avoid
alignment issues on IA64

Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:23 -05:00
Bob Moore
c5a7156959 ACPICA: Disable all wake GPEs after first one recieved
Change for GPE support: when a wake GPE is
received, now all wake GPEs are immediately disabled to
prevent the waking GPE from firing again, and to prevent
other wake GPEs from interrupting the wake process.

Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:22 -05:00
Bob Moore
fdffb72d23 ACPICA: Add acpi_gpe_count global to track the number of GPE events
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:22 -05:00
Bob Moore
2502fffb19 ACPICA: Add support for DMAR table
Implement support for ACPI DMAR table (DMA
Remapping Table) in header files and disassembler.

Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:22 -05:00
Alexey Starikovskiy
ad71860a17 ACPICA: minimal patch to integrate new tables into Linux
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:22 -05:00
Bob Moore
8f34890dce ACPICA: Update comments for individual table fields
comments only

Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:22 -05:00
Bob Moore
c5fc42ac4d ACPICA: misc fixes for new Table Manager:
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:21 -05:00
Bob Moore
f3d2e7865c ACPICA: Implement simplified Table Manager
The Table Manager component has been completely
redesigned and reimplemented. The new design is much
simpler, and reduces the overall code and data size of
the kernel-resident ACPICA by approximately 5%. Also,
it is now possible to obtain the ACPI tables very early
during kernel initialization, even before dynamic memory
management is initialized.

Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:21 -05:00
Bob Moore
f93a21c718 ACPICA: Update version to 20060721
Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:21 -05:00
Bob Moore
c81da66608 ACPICA: Delete recursive feature of ACPI Global Lock
Completed a new design and implementation for
the ACPI Global Lock support. On the OS side, the global
lock is now treated as a standard AML mutex. Previously,
multiple OS threads could acquire the global lock
simultaneously, but this could cause the BIOS to be starved
by the lock in cases such as the Embedded Controller driver,
where there is a tight coupling between the OS and the BIOS.

Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 21:14:20 -05:00
Zhang Rui
bb0958544f ACPI: use more understandable bus_id for ACPI devices
Some of the ACPI devices use the internal fake hids
which are exposed to userspace as devces' bus_id after sysfs conversion.
To make it more friendly, we convert them to more understandable strings.

For those devices w/o PNPids, we use "device:instance_no" as the bus_id
instead of "PNPIDNON:instance_no".

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-01-05 23:43:00 -05:00
Doug Chapman
9a654b5222 ACPI: increase ACPI_MAX_REFERENCE_COUNT for larger systems
We have some new larger ia64 systems in HP that trip over the
ACPI_MAX_REFERENCE_COUNT limit which triggers a large number of these
debug messages:

ACPI Warning (utdelete-0397): Large Reference Count (XXX) in object e0000a0ff6797ab0  [20060707]

This was increased once in the past as described in this very brief thread:

http://www.mail-archive.com/linux-acpi@vger.kernel.org/msg00890.html

Signed-off-by: Doug Chapman <doug.chapman@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-01-02 00:18:52 -05:00
Rui Zhang
2786f6e388 ACPI: fix Supermicro X7DB8+ Boot regression
http://bugzilla.kernel.org/show_bug.cgi?id=7695

Originally we converted bind/unbind to use a new pci bridge driver.
The driver will add/remove _PRT, so we can eventually remove
.bind/.unbind methods.

But we found that some of the _ADR-Based devices don't have _PRT,
i.e. they are not managed by the new ACPI PCI bridge driver.
So that .bind method is not called for some _ADR-Based devices,
which leads to a failure.

Now we make ACPI PCI Root Bridge Driver scan and binds all _ADR-Based devices
once the driver is loaded, in the .add method of ACPI PCI Root Bridge driver.

Extra code path for calling .bind/.unbind when _ADR-Based devices
are hot added/removed is also added.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-12-21 03:07:37 -05:00
John Keller
0f0fe1a08a ACPI: Add support for acpi_load_table/acpi_unload_table_id
Make acpi_load_table() available for use by removing it from the #ifdef
ACPI_FUTURE_USAGE.

Also add a new routine used to unload an ACPI table of a given type and "id" -
acpi_unload_table_id().  The implementation of this new routine was almost a
direct copy of existing routine acpi_unload_table() - only difference being
that it only removes a specific table id instead of ALL tables of a given
type.  The SN hotplug driver (sgi_hotplug.c) now uses both of these interfaces
to dynamically load and unload SSDT ACPI tables.

Also, a few other ACPI routines now used by the SN hotplug driver are exported
(since the driver can be a loadable module):

 acpi_ns_map_handle_to_node
 acpi_ns_convert_entry_to_handle
 acpi_ns_get_next_node

Signed-off-by: Aaron Young <ayoung@sgi.com>
Cc: Greg KH <greg@kroah.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-12-20 01:51:14 -05:00
Zhang Rui
ae8433324b ACPI: Set fake hid for non-PNPID ACPI devices
We do this mainly because:
1.	hid is used to match ACPI devices and drivers.
	.match method which is incompatible to driver model
	can be deleted from acpi_driver.ops then.
2.	As the .uevent method mark ACPI drivers by PNPID,
	fake hid is set to non-PNPID devices so that udev script
	can load the right ACPI driver by looking for
	"HWID = " or "COMPTID = ".

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-12-15 23:38:35 -05:00
Li Shaohua
96333578b0 ACPI: add acpi_bus_removal_type in acpi_device
Add removal_type in structure acpi_device for hot removal.

ACPI_BUS_REMOVAL_EJECT is used for ACPI device hot removal.
Only one parameter is allowed in .remove method due to driver model.
So removal_type is added to indicate different removal type.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-12-15 23:38:35 -05:00
Li Shaohua
c4168bff32 ACPI: add acpi_bus_ops in acpi_device
Add acpi_bus_ops in acpi_device to support acpi hot plug.

NOTE:	Two methods .add and .start in acpi_driver.ops are
	called separately to probe ACPI devices, while only
	.probe method is called in driver model.
	As executing .add and .start separately is critical
	for ACPI device hot plug, we use acpi_bus_ops to
	distinguish different code path.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-12-15 23:38:34 -05:00
Patrick Mochel
f883d9db00 ACPI: convert to sysfs framework
Setup new sysfs framework

1.	Remove /sys/firmware/acpi
2.	Add ACPI device in device tree.

File "eject" for every device that has _EJ0 method is moved from
/sys/firmware to /sys/devices.
Operation on this file is exactly the same as before.
i.e. echo 1 to "eject" will cause hot removal of this device.
Corresponding changes should be made in userspace for hot removal.

Signed-off-by: Li Shaohua <shaohua.li@intel.com>
Signed-off-by: Zhang Rui<rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-12-15 23:38:34 -05:00
Patrick Mochel
1890a97ab3 ACPI: change registration interface to follow driver model
ACPI device/driver registration Interfaces are modified
to follow Linux driver model.

Signed-off-by: Li Shaohua <shaohua.li@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-12-15 23:38:34 -05:00
Patrick Mochel
5d9464a469 ACPI: add ACPI bus_type for driver model
Add ACPI bus_type for Linux driver model.

1.	.shutdown method is added into acpi_driver.ops
	needed by bus_type operations.
2.	remove useless parameter 'int state' in .resume method.
3.	change parameter 'int state'
	to 'pm_message_t state' in .suspend method.

Note:	The new .uevent method mark ACPI drivers by PNPID instead of by name.
	Udev script needs to look for "HWID=" or "COMPTID=" to load
	ACPI drivers as a result.

Signed-off-by: Li Shaohua <shaohua.li@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-12-15 23:38:34 -05:00
Patrick Mochel
d43ec68e98 ACPI: add device_driver and hepler functions
Add device_driver into acpi_driver for driver model.
Add helper functions 'to_acpi_device' and 'to_acpi_driver'
to get structure acpi_device/acpi_driver by device/device_driver.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-12-15 23:38:34 -05:00
Christoph Lameter
e18b890bb0 [PATCH] slab: remove kmem_cache_t
Replace all uses of kmem_cache_t with struct kmem_cache.

The patch was generated using the following script:

	#!/bin/sh
	#
	# Replace one string by another in all the kernel sources.
	#

	set -e

	for file in `find * -name "*.c" -o -name "*.h"|xargs grep -l $1`; do
		quilt add $file
		sed -e "1,\$s/$1/$2/g" $file >/tmp/$$
		mv /tmp/$$ $file
		quilt refresh
	done

The script was run like this

	sh replace kmem_cache_t "struct kmem_cache"

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-07 08:39:25 -08:00
Benjamin Herrenschmidt
465ae641e4 ACPI: Change ACPI to use dev_archdata instead of firmware_data
Change ACPI to use dev_archdata instead of firmware_data

This patch changes ACPI to use the new dev_archdata on i386, x86_64
and ia64 (is there any other arch using ACPI ?) to store it's
acpi_handle.

It also removes the firmware_data field from struct device as this
was the only user.

Only build-tested on x86

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-12-01 14:52:01 -08:00
Venkatesh Pallipadi
991528d734 ACPI: Processor native C-states using MWAIT
Intel processors starting with the Core Duo support
support processor native C-state using the MWAIT instruction.
Refer: Intel Architecture Software Developer's Manual
http://www.intel.com/design/Pentium4/manuals/253668.htm

Platform firmware exports the support for Native C-state to OS using
ACPI _PDC and _CST methods.
Refer: Intel Processor Vendor-Specific ACPI: Interface Specification
http://www.intel.com/technology/iapc/acpi/downloads/302223.htm

With Processor Native C-state, we use 'MWAIT' instruction on the processor
to enter different C-states (C1, C2, C3).  We won't use the special IO
ports to enter C-state and no SMM mode etc required to enter C-state.
Overall this will mean better C-state support.

One major advantage of using MWAIT for all C-states is, with this and
"treat interrupt as break event" feature of MWAIT, we can now get accurate
timing for the time spent in C1, C2, ..  states.

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-10-14 00:35:39 -04:00
Linus Torvalds
53a5fbdc2d ACPI: Allow setting SCI_EN bit in PM1_CONTROL register
This is needed by at least the Mac Mini's, which (incorrectly) come back
from suspend with SCI_EN clear.

Thanks to Frdric Riss for hunting this down.

Acked-by: Frdric Riss <frederic.riss@gmail.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Len Brown <len.brown@intel.com>
Cc: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-10 17:14:44 -07:00
Len Brown
c0dc250e89 Pull acpi_os_allocate into test branch 2006-07-10 02:39:47 -04:00
Len Brown
0f12b15ebc Pull acpica-20060707 into test branch 2006-07-10 02:39:41 -04:00
Len Brown
e21c1ca3f9 ACPI: acpi_os_allocate() fixes
Replace acpi_in_resume with a more general hack
to check irqs_disabled() on any kmalloc() from ACPI.
While setting (system_state != SYSTEM_RUNNING) on resume
seemed more general, Andrew Morton preferred this approach.

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

Make acpi_os_allocate() into an inline function to
allow /proc/slab_allocators to work.

Delete some memset() that could fault on allocation failure.

Signed-off-by: Len Brown <len.brown@intel.com>
2006-07-10 02:37:22 -04:00
Len Brown
ab8aa06a5c ACPI: acpi_os_get_thread_id() returns current
Linux mutexes and the debug code that that reference
acpi_os_get_thread_id() are happy with 0.
But the AML mutexes in exmutex.c expect a unique non-zero
number for each thread - as they track this thread_id
to permit the mutex re-entrancy defined by the ACPI spec.

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

Signed-off-by: Len Brown <len.brown@intel.com>
2006-07-09 15:19:44 -04:00
Bob Moore
f6dd9221dd ACPI: ACPICA 20060707
Added the ACPI_PACKED_POINTERS_NOT_SUPPORTED macro to
support C compilers that do not allow the initialization
of address pointers within packed structures - even though
the hardware itself may support misaligned transfers. Some
of the debug data structures are packed by default to
minimize size.

Added an error message for the case where
acpi_os_get_thread_id() returns zero. A non-zero value is
required by the core ACPICA code to ensure the proper
operation of AML mutexes and recursive control methods.

The DSDT is now the only ACPI table that determines whether
the AML interpreter is in 32-bit or 64-bit mode. Not really
a functional change, but the hooks for per-table 32/64
switching have been removed from the code. A clarification
to the ACPI specification is forthcoming in ACPI 3.0B.

Fixed a possible leak of an Owner ID in the error
path of tbinstal.c acpi_tb_init_table_descriptor() and
migrated all table OwnerID deletion to a single place in
acpi_tb_uninstall_table() to correct possible leaks when using
the acpi_tb_delete_tables_by_type() interface (with assistance
from Lance Ortiz.)

Fixed a problem with Serialized control methods where the
semaphore associated with the method could be over-signaled
after multiple method invocations.

Fixed two issues with the locking of the internal
namespace data structure. Both the Unload() operator and
acpi_unload_table() interface now lock the namespace during
the namespace deletion associated with the table unload
(with assistance from Linn Crosetto.)

Fixed problem reports (Valery Podrezov) integrated: -
Eliminate unnecessary memory allocation for CreateXxxxField
http://bugzilla.kernel.org/show_bug.cgi?id=5426

Fixed problem reports (Fiodor Suietov) integrated: -
Incomplete cleanup branches in AcpiTbGetTableRsdt (BZ 369)
- On Address Space handler deletion, needless deactivation
call (BZ 374) - AcpiRemoveAddressSpaceHandler: validate
Device handle parameter (BZ 375) - Possible memory leak,
Notify sub-objects of Processor, Power, ThermalZone (BZ
376) - AcpiRemoveAddressSpaceHandler: validate Handler
parameter (BZ 378) - Minimum Length of RSDT should be
validated (BZ 379) - AcpiRemoveNotifyHandler: return
AE_NOT_EXIST if Processor Obj has no Handler (BZ (380)
- AcpiUnloadTable: return AE_NOT_EXIST if no table of
specified type loaded (BZ 381)

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-07-09 15:15:40 -04:00
Linus Torvalds
953969ddf5 Revert "ACPI: dock driver"
This reverts commit a5e1b94008.

Adrian Bunk points out that it has build errors, and apparently no
maintenance. Throw it out.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-07-09 08:47:46 -07:00
Len Brown
02438d8771 ACPI: delete acpi_os_free(), use kfree() directly
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-30 03:19:10 -04:00
Len Brown
9dce0e950d Pull acpica into release branch 2006-06-29 19:55:27 -04:00
Dominik Brodowski
a3c6598f92 ACPI: C-States: accounting of sleep states
Track the actual time spent in C-States (C2 upwards, we can't determine this
for C1), not only the number of invocations.  This is especially useful for
dynamic ticks / "tickless systems", but is also of interest on normal systems,
as any interrupt activity leads to C-States being exited, not only the timer
interrupt.

The time is being measured in PM timer ticks, so an increase by one equals 279
nanoseconds.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-28 03:14:31 -04:00
Bob Moore
967440e3be ACPI: ACPICA 20060623
Implemented a new acpi_spinlock type for the OSL lock
interfaces.  This allows the type to be customized to
the host OS for improved efficiency (since a spinlock is
usually a very small object.)

Implemented support for "ignored" bits in the ACPI
registers.  According to the ACPI specification, these
bits should be preserved when writing the registers via
a read/modify/write cycle. There are 3 bits preserved
in this manner: PM1_CONTROL[0] (SCI_EN), PM1_CONTROL[9],
and PM1_STATUS[11].
http://bugzilla.kernel.org/show_bug.cgi?id=3691

Implemented the initial deployment of new OSL mutex
interfaces.  Since some host operating systems have
separate mutex and semaphore objects, this feature was
requested. The base code now uses mutexes (and the new
mutex interfaces) wherever a binary semaphore was used
previously. However, for the current release, the mutex
interfaces are defined as macros to map them to the
existing semaphore interfaces.

Fixed several problems with the support for the control
method SyncLevel parameter. The SyncLevel now works
according to the ACPI specification and in concert with the
Mutex SyncLevel parameter, since the current SyncLevel is
a property of the executing thread. Mutual exclusion for
control methods is now implemented with a mutex instead
of a semaphore.

Fixed three instances of the use of the C shift operator
in the bitfield support code (exfldio.c) to avoid the use
of a shift value larger than the target data width. The
behavior of C compilers is undefined in this case and can
cause unpredictable results, and therefore the case must
be detected and avoided.  (Fiodor Suietov)

Added an info message whenever an SSDT or OEM table
is loaded dynamically via the Load() or LoadTable()
ASL operators. This should improve debugging capability
since it will show exactly what tables have been loaded
(beyond the tables present in the RSDT/XSDT.)

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-28 03:11:38 -04:00
Kristen Accardi
a5e1b94008 ACPI: dock driver
Create a driver which lives in the acpi subsystem to handle dock events.
This driver is not an "ACPI" driver, because acpi drivers require that the
object be present when the driver is loaded.

Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Cc: Dave Hansen <haveblue@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-28 03:07:16 -04:00
Linus Torvalds
37224470c8 Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (65 commits)
  ACPI: suppress power button event on S3 resume
  ACPI: resolve merge conflict between sem2mutex and processor_perflib.c
  ACPI: use for_each_possible_cpu() instead of for_each_cpu()
  ACPI: delete newly added debugging macros in processor_perflib.c
  ACPI: UP build fix for bugzilla-5737
  Enable P-state software coordination via _PDC
  P-state software coordination for speedstep-centrino
  P-state software coordination for acpi-cpufreq
  P-state software coordination for ACPI core
  ACPI: create acpi_thermal_resume()
  ACPI: create acpi_fan_suspend()/acpi_fan_resume()
  ACPI: pass pm_message_t from acpi_device_suspend() to root_suspend()
  ACPI: create acpi_device_suspend()/acpi_device_resume()
  ACPI: replace spin_lock_irq with mutex for ec poll mode
  ACPI: Allow a WAN module enable/disable on a Thinkpad X60.
  sem2mutex: acpi, acpi_link_lock
  ACPI: delete unused acpi_bus_drivers_lock
  sem2mutex: drivers/acpi/processor_perflib.c
  ACPI add ia64 exports to build acpi_memhotplug as a module
  ACPI: asus_acpi_init(): propagate correct return value
  ...

Manual resolve of conflicts in:

	arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c
	arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
	include/acpi/processor.h
2006-06-23 07:52:36 -07:00
Yasunori Goto
762834e8bf [PATCH] Unify pxm_to_node() and node_to_pxm()
Consolidate the various arch-specific implementations of pxm_to_node() and
node_to_pxm() into a single generic version.

Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Andi Kleen <ak@muc.de>
Cc: Dave Hansen <haveblue@us.ibm.com>
Cc: "Brown, Len" <len.brown@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-23 07:42:48 -07:00
Len Brown
d42510a0f5 Pull bugzilla-5737 into release branch
Conflicts:

	arch/x86_64/kernel/acpi/processor.c
2006-06-15 21:39:25 -04:00
Len Brown
8f2ddb37e5 Pull bugzilla-5000 into release branch 2006-06-15 21:36:11 -04:00
Len Brown
69cd291c6b Pull acpi_bus_register_driver into release branch
Conflicts:

	drivers/acpi/asus_acpi.c
	drivers/acpi/scan.c
2006-06-15 21:28:57 -04:00
Bob Moore
4c90ece249 ACPI: ACPICA 20060608
Converted the locking mutex used for the ACPI hardware
to a spinlock. This change should eliminate all problems
caused by attempting to acquire a semaphore at interrupt
level, and it means that all ACPICA external interfaces
that directly access the ACPI hardware can be safely
called from interrupt level.

Fixed a regression introduced in 20060526 where the ACPI
device initialization could be prematurely aborted with
an AE_NOT_FOUND if a device did not have an optional
_INI method.

Fixed an IndexField issue where a write to the Data
Register should be limited in size to the AccessSize
(width) of the IndexField itself. (BZ 433, Fiodor Suietov)

Fixed problem reports (Valery Podrezov) integrated: - Allow
store of ThermalZone objects to Debug object.
http://bugzilla.kernel.org/show_bug.cgi?id=5369
http://bugzilla.kernel.org/show_bug.cgi?id=5370

Fixed problem reports (Fiodor Suietov) integrated: -
acpi_get_table_header() doesn't handle multiple instances
correctly (BZ 364)

Removed four global mutexes that were obsolete and were
no longer being used.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-14 02:45:47 -04:00
Bob Moore
4119532c95 ACPI: ACPICA 20060526
Restructured, flattened, and simplified the internal
interfaces for namespace object evaluation - resulting
in smaller code, less CPU stack use, and fewer
interfaces. (With assistance from Mikhail Kouzmich)

Fixed a problem with the CopyObject operator where the
first parameter was not typed correctly for the parser,
interpreter, compiler, and disassembler. Caused various
errors and unexpected behavior.

Fixed a problem where a ShiftLeft or ShiftRight of
more than 64 bits produced incorrect results with some
C compilers. Since the behavior of C compilers when
the shift value is larger than the datatype width is
apparently not well defined, the interpreter now detects
this condition and simply returns zero as expected in all
such cases. (BZ 395)

Fixed problem reports (Valery Podrezov) integrated: -
Update String-to-Integer conversion to match ACPI 3.0A spec
http://bugzilla.kernel.org/show_bug.cgi?id=5329
Allow interpreter to handle nested method declarations
http://bugzilla.kernel.org/show_bug.cgi?id=5361

Fixed problem reports (Fiodor Suietov) integrated: -
acpi_terminate() doesn't free debug memory allocation
list objects (BZ 355) - After Core Subsystem
shutdown, acpi_subsystem_status() returns AE_OK (BZ 356) -
acpi_os_unmap_memory() for RSDP can be invoked inconsistently
(BZ 357) - Resource Manager should return AE_TYPE for
non-device objects (BZ 358) - Incomplete cleanup branch
in AcpiNsEvaluateRelative (BZ 359) - Use acpi_os_free()
instead of ACPI_FREE in acpi_rs_set_srs_method_data (BZ 360)
- Incomplete cleanup branch in acpi_ps_parse_aml (BZ 361) -
Incomplete cleanup branch in acpi_ds_delete_walk_state (BZ 362)
- acpi_get_table_header returns AE_NO_ACPI_TABLES until DSDT
is loaded (BZ 365) - Status of the Global Initialization
Handler call not used (BZ 366) - Incorrect object parameter
to Global Initialization Handler (BZ 367)

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-14 02:44:35 -04:00
Bob Moore
958dd242b6 ACPI: ACPICA 20060512
Replaced the acpi_os_queue_for_execution() with a new
interface named acpi_os_execute(). The major difference is
that the new interface does not have a Priority parameter,
this appeared to be useless and has been replaced by
a Type parameter. The Type tells the OS what type of
execution is being requested, such as global lock handler,
notify handler, GPE handler, etc. This allows the host
to queue and execute the request as appropriate for the
request type, possibly using different work queues and
different priorities for the various request types. This
enables fixes for multithreading deadlock problems such as
http://bugzilla.kernel.org/show_bug.cgi?id=5534
(Alexey Starikovskiy and Bob Moore)

Fixed a possible memory leak associated with the
support for the so-called "implicit return" ACPI
extension. Reported by FreeBSD  (Fiodor Suietov)
http://bugzilla.kernel.org/show_bug.cgi?id=6514

Fixed a problem with the Load() operator where a table
load from an operation region could overwrite an internal
table buffer by up to 7 bytes and cause alignment faults
on IPF systems. (With assistance from Luming Yu)

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-14 02:34:48 -04:00
Bob Moore
b229cf92ee ACPI: ACPICA 20060421
Removed a device initialization optimization introduced in
20051216 where the _STA method was not run unless an _INI
was also present for the same device. This optimization
could cause problems because it could allow _INI methods
to be run within a not-present device subtree (If a
not-present device had no _INI, _STA would not be run,
the not-present status would not be discovered, and the
children of the device would be incorrectly traversed.)

Implemented a new _STA optimization where namespace
subtrees that do not contain _INI are identified and
ignored during device initialization. Selectively running
_STA can significantly improve boot time on large machines
(with assistance from Len Brown.)

Implemented support for the device initialization case
where the returned _STA flags indicate a device not-present
but functioning. In this case, _INI is not run, but the
device children are examined for presence, as per the
ACPI specification.

Implemented an additional change to the IndexField support
in order to conform to MS behavior. The value written to
the Index Register is not simply a byte offset, it is a
byte offset in units of the access width of the parent
Index Field. (Fiodor Suietov)

Defined and deployed a new OSL interface,
acpi_os_validate_address().  This interface is called during
the creation of all AML operation regions, and allows
the host OS to exert control over what addresses it will
allow the AML code to access. Operation Regions whose
addresses are disallowed will cause a runtime exception
when they are actually accessed (will not affect or abort
table loading.)

Defined and deployed a new OSL interface,
acpi_os_validate_interface().  This interface allows the host OS
to match the various "optional" interface/behavior strings
for the _OSI predefined control method as appropriate
(with assistance from Bjorn Helgaas.)

Restructured and corrected various problems in the
exception handling code paths within DsCallControlMethod
and DsTerminateControlMethod in dsmethod (with assistance
from Takayoshi Kochi.)

Modified the Linux source converter to ignore quoted string
literals while converting identifiers from mixed to lower
case. This will correct problems with the disassembler
and other areas where such strings must not be modified.

The ACPI_FUNCTION_* macros no longer require quotes around
the function name. This allows the Linux source converter
to convert the names, now that the converter ignores
quoted strings.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-14 02:30:55 -04:00
Bob Moore
793c2388ca ACPI: ACPICA 20060331
Implemented header file support for the following
additional ACPI tables: ASF!, BOOT, CPEP, DBGP, MCFG, SPCR,
SPMI, TCPA, and WDRT. With this support, all current and
known ACPI tables are now defined in the ACPICA headers and
are available for use by device drivers and other software.

Implemented support to allow tables that contain ACPI
names with invalid characters to be loaded. Previously,
this would cause the table load to fail, but since
there are several known cases of such tables on
existing machines, this change was made to enable
ACPI support for them. Also, this matches the
behavior of the Microsoft ACPI implementation.
https://bugzilla.novell.com/show_bug.cgi?id=147621

Fixed a couple regressions introduced during the memory
optimization in the 20060317 release. The namespace
node definition required additional reorganization and
an internal datatype that had been changed to 8-bit was
restored to 32-bit. (Valery Podrezov)

Fixed a problem where a null pointer passed to
acpi_ut_delete_generic_state() could be passed through
to acpi_os_release_object which is unexpected. Such
null pointers are now trapped and ignored, matching
the behavior of the previous implementation before the
deployment of acpi_os_release_object().  (Valery Podrezov,
Fiodor Suietov)

Fixed a memory mapping leak during the deletion of
a SystemMemory operation region where a cached memory
mapping was not deleted. This became a noticeable problem
for operation regions that are defined within frequently
used control methods. (Dana Meyers)

Reorganized the ACPI table header files into two main
files: one for the ACPI tables consumed by the ACPICA core,
and another for the miscellaneous ACPI tables that are
consumed by the drivers and other software. The various
FADT definitions were merged into one common section and
three different tables (ACPI 1.0, 1.0+, and 2.0)

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-14 02:04:16 -04:00
Bob Moore
61686124f4 [ACPI] ACPICA 20060317
Implemented the use of a cache object for all internal
namespace nodes. Since there are about 1000 static nodes
in a typical system, this will decrease memory use for
cache implementations that minimize per-allocation overhead
(such as a slab allocator.)

Removed the reference count mechanism for internal
namespace nodes, since it was deemed unnecessary. This
reduces the size of each namespace node by about 5%-10%
on all platforms. Nodes are now 20 bytes for the 32-bit
case, and 32 bytes for the 64-bit case.

Optimized several internal data structures to reduce
object size on 64-bit platforms by packing data within
the 64-bit alignment. This includes the frequently used
ACPI_OPERAND_OBJECT, of which there can be ~1000 static
instances corresponding to the namespace objects.

Added two new strings for the predefined _OSI method:
"Windows 2001.1 SP1" and "Windows 2006".

Split the allocation tracking mechanism out to a separate
file, from utalloc.c to uttrack.c. This mechanism appears
to be only useful for application-level code. Kernels may
wish to not include uttrack.c in distributions.

Removed all remnants of the obsolete ACPI_REPORT_* macros
and the associated code. (These macros have been replaced
by the ACPI_ERROR and ACPI_WARNING macros.)

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-06-14 01:22:20 -04:00
Konstantin Karasyov
0feabb01d9 ACPI: create acpi_fan_suspend()/acpi_fan_resume()
http://bugzilla.kernel.org/show_bug.cgi?id=5000

Signed-off-by: Len Brown <len.brown@intel.com>
2006-05-15 03:16:45 -04:00
Patrick Mochel
5b3272655a ACPI: create acpi_device_suspend()/acpi_device_resume()
updated and tested by Konstantin Karasyov

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

Signed-off-by: Patrick Mochel <patrick.mochel@intel.com>
Signed-off-by: Konstantin Karasyov <konstantin.karasyov @intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-05-15 02:44:47 -04:00
Bjorn Helgaas
06ea8e08ae ACPI: acpi_bus_unregister_driver() returns void
Nobody looks at the return value, and this brings it into line with
pci_unregister_driver(), etc.  Also removed validation of the driver
pointer passed in to register and unregister.  More consistent, and we'll
find bugs faster if we fault rather than returning an error that's ignored.

Also makes internal functions acpi_device_unregister() and
acpi_driver_detach() void, since nobody uses their returns either.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-05-13 23:23:57 -04:00
David Woodhouse
62c4f0a2d5 Don't include linux/config.h from anywhere else in include/
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-04-26 12:56:16 +01:00
Len Brown
ec7381d6bf ACPI: inline trivial acpi_os_get_thread_id()
acpi_os_get_thread_id() is used only for debugging
code that is not enabled on Linux, so stub it out.

Signed-off-by: Len Brown <len.brown@intel.com>
2006-04-01 05:12:23 -05:00
Bob Moore
8313524a0d ACPI: ACPICA 20060310
Tagged all external interfaces to the subsystem with the
new ACPI_EXPORT_SYMBOL macro. This macro can be defined
as necessary to assist kernel integration. For Linux,
the macro resolves to the EXPORT_SYMBOL macro. The default
definition is NULL.

Added the ACPI_THREAD_ID type for the return value from
acpi_os_get_thread_id(). This allows the host to define this
as necessary to simplify kernel integration. The default
definition is ACPI_NATIVE_UINT.

Valery Podrezov fixed two interpreter problems related
to error processing, the deletion of objects, and placing
invalid pointers onto the internal operator result stack.
http://bugzilla.kernel.org/show_bug.cgi?id=6028
http://bugzilla.kernel.org/show_bug.cgi?id=6151

Increased the reference count threshold where a warning is
emitted for large reference counts in order to eliminate
unnecessary warnings on systems with large namespaces
(especially 64-bit.) Increased the value from 0x400
to 0x800.

Due to universal disagreement as to the meaning of the
'c' in the calloc() function, the ACPI_MEM_CALLOCATE
macro has been renamed to ACPI_ALLOCATE_ZEROED so that the
purpose of the interface is 'clear'. ACPI_MEM_ALLOCATE and
ACPI_MEM_FREE are renamed to ACPI_ALLOCATE and ACPI_FREE.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-04-01 01:26:39 -05:00
Bob Moore
ea936b78f4 ACPI: ACPICA 20060217
Implemented a change to the IndexField support to match
the behavior of the Microsoft AML interpreter. The value
written to the Index register is now a byte offset,
no longer an index based upon the width of the Data
register. This should fix IndexField problems seen on
some machines where the Data register is not exactly one
byte wide. The ACPI specification will be clarified on
this point.

Fixed a problem where several resource descriptor
types could overrun the internal descriptor buffer due
to size miscalculation: VendorShort, VendorLong, and
Interrupt. This was noticed on IA64 machines, but could
affect all platforms.

Fixed a problem where individual resource descriptors were
misaligned within the internal buffer, causing alignment
faults on IA64 platforms.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-04-01 01:23:23 -05:00
Bob Moore
52fc0b026e [ACPI] ACPICA 20060210
Removed a couple of extraneous ACPI_ERROR messages that
appeared during normal execution. These became apparent
after the conversion from ACPI_DEBUG_PRINT.

Fixed a problem where the CreateField operator could hang
if the BitIndex or NumBits parameter referred to a named
object. From Valery Podrezov.
http://bugzilla.kernel.org/show_bug.cgi?id=5359

Fixed a problem where a DeRefOf operation on a buffer
object incorrectly failed with an exception. This also
fixes a couple of related RefOf and DeRefOf issues.
From Valery Podrezov.
http://bugzilla.kernel.org/show_bug.cgi?id=5360
http://bugzilla.kernel.org/show_bug.cgi?id=5387
http://bugzilla.kernel.org/show_bug.cgi?id=5392

Fixed a problem where the AE_BUFFER_LIMIT exception was
returned instead of AE_STRING_LIMIT on an out-of-bounds
Index() operation. From Valery Podrezov.
http://bugzilla.kernel.org/show_bug.cgi?id=5480

Implemented a memory cleanup at the end of the execution
of each iteration of an AML While() loop, preventing the
accumulation of outstanding objects. From Valery Podrezov.
http://bugzilla.kernel.org/show_bug.cgi?id=5427

Eliminated a chunk of duplicate code in the object
resolution code. From Valery Podrezov.
http://bugzilla.kernel.org/show_bug.cgi?id=5336

Fixed several warnings during the 64-bit code generation.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-03-31 02:19:03 -05:00
Alexey Dobriyan
53b3531bbb [PATCH] s/;;/;/g
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-24 07:33:24 -08:00
Kristen Accardi
ceaba66305 [PATCH] acpi: export acpi_bus_trim
Export the acpi_bus_trim function so that the pci hotplug driver can
use it.

Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-23 14:35:15 -08:00
Venkatesh Pallipadi
d52bb94d56 Enable P-state software coordination via _PDC
http://bugzilla.kernel.org/show_bug.cgi?id=5737

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-02-09 03:21:49 -05:00
Venkatesh Pallipadi
3b2d99429e P-state software coordination for ACPI core
http://bugzilla.kernel.org/show_bug.cgi?id=5737

Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-02-09 03:21:48 -05:00
Bob Moore
b8e4d89357 [ACPI] ACPICA 20060127
Implemented support in the Resource Manager to allow
unresolved namestring references within resource package
objects for the _PRT method. This support is in addition
to the previously implemented unresolved reference
support within the AML parser. If the interpreter slack
mode is enabled (true on Linux unless acpi=strict),
these unresolved references will be passed through
to the caller as a NULL package entry.
http://bugzilla.kernel.org/show_bug.cgi?id=5741

Implemented and deployed new macros and functions for
error and warning messages across the subsystem. These
macros are simpler and generate less code than their
predecessors. The new macros ACPI_ERROR, ACPI_EXCEPTION,
ACPI_WARNING, and ACPI_INFO replace the ACPI_REPORT_*
macros.

Implemented the acpi_cpu_flags type to simplify host OS
integration of the Acquire/Release Lock OSL interfaces.
Suggested by Steven Rostedt and Andrew Morton.

Fixed a problem where Alias ASL operators are sometimes
not correctly resolved. causing AE_AML_INTERNAL
http://bugzilla.kernel.org/show_bug.cgi?id=5189
http://bugzilla.kernel.org/show_bug.cgi?id=5674

Fixed several problems with the implementation of the
ConcatenateResTemplate ASL operator. As per the ACPI
specification, zero length buffers are now treated as a
single EndTag. One-length buffers always cause a fatal
exception. Non-zero length buffers that do not end with
a full 2-byte EndTag cause a fatal exception.

Fixed a possible structure overwrite in the
AcpiGetObjectInfo external interface. (With assistance
from Thomas Renninger)

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-01-31 03:25:09 -05:00
Len Brown
9fdb62af92 [ACPI] merge 3549 4320 4485 4588 4980 5483 5651 acpica asus fops pnpacpi branches into release
Signed-off-by: Len Brown <len.brown@intel.com>
2006-01-24 17:52:48 -05:00
Bob Moore
4a90c7e862 [ACPI] ACPICA 20060113
Added 2006 copyright.

At SuSE's suggestion, enabled all error messages
without enabling function tracing, ie with CONFIG_ACPI_DEBUG=n

Replaced all instances of the ACPI_DEBUG_PRINT macro invoked at
the ACPI_DB_ERROR and ACPI_DB_WARN debug levels with
the ACPI_REPORT_ERROR and ACPI_REPORT_WARNING macros,
respectively. This preserves all error and warning messages
in the non-debug version of the ACPICA code (this has been
referred to as the "debug lite" option.) Over 200 cases
were converted to create a total of over 380 error/warning
messages across the ACPICA code. This increases the code
and data size of the default non-debug version by about 13K.
Added ACPI_NO_ERROR_MESSAGES flag to enable deleting all messages.
The size of the debug version remains about the same.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-01-20 02:23:50 -05:00
Adrian Bunk
757b18661e [ACPI] make two processor functions static
acpi_processor_write_throttling()
acpi_processor_write_limit()

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2006-01-08 03:05:59 -05:00
Bob Moore
defba1d8f2 [ACPI] ACPICA 20051216
Implemented optional support to allow unresolved names
within ASL Package objects. A null object is inserted in
the package when a named reference cannot be located in
the current namespace. Enabled via the interpreter slack
flag which Linux has enabled by default (acpi=strict
to disable slack).  This should eliminate AE_NOT_FOUND
exceptions seen on machines that contain such code.

Implemented an optimization to the initialization
sequence that can improve boot time. During ACPI device
initialization, the _STA method is now run if and only
if the _INI method exists. The _STA method is used to
determine if the device is present; An _INI can only be
run if _STA returns present, but it is a waste of time to
run the _STA method if the _INI does not exist. (Prototype
and assistance from Dong Wei)

Implemented use of the C99 uintptr_t for the pointer
casting macros if it is available in the current
compiler. Otherwise, the default (void *) cast is used
as before.

Fixed some possible memory leaks found within the
execution path of the Break, Continue, If, and CreateField
operators. (Valery Podrezov)

Fixed a problem introduced in the 20051202 release where
an exception is generated during method execution if a
control method attempts to declare another method.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2005-12-28 02:54:59 -05:00
Alex Williamson
05465fd562 [ACPI] increase owner_id limit to 64 from 32
This is an interim patch until changes in an updated
ACPICA core increase the limit to 255.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2005-12-21 04:52:16 -05:00
Bob Moore
28f55ebce5 [ACPI] ACPICA 20051202
Modified the parsing of control methods to no longer
create namespace objects during the first pass of the
parse. Objects are now created only during the execute
phase, at the moment the namespace creation operator
is encountered in the AML (Name, OperationRegion,
CreateByteField, etc.) This should eliminate ALREADY_EXISTS
exceptions seen on some machines where reentrant control
methods are protected by an AML mutex. The mutex will now
correctly block multiple threads from attempting to create
the same object more than once.

Increased the number of available Owner Ids for namespace
object tracking from 32 to 255. This should eliminate the
OWNER_ID_LIMIT exceptions seen on some machines with a
large number of ACPI tables (either static or dynamic).

Enhanced the namespace dump routine to output the owner
ID for each namespace object.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2005-12-10 00:29:11 -05:00
Bob Moore
c51a4de85d [ACPI] ACPICA 20051117
Fixed a problem in the AML parser where the method thread
count could be decremented below zero if any errors
occurred during the method parse phase. This should
eliminate AE_AML_METHOD_LIMIT exceptions seen on some
machines. This also fixed a related regression with the
mechanism that detects and corrects methods that cannot
properly handle reentrancy (related to the deployment of
the new OwnerId mechanism.)

Eliminated the pre-parsing of control methods (to detect
errors) during table load. Related to the problem above,
this was causing unwind issues if any errors occurred
during the parse, and it seemed to be overkill. A table
load should not be aborted if there are problems with
any single control method, thus rendering this feature
rather pointless.

Fixed a problem with the new table-driven resource manager
where an internal buffer overflow could occur for small
resource templates.

Implemented a new external interface, acpi_get_vendor_resource()
This interface will find and return a vendor-defined
resource descriptor within a _CRS or _PRS
method via an ACPI 3.0 UUID match. (from Bjorn Helgaas)

Removed the length limit (200) on string objects as
per the upcoming ACPI 3.0A specification. This affects
the following areas of the interpreter: 1) any implicit
conversion of a Buffer to a String, 2) a String object
result of the ASL Concatentate operator, 3) the String
object result of the ASL ToString operator.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2005-12-10 00:27:56 -05:00
Bob Moore
96db255c8f [ACPI] ACPICA 20051102
Modified the subsystem initialization sequence to improve
GPE support. The GPE initialization has been split into
two parts in order to defer execution of the _PRW methods
(Power Resources for Wake) until after the hardware is
fully initialized and the SCI handler is installed. This
allows the _PRW methods to access fields protected by the
Global Lock. This will fix systems where a NO_GLOBAL_LOCK
exception has been seen during initialization.

Fixed a regression with the ConcatenateResTemplate()
ASL operator introduced in the 20051021 release.

Implemented support for "local" internal ACPI object
types within the debugger "Object" command and the
acpi_walk_namespace() external interfaces. These local
types include RegionFields, BankFields, IndexFields, Alias,
and reference objects.

Moved common AML resource handling code into a new file,
"utresrc.c". This code is shared by both the Resource
Manager and the AML Debugger.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2005-12-10 00:26:05 -05:00