aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica
Commit message (Collapse)AuthorAgeFilesLines
* ACPICA: Fix for a Store->ArgX when ArgX contains a reference to a field.Bob Moore2013-09-061-64/+102
| | | | | | | | | | | | | This change fixes a problem where a Store operation to an ArgX object that contained a reference to a field object did not complete the automatic dereference and then write to the actual field object. Instead, the object type of the field object was inadvertently changed to match the type of the source operand. The new behavior will actually write to the field object (buffer field or field unit), thus matching the correct ACPI-defined behavior. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* Merge branch 'acpica'Rafael J. Wysocki2013-08-2720-77/+232
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * acpica: ACPICA: Update version to 20130725. ACPICA: Update names for walk_namespace callbacks to clarify usage. ACPICA: Return error if DerefOf resolves to a null package element. ACPICA: Make ACPI Power Management Timer (PM Timer) optional. ACPICA: Fix divergences of the commit - ACPICA: Expose OSI version. ACPICA: Fix possible fault for methods that optionally have no return value. ACPICA: DeRefOf operator: Update to fully resolve FieldUnit and BufferField refs. ACPICA: Emit all unresolved method externals in a text block ACPICA: Export acpi_tb_validate_rsdp(). ACPI: Add facility to remove all _OSI strings ACPI: Add facility to disable all _OSI OS vendor strings ACPICA: Add acpi_update_interfaces() public interface ACPICA: Update version to 20130626 ACPICA: Fix compiler warnings for casting issues (only some compilers) ACPICA: Remove restriction of 256 maximum GPEs in any GPE block ACPICA: Disassembler: Expand maximum output string length to 64K ACPICA: TableManager: Export acpi_tb_scan_memory_for_rsdp() ACPICA: Update comments about behavior when _STA does not exist
| * ACPICA: Update names for walk_namespace callbacks to clarify usage.Bob Moore2013-08-133-23/+23
| | | | | | | | | | | | | | | | | | | | Use of "preorder" and "postorder" was incorrect. The callbacks are simply invoked during tree ascent and descent during the depth-first walk. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| * ACPICA: Return error if DerefOf resolves to a null package element.Bob Moore2013-08-131-3/+10
| | | | | | | | | | | | | | | | | | | | | | Disallow the dereference of a reference (via index) to an uninitialized package element. Provides compatibility with other ACPI implementations. ACPICA BZ 1003. References: https://bugs.acpica.org/show_bug.cgi?id=431 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| * ACPICA: Make ACPI Power Management Timer (PM Timer) optional.Bob Moore2013-08-132-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | PM Timer is now optional. This support is already in Windows8 and "SHOULD" come out in ACPI 5.0A (if all goes well). The change doesn't affect Linux directly, because it does not rely on the presence of the PM timer. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| * ACPICA: Fix divergences of the commit - ACPICA: Expose OSI version.Lv Zheng2013-08-132-2/+6
| | | | | | | | | | | | | | | | | | | | | | The original commit 242b2287cd7f27521c8b54a4101d569e53e7a0ca "ACPICA: expose OSI version" triggers build errors in ACPICA when it is back ported. The patch removes the divergences between Linux and upstream ACPICA resulting from that. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| * ACPICA: Fix possible fault for methods that optionally have no return value.Bob Moore2013-08-131-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently applies to the _WAK method only. If the method has no return value and slack mode is not enabled, the return value validation code can fault. Also improves the error message when an expected return value is missing (for any predefined name/method). The problem fixed here cannot happen on Linux unless acpi=strict is added to the kernel command line. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| * ACPICA: DeRefOf operator: Update to fully resolve FieldUnit and BufferField ↵Bob Moore2013-08-081-3/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | refs. Previously, references to these objects were resolved only to the actual FieldUnit or BufferField object. The correct behavior is to resolve these references to an actual value. The problem is that DerefOf did not resolve these objects to actual values. An "Integer" object is simple, return the value. But a field in an operation region will require a read operation. For a BufferField, the appropriate data must be extracted from the parent buffer. NOTE: It appears that this issues is present in Windows7 but not Windows8. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| * ACPICA: Emit all unresolved method externals in a text blockBob Moore2013-08-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Put all of the unresolved external method declarations in a single block, since they are important and may cause the resulting disassembled ASL file to not compile. This patch only affects ACPICA utilities and is necessary to avoid adding source code divergences between Linux and ACPICA upstream. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| * ACPICA: Export acpi_tb_validate_rsdp().Bob Moore2013-08-082-6/+4
| | | | | | | | | | | | | | | | | | | | This patch exports acpi_tb_validate_rsdp(), so that code duplication in some ACPICA utilities can be reduced. This patch also includes lint changes. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| * ACPICA: Add acpi_update_interfaces() public interfaceLv Zheng2013-07-234-13/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new API to allow OSPM to disable/enable specific types of _OSI interface strings. ACPICA does not have the knowledge about whether an _OSI interface string is an OS vendor string or a feature group string and there isn't any API interface to allow OSPM to install a new interface string as a feature group string. This patch simply adds all feature group strings defined by ACPI specification into the acpi_default_supported_interfaces with ACPI_OSI_FEATURE flag set to fix this gap. This patch also adds codes to keep their default states as ACPI_OSI_INVALID before the initialization and after the termination. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Reviewed-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Acked-by: Len Brown <len.brown@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Conflicts: include/acpi/actypes.h (with commit 242b228)
| * ACPICA: Fix compiler warnings for casting issues (only some compilers)Jung-uk Kim2013-07-232-4/+6
| | | | | | | | | | | | | | | | | | | | | | Fixes compiler warnings from GCC 4.2 and perhaps other compilers. Jung-uk Kim <jkim@FreeBSD.org> Signed-off-by: Jung-uk Kim <jkim@FreeBSD.org> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Acked-by: Len Brown <len.brown@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| * ACPICA: Remove restriction of 256 maximum GPEs in any GPE blockBob Moore2013-07-231-11/+0
| | | | | | | | | | | | | | | | | | | | The FADT can support over 1000 GPEs, so remove any restriction on the GPE numbers. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Acked-by: Len Brown <len.brown@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| * ACPICA: Disassembler: Expand maximum output string length to 64KBob Moore2013-07-232-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | Was 256 bytes max. The original purpose of this constraint was to limit the amount of debug output. However, the string function in question (UtPrintString) is now used for the disassembler also, where 256 bytes is insufficient. Reported by RehabMan@GitHub. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Acked-by: Len Brown <len.brown@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| * ACPICA: TableManager: Export acpi_tb_scan_memory_for_rsdp()Bob Moore2013-07-232-3/+6
| | | | | | | | | | | | | | | | | | | | This patch exports this function to be used by other ACPICA utilities. Chao Guan, Bob Moore. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Acked-by: Len Brown <len.brown@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| * ACPICA: Update comments about behavior when _STA does not existBob Moore2013-07-232-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | No functional change. Add some comments concerning behavior when the _STA method does not exist. According to the ACPI specification, in this case the device should be assumed to be present, functional, and enabled. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Acked-by: Len Brown <len.brown@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* | ACPI / sleep: Introduce acpi_os_prepare_extended_sleep() for extended sleep pathBen Guthro2013-07-311-0/+9
|/ | | | | | | | | | Like acpi_os_prepare_sleep(), register a callback for use in systems like tboot, and xen, which have system specific requirements outside of ACPICA. This mirrors the functionality in acpi_os_prepare_sleep(), called from acpi_hw_sleep() Signed-off-by: Ben Guthro <benjamin.guthro@citrix.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: expose OSI versionAaron Lu2013-07-181-13/+0
| | | | | | | | | | | | | | Expose acpi_gbl_osi_data so that code outside of ACPICA can check the value of the last successfull _OSI call. The definitions for OSI versions are moved to actypes.h so that other components can access them too. Based on a patch from Matthew Garrett which in turn was based on an earlier patch from Seth Forshee. [rjw: Changelog] Signed-off-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: _CST repair: Handle null package entriesLv Zheng2013-06-201-12/+12
| | | | | | | | | | | | Sort package only after null/bad elements have been removed. Fixes a problem where the _CST sort was performed too early. This change sorts the package only after null/bad elements have been removed. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Add several repairs for _CST predefined nameLv Zheng2013-06-202-12/+163
| | | | | | | | | | | | | | | | Sort list based on the C-state, remove invalid/zero entries. ACPICA BZ 890. Lv Zheng. Fixes these possible problems with the _CST object: 1. Sort the list ascending by C state type. 2. Ensure type cannot be zero. 3. A sub-package count of zero means _CST is meaningless. 4. Count must match the number of C state sub-packages. References: https://bugs.acpica.org/show_bug.cgi?id=890 Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Move _PRT repair into the standard complex repair moduleLv Zheng2013-06-204-54/+99
| | | | | | | | | | | | | | Moved this longstanding repair to the relatively new predefined name repair module. ACPICA BZ 783. Lv Zheng. No functional change. This change simply moves the repair code from where it was originally implemented to the (more recent) repair module where it now belongs. References: https://bugs.acpica.org/show_bug.cgi?id=783 Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Clear events initialized flag upon event component terminationTomasz Nowicki2013-06-161-0/+2
| | | | | | | | | | | | Clear this flag to allow clean startup and even double termination. ACPICA BZ 1013. Tomasz Nowicki <tomasz.nowicki@linaro.org> References: https://bugs.acpica.org/show_bug.cgi?id=1013 Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Reviewed-by: Len Brown <len.brown@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Fix possible memory leak in GPE init error pathTomasz Nowicki2013-06-161-0/+2
| | | | | | | | | | | | Some GPE blocks were not deleted. ACPICA BZ 1018. Tomasz Nowicki <tomasz.nowicki@linaro.org> References: https://bugs.acpica.org/show_bug.cgi?id=1018 Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Reviewed-by: Len Brown <len.brown@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: ACPICA Termination: Delete global lock pending lockTomasz Nowicki2013-06-161-0/+1
| | | | | | | | | | | | Add deletion of this lock, used for the global lock. ACPICA BZ 1012. Tomasz Nowicki <tomasz.nowicki@linaro.org> References: https://bugs.acpica.org/show_bug.cgi?id=1012 Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Reviewed-by: Len Brown <len.brown@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Update interface to acpi_ut_valid_acpi_name()Bob Moore2013-06-163-7/+6
| | | | | | | | | | Clean up the interface by making the input argument a char * string instead of a UINT32 name. This is easier to use for all callers and eliminates casting to *(UINT32*) Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Do not use extended sleep registers unless HW-reduced bit is setLv Zheng2013-06-161-3/+5
| | | | | | | | | | | | | | | | | Previous implementation incorrectly used the ACPI 5.0 extended sleep registers if they were simply populated. This caused problems on some non-HW-reduced machines. As per the ACPI spec, they should only be used if the HW-reduced bit is set. Lv Zheng, ACPICA BZ 1020. References: https://bugzilla.kernel.org/show_bug.cgi?id=54181 References: https://bugs.acpica.org/show_bug.cgi?id=1020 Reported-by: Daniel Rowe <bart@fathom13.com> Bisected-by: Brint E. Kriebel <kernel@bekit.net> Cc: 3.4+ <stable@vger.kernel.org> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Split table print utilities to a new a separate fileBob Moore2013-06-163-190/+239
| | | | | | | | Improves configurability of ACPICA. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Add option to disable loading of SSDTs from the RSDT/XSDTLv Zheng2013-06-162-15/+16
| | | | | | | | | | | | Optionally do not load any SSDTs from the RSDT/XSDT during initialization. This can be useful for overriding SSDTs using DSDT overriding, thus useful for debugging ACPI problems on some machines. Lv Zheng. ACPICA BZ 1005. References: https://bugs.acpica.org/show_bug.cgi?id=1005 Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Standardize all switch() blocksChao Guan2013-06-1671-77/+242
| | | | | | | | | | | | After many years, different formatting for switch() has crept in. This change makes every switch block identical. Chao Guan. ACPICA bugzilla 997. References: https://bugs.acpica.org/show_bug.cgi?id=997 Signed-off-by: Chao Guan <chao.guan@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Split internal error msg routines to a separate fileBob Moore2013-06-165-278/+333
| | | | | | | | | Improves configurability of ACPICA. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Acked-by: Len Brown <len.brown@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Split buffer dump routines into separate fileBob Moore2013-06-163-147/+203
| | | | | | | | | | To enhance configurability of ACPICA. The new file is utilities/utbuffer.c Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Acked-by: Len Brown <len.brown@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Update for "orphan" embedded controller _REG method supportZhang Rui2013-06-011-40/+21
| | | | | | | | | | | | | | | | This refers to _REG methods under the EC device that have no corresponding operation region. This is allowed by the ACPI specification. This update removes a dependency on having an ECDT table, and will execute an orphan _REG method as long as the handler for the EC is installed at the EC device node (not the namespace root). Rui Zhang (original update), Bob Moore (update/integrate). Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Acked-by: Len Brown <len.brown@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Predefined name support: Remove unused local variableBob Moore2013-06-011-4/+1
| | | | | | | | | "Pathname" is no longer used. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Acked-by: Len Brown <len.brown@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Add argument typechecking for all predefined ACPI namesBob Moore2013-06-0120-474/+798
| | | | | | | | | | | | Fully implements typechecking on all incoming arguments for all predefined names. This ensures that ACPI-related drivers are passing the correct number of arguments, each of the correct object type. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Acked-by: Len Brown <len.brown@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Add BIOS error interface for predefined name validation supportBob Moore2013-06-013-8/+59
| | | | | | | | | BIOS error message for errors found in predefined names. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Acked-by: Len Brown <len.brown@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Change an exception code for the ASL UnLoad() operatorBob Moore2013-06-011-1/+1
| | | | | | | | | | | Change the exception code for the case where the input DdbHandle is invalid from AE_BAD_PARAMETER to the more appropriate AE_AML_OPERAND_TYPE. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Acked-by: Len Brown <len.brown@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: ACPICA: Fix for _INI regressionTomasz Nowicki2013-05-081-0/+1
| | | | | | | | | | | | | | This change fixes a problem introduced by recent commit c34c82b (ACPICA: Predefine names: Add allowed argument types to master info table) in 20130328 where _INI methods are no longer executed properly because of a memory block that is not initialized properly. ACPICA BZ1016. Tomasz Nowicki <tomasz.nowicki@linaro.org> References: https://bugs.acpica.org/show_bug.cgi?id=1016 Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: _OSI support: Fix possible memory leakJung-uk Kim2013-05-081-1/+2
| | | | | | | | | | | | Fixes a possible memory leak in the error exit path introduced by recent commit 388a990 ("ACPICA: _OSI Support: handle any errors from acpi_os_acquire_mutex()"). [rjw: Changelog] Signed-off-by: Jung-uk Kim <jkim@FreeBSD.org> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Fix possible buffer overflow during a field unit read operationBob Moore2013-05-081-1/+13
| | | | | | | | | | | | | Can only happen under these conditions: 1) The DSDT version is 1, meaning integers are 32-bits. 2) The field is between 33 and 64 bits long. It applies cleanly back to ACPICA 20100806+ (Linux v2.6.37+). Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Cc: 2.6.37+ <stable@vger.kernel.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Add a lock to the internal object reference count mechanismBob Moore2013-04-123-35/+57
| | | | | | | | | | | | | Certain external interfaces need to update object references without holding the interpreter or namespace mutex objects. To prevent race conditions, add a spinlock around the increment and decrement of the reference counts for internal ACPI objects. Reported by Andriy Gapon (avg@FreeBSD.org). Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Andriy Gapon <avg@FreeBSD.org> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Fix a format string for 64-bit generationBob Moore2013-04-121-1/+2
| | | | | | | | | Fix a warning on 64-bit for a length value. Cast to 32-bit since the length is related to an ACPI table. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Remove FORCE_DELETE option for global reference count mechanismBob Moore2013-04-122-14/+3
| | | | | | | | This option is not used and is obsolete. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Improve error message for Index() operatorBob Moore2013-04-121-4/+6
| | | | | | | | | | For the case where an attempt is made to take an Index() beyond the end of a String, Buffer, or Package, emit the actual length of the object to the error message. Helpful for debugging. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: FADT: Remove extraneous warning for very large GPE registersLinn Crosetto2013-04-121-0/+4
| | | | | | | | | | | | | This change removes a size mismatch warning if the legacy length field for a GPE register set is larger than the 64-bit GAS structure can accomodate. GPE register sets can be larger than the 255 bit limitation of the GAS structure. Linn Crosetto (linn@hp.com). Signed-off-by: Linn Crosetto <linn@hp.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Fix a typo in a function header, no functional changeColin Ian King2013-04-121-1/+1
| | | | | | | | | Reported by Colin King. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Fix a typo in an error messageColin Ian King2013-04-121-1/+1
| | | | | | | | | Remove an extraneous minus/dash. Reported by Colin Ian King. Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Fix for some comments/headersTang Chen2013-04-121-10/+12
| | | | | | | | | No functional change. Includes parameter rename from Tang Chen. Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: _OSI Support: handle any errors from acpi_os_acquire_mutex()Jung-uk Kim2013-04-123-11/+34
| | | | | | | | | | | Check for any errors. Handles possible timeout case if ACPI_WAIT_FOREVER is changed to be less than "forever". Jung-uk Kim. Signed-off-by: Jung-uk Kim <jkim@FreeBSD.org> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Predefine names: Add allowed argument types to master info tableBob Moore2013-04-128-513/+1361
| | | | | | | | | | | | This change adds the infrastructure to enable typechecking on incoming arguments for the predefined methods/objects. It does not actually contain the code that will fully utilize this information. Also condenses some duplicate code for the predefined names into a new module, utilities/utpredef.c Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Object repair: Allow 0-length packages for variable-length packagesBob Moore2013-03-121-2/+8
| | | | | | | | | | For the predefined names that return fully variable-length packages, allow a zero-length package with no warning, since it is technically a legal construct (and BIOS writers use it.) Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>