Commit Graph

94 Commits (d799e083a80b220f3681d7790f11e77d1704022b)

Author SHA1 Message Date
Len Brown 3549dba2c3 ACPICA: fix stray va_end() caused by mis-merge
Signed-off-by: Len Brown <len.brown@intel.com>
2008-06-11 19:13:47 -04:00
Len Brown 96916090f4 Merge branches 'release', 'acpica', 'bugzilla-10224', 'bugzilla-9772', 'bugzilla-9916', 'ec', 'eeepc', 'idle', 'misc', 'pm-legacy', 'sysfs-links-2.6.26', 'thermal', 'thinkpad' and 'video' into release 2008-04-30 13:58:00 -04:00
Alexey Starikovskiy 204470272c ACPI: GPE enabling should happen after EC installation
GPE could try to access EC region, so should not be enabled before
EC is installed

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

Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-04-24 19:55:20 -04:00
Len Brown 75a44ce00b ACPICA: update Intel copyright
Signed-off-by: Len Brown <len.brown@intel.com>
2008-04-23 23:00:13 -04:00
Zhang Rui 514d18d79b ACPICA: Update for new Notify values
Implemented several changes for Notify handling: Added support
for new Notify values (ACPI 2.0+) and improved the Notify debug
output. Notify on PowerResource objects is no longer allowed,
as per the ACPI specification.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-04-22 23:01:36 -04:00
Bob Moore cd0b224824 ACPICA: Fixes for external Reference Objects
All Reference Objects returned via the AcpiEvaluteObject interface
are now marked as type "REFERENCE" instead of "ANY". The type ANY
is now reservered for NULL objects - either NULL package elements
or unresolved named references.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-04-22 19:08:51 -04:00
Lin Ming 7a5bb99645 ACPICA: Fix to handle NULL package elements correctly
Fixed problem where NULL package elements were not returned to
the AcpiEvaluateObject interface correctly. Instead of returning a
NULL ACPI_OBJECT package element, the element was simply ignored,
potentially causing a buffer overflow and/or confusing the caller
who expected a fixed number of elements.

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

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-04-22 15:35:19 -04:00
Bob Moore 24a3157a90 ACPICA: Fix for possible error when packages/buffers are passed to methods externally
Fixed a problem where buffer and package objects passed as
arguments to a control method via the external AcpiEvaluateObject
interface could cause an AE_AML_INTERNAL exception depending on the
order and type of operators executed by the target control method.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-04-22 14:29:31 -04:00
Bob Moore b1dd9096fe ACPICA: Added new error messages
New messages for the 2 AE_SUPPORT cases.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-04-22 14:29:31 -04:00
Bob Moore 507f046c4d ACPICA: Add va_end statements as appropriate
Added missing va_end statements that should correspond with each
va_start statement.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-04-22 14:29:31 -04:00
Lin Ming bc7a36ab74 ACPICA: Fixes for Unload and DDBHandles
Implemented support for the use of DDBHandles as an Indexed
Reference, as per the ACPI spec.

http://www.acpica.org/bugzilla/show_bug.cgi?id=486.

Implemented support for UserTerm (Method invocation) for the Unload operator
as per the ACPI spec.

http://www.acpica.org/bugzilla/show_bug.cgi?id=580

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-04-22 14:29:30 -04:00
Lin Ming ef805d9563 ACPICA: Implemented full argument resolution support for the BankValue argument to BankField
Previously, only constants were supported, now any TermArg may
be used.

http://www.acpica.org/bugzilla/show_bug.cgi?id=387
http://www.acpica.org/bugzilla/show_bug.cgi?id=393

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-04-22 14:29:28 -04:00
Bob Moore 1f549a240c ACPICA: Fixed a problem with FromBCD and ToBCD with some compilers
On some compilers, the ShortDivide function worked incorrectly,
causing problems with the BCD functions with large input
values. (Truncation from 64-bit to 32-bit occurred.) Internal
http://www.acpica.org/bugzilla/show_bug.cgi?id=435

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-04-22 14:29:27 -04:00
Bob Moore 1d18c05825 ACPICA: Cosmetic changes only, no functional changes
Lint changes, fix compiler warnings, etc.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-04-22 14:29:27 -04:00
Bob Moore 9e41d93c97 ACPICA: Fixed a memory leak when Device or Thermal objects referenced in packages
Problem introduced in fix for Package references.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-04-22 14:29:26 -04:00
Bob Moore 5eb691805f ACPICA: Fix for fault if Load() fails
Fixed a problem with the Load operator when loading a table from
a buffer object. The input buffer was prematurely zeroed and/or
deleted.

http://www.acpica.org/bugzilla/show_bug.cgi?id=577

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-04-22 14:29:24 -04:00
Lin Ming 3e08e2d2d6 ACPICA: New interfaces for table event handlers
Designed and implemented new external interfaces to install and
remove handlers for ACPI table-related events. Current events that
are defined are LOAD and UNLOAD. These interfaces allow the host to
track ACPI tables as they are dynamically loaded and unloaded. See
AcpiInstallTableHandler and AcpiRemoveTableHandler.

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-04-22 14:29:24 -04:00
Bob Moore e20a679b4a ACPICA: Support for iASL - multiple files and wildcards
Implemented support to allow multiple files to be
compiled/disassembled in a single invocation. This includes
command line wildcard support for both the Windows and Unix
versions of the compiler. This feature simplifies the disassembly
and compilation of multiple ACPI tables in a single directory.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-04-22 14:29:23 -04:00
Bob Moore ba886cd4ac ACPICA: Update for mutiple global lock acquisitions by same thread
Allows AcpiAcquireGlobalLock external interface to be called
multiple times by the
 same thread. Allows use of AML fields that require the global
 lock while the running AML is already holding the global lock.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-04-22 14:29:21 -04:00
Len Brown c523aef0f7 Merge branches 'release', 'button-sysfs', 'misc', 'mismatch', 'randconfig' and 'toshiba' into release 2008-03-13 01:59:49 -04:00
Harvey Harrison 96b2dd1f1f ACPI: replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-03-11 01:58:41 -04:00
Lin Ming c8d16e27a3 ACPI: fix boot oops regression in thermal
Fix a memory overflow bug when copying
NULL internal package element object to external.

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

Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2008-03-11 00:15:19 -04: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
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
Andrew Morton 3e0d69ecf0 ACPI: add dump_stack() to trace acpi_format_exception programming errors
Dump the stack so we can find the secretive caller to acpi_format_exception().

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-08-25 01:39:02 -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
Len Brown b4b613fd83 Pull osi into release branch 2007-07-22 02:29:41 -04:00
Bob Moore 3c6394c5bd ACPICA: Update _OSI string list
Latest update for the Windows strings, with comments. Removed
unused strings.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-07-03 01:54:33 -04:00
Myron Stowe 83dd450445 ACPICA: fix error path in new external package objects as method arguments
In the routine acpi_ut_create_package_object(), if the
ACPI_ALLOCATE_ZEROED() fails then ACPI_FREE(package_desc) is called as
part of the cleanup.  This should instead be
acpi_ut_remove_reference(package_desc) in order to remove the reference
acquired from acpi_ut_create_internal_object() [see the routine
acpi_ut_create_buffer_object() as an example of proper functionality].

Signed-off-by: Myron Stowe <myron.stowe@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
2007-06-18 00:51:47 -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
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 f507654d45 ACPI: Make _OSI(Linux) a special case
_OSI("Linux") is like _OS("Linux"), it is ill-defined and
virtually no BIOS vendors test interaction with it.
As a result, it can do more damage than good because
it causes the BIOS to follow un-tested paths.

Recently, several machines have turned up that erroneously
test this string in a way which causes them to _not_ test other
compatibility strings, including the ZI9 and Toshiba.
So it appears that this bad code has made it into
a BIOS vendor's reference BIOS.

Linux has no choice but to stop advertising compatibility
with _OSI string "Linux" - as there are an unbounded
number of possible incompatibilities going forward.

But some BIOSes have already shipped which do use it
for things like conditionally re-enabling video on resume
from S3.  (Too bad they didn't do that unconditionally)

Add special case code for _OSI(Linux)
Squawk to dmesg if _OSI(Linux) is requested
Add DMI list both to enable and disable _OSI(Linux)
But for now, keep the default enabled via
#define OSI_LINUX_ENABLED.

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

Signed-off-by: Len Brown <len.brown@intel.com>
2007-05-30 00:10:38 -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
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
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 b0b7eaaf0c ACPICA: fix gcc build warnings
drivers/acpi/namespace/nsparse.c:126: warning: int format, different type arg (arg 7)
drivers/acpi/tables/tbfadt.c:224: warning: unsigned int format, different type arg (arg 6)
drivers/acpi/utilities/utdebug.c:184: warning: cast from pointer to integer of different size
drivers/acpi/utilities/utdebug.c:184: warning: cast from pointer to integer of different size
drivers/acpi/utilities/utdebug.c:197: warning: cast from pointer to integer of different size
drivers/acpi/processor_idle.c:1093: warning: long long unsigned int format, u64 arg (arg 5)

Signed-off-by: Len Brown <len.brown@intel.com>
2007-02-02 23:08:40 -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
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 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 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 b89b71a001 ACPICA: Cleanup of FADT verification function.
Removed offset display, not needed.

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 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 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 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