summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica
Commit message (Collapse)AuthorAgeFilesLines
* ACPICA: Delete all attached data objects during namespace node deletion.Tomasz Nowicki2013-11-211-4/+8
| | | | | | | | | | | | This fix updates namespace node deletion to delete the entire list of attached objects (attached via acpi_attach_data) instead of just one of the attached items. ACPICA BZ 1024. Tomasz Nowicki (tomasz.nowicki@linaro.org). 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: Resources: Fix loop termination for the get AML length function.Lv Zheng2013-11-214-25/+28
| | | | | | | | | | | | | | | | The loop terminates on a NULL resource pointer, which can never happen since the loop simply increments a valid resource pointer. This fix changes the loop to terminate on an end-of-buffer condition. Problem can be seen by callers to AcpiSetCurrentResources with an invalid or corrupted resource descriptor; or a resource descriptor without an END_TAG descriptor. (refined by Bob Moore) Reported-by: Dan Carpenter <dan.carpenter@oracle.com> 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: Debug output: Do not emit function nesting level for kernel build.Bob Moore2013-11-211-7/+24
| | | | | | | | | | | | The nesting level is really only useful during a single-thread execution. Therefore, only enable this output for the AcpiExec utility. Also, only emit the thread ID when executing under AcpiExec. (Context switches are still detected and a message is emitted.) ACPICA BZ 972. 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 __init for ACPICA initializers/finalizers.Lv Zheng2013-10-316-9/+8
| | | | | | | | | | | | | | | | | | | | | | This patch adds __init to the ACPICA documented initializers: acpi_initialize_tables() acpi_initialize_subsystem() acpi_load_tables() acpi_enable_subsystem() acpi_initialize_objects() and to acpi_reallocate_root_table(), acpi_find_root_pointer() which are also meant to be called only during initialization. This patch adds __init to the ACPICA documented finalizer: acpi_terminate() as this finalizer is only called in __init function now. This change helps to reduce source code differences between ACPICA upstream and Linux. [rjw: Changelog] Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Cleanup asmlinkage for ACPICA APIs.Lv Zheng2013-10-311-2/+2
| | | | | | | | | | | | | | | Add an asmlinkage wrapper around acpi_enter_sleep_state() to prevent an empty stub from being called by assmebly code for ACPI_REDUCED_HARDWARE set. As arch/x86/kernel/acpi/wakeup_xx.S is only compiled when CONFIG_ACPI=y and there are no users of ACPI_HARDWARE_REDUCED, currently this is in fact not a real issue, but a cleanup to reduce source code differences between Linux and ACPICA upstream. [rjw: Changelog] Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Fix cached object deletion code.Lv Zheng2013-10-311-2/+2
| | | | | | | | | | | | | Function acpi_ut_delete_caches() is meant to be used to implement ACPI_ALLOCATE()/ACPI_FREE() mechanisms in ACPICA, so it should call acpi_os_free() rather than ACPI_FREE(). Linux is not affected by this issue as it uses kmem_cache instead of the ACPICA local cache, but the change helps to reduce source code differences between Linux and ACPICA upstream. [rjw: Changelog] Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Remove dead AOPOBJ_INVALID check.Lv Zheng2013-10-311-6/+0
| | | | | | | | | | | | | Reversion commit 7cb7f45c7fee (Revert "ACPICA: Remove obsolete acpi_os_validate_address interface") restored a piece of dead code related to an obselete AOPOBJ_INVALID flag. Remove that code again. This helps to reduce source code differences between Linux and ACPICA upstream. [rjw: Changelog] Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Cleanup useless memset invocations.Lv Zheng2013-10-312-2/+0
| | | | | | | | | | This patch removes unnecessary memset() invocations where kmem_cache_zalloc() is used for allocating memory. It also helps to reduce source code differences between ACPICA upstream and Linux. [rjw: Changelog] Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Fix an ACPI_ALLOCATE_ZEROED() reversal.Lv Zheng2013-10-311-1/+1
| | | | | | | | | | | | | ACPI_FREE() should always be used to free objects allocated with ACPI_ALLOCATE_ZEROED(), so make acpi_ut_create_package_object() do that. This patch ports a fix from ACPICA upstream to Linux and helps to reduce source code differences between them. [rjw: Changelog] Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Fix wrong object length returned by acpi_ut_get_simple_object_size().Lv Zheng2013-10-311-10/+13
| | | | | | | | | | | The object length returned by acpi_ut_get_simple_object_size() should be rounded up to the closest word boundary. This patch ports a fix from ACPICA upstream to Linux. [rjw: Changelog] Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Add new statistics interface.Lv Zheng2013-10-315-0/+54
| | | | | | | | | | This patch ports new counters and statistics interface, already implemented in ACPICA upstream, to Linux. That helps to reduce source code differences between Linux and ACPICA upstream. [rjw: Changelog] Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Update namespace dump code.Lv Zheng2013-10-311-2/+5
| | | | | | | | | | | This patch merges namespace dump code updates from ACPICA upstream to reduce the source code differences between Linux and ACPICA upstream. No functional changes as currently nsdumpdv.c is not used by Linux. This patch does not affect the generation of the Linux kernel binary. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Update check for setting the ANOBJ_IS_EXTERNAL flag.Lv Zheng2013-10-311-1/+2
| | | | | | | | | | | | The ANOBJ_IS_EXTERNAL flag is only used by an ACPICA utilities - iASL. No functional change for the Linux kernel should results from applying this patch, but it helps to reduce source code differences between the kernel and ACPICA upstream. [rjw: Subject and changelog] Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Update default space handlers.Lv Zheng2013-10-311-0/+1
| | | | | | | | | | | | | This patch adds code that is already in ACPICA upstream, so applying it can help to reduce the source code differences between Linux and ACPICA upstream. This code fragment is only useful for ACPICA utilities and no functional changes to the Linux kernel should result from it. [rjw: Changelog] Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Fix indentation issues for macro invocations.Lv Zheng2013-10-314-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During the automatic translation of the upstream ACPICA source code into Linux kernel source code some extra white spaces are added by the "indent" program at the beginning of each line which is an invocation of a macro and there is no ";" at the end of the line. For this reason, a new mode has been added to the translation scripts to remove the extra spaces inserted before invoking such macros and add an empty line between the invocations of such macros (like the other function declarations). This new mode is executed after executing "indent" during the Linux release process. Consequently, some existing ACPICA source code in the Linux kernel tree needs to be adjusted to allow the new scripts to work correctly. The affected macros and files are: 1. ACPI_HW_DEPENDENT_RETURN (acpixf.h/acdebug.h/acevents.h): This macro is used as a wrapper for hardware dependent APIs to offer a stub when the reduced hardware is configured during compilation. 2. ACPI_EXPORT_SYMBOL (utglobal.c): This macro is used by Linux to export symbols to be found by Linux modules. All such invocations are well formatted except those exported as global variables. This can help to reduce the source code differences between Linux and upstream ACPICA, and also help to automate the release process. No functional or binary generation changes should result from it. Lv Zheng. [rjw: Changelog] 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: Deploy ACPI_EXPORT_SYMBOL_INIT for main ACPICA initialization ↵Lv Zheng2013-10-314-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | interfaces. This changes can reduce source code differences between Linux and ACPICA upstream to help improving the release automation. The side effect of applying this patch in Linux is: 1. Some ACPICA initialization/termination APIs are no longer exported in Linux, these include: acpi_load_tables acpi_initialize_subsystem acpi_enable_subsystem acpi_initialize_objects acpi_terminate 2. This patch does not affect the following APIs as they are currently not marked with ACPI_EXPORT_SYMBOL in Linux: acpi_reallocate_root_table acpi_initialize_tables Such functions should not be exported as they are internal to ACPI subsystem in Linux, and will only be invoked inside of ACPI subsystem's initialization routines marked with __init and termination routines marked with __exit. While on other OSPMs, such functions may still need to be exported. Thus this patch adds the configurability for ACPICA, so that it leaves OSPMs to determine if the __init/__exit marked functions should be exported or not. Lv Zheng. 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: Linuxize: Change indentation of C labels.Lv Zheng2013-10-3160-112/+112
| | | | | | | | | | | It is reported by kernel build test systems that all ACPICA source files in the kernel tree have incorrect label indentation. This patch changes default indent option used in the release process to fix this bug. Lv Zheng. 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: Clarify ACPI_FREE_BUFFER usage.Bob Moore2013-10-311-1/+1
| | | | | | | | | | | | | Add a comment to clarify reason for using ACPI_FREE_BUFFER directly instead of ACPI_FREE. In addition to that, change one instance in which ACPI_FREE_BUFFER() should be used instead of ACPI_FREE(). [rjw: Subject and changelog] 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 EXPORT_ACPI_INTERFACES macro to external interface modules.Lv Zheng2013-10-3120-20/+37
| | | | | | | | | | | | For Linux, there are no functional changes/binary generation differences introduced by this patch. This change adds a new macro to all files that contain external ACPICA interfaces. It can be detected and used by the host (via the host-specific header) for any special processing required for such modules. Lv Zheng. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Hardcode access width for the reset register.Bob Moore2013-10-301-2/+8
| | | | | | | | | | | | The ACPI spec requires the reset register width to be 8, so we now hardcode it and ignore the FADT value. This provides/maintains compatibility with other ACPI implementations that have allowed BIOS code with bad register width values to go unnoticed. Matthew Garett, Bob Moore, Lv Zheng. 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 memory leaks in the GPE handling.Lv Zheng2013-10-301-0/+1
| | | | | | | | | This change fixes potential memory leaks in the error paths of the GPE handling code. Lv Zheng. 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: Cleanup memory allocation macros and configurability.Lv Zheng2013-10-304-120/+59
| | | | | | | | | | | | | | | In the common case, the ACPI_ALLOCATE and related macros now resolve directly to their respective acpi_os* OSL interfaces. Two options: 1) The ACPI_ALLOCATE_ZEROED macro defaults to a simple local implementation by default, unless overridden by the USE_NATIVE_ALLOCATE_ZEROED define. 2) For ACPI execution simulation environment (AcpiExec) which is not shipped with the Linux kernel, the macros can optionally be resolved to the local interfaces that track each allocation (used to immediately detect memory leaks). 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 safe versions of common string functions.Bob Moore2013-10-303-1/+74
| | | | | | | | | | | | | | | | | | This change adds and deploys "safe" versions of strcpy and strcat that ensure that the target buffer does not overflow. These safe functions are only helpful for processing user input and command lines. For most ACPICA code however, the required buffer length is precisely calculated before buffer allocation, so the use of these functions is unnecessary. ACPICA BZ 1043. This change only applies to the ACPICA utilities and the debugger, none of which are not shipped with the kernel yet, so the kernel's behavior remains unchanged after it. References: https://bugs.acpica.org/show_bug.cgi?id=1043 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 history/line-editing for Unix/Linux systems.Bob Moore2013-10-301-0/+2
| | | | | | | | | | | | | | | | | | | | The original upstream ACPICA change added full history and limited line editing to the debugger: This change adds full history and limited line editing for Unix and Linux systems. It does not use readline() because of portability issues. Instead it uses the POSIX termio interface to put the terminal in raw input mode so that the various special keys can be trapped (such as up-arrow and down-arrow for history support). Since the debugger is not shipped in the kernel, it only is necessary to update one header file to keep the kernel source in sync with the upstream. [rjw: Changelog] 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 a check for a null node during namespace walk.Bob Moore2013-10-301-0/+7
| | | | | | | | | | | | | Mostly for consistency. ACPICA BZ 1042. Actually, currently no one is experiencing problem without this check as the obj_handle is guaranteed to be valid. References: https://bugs.acpica.org/show_bug.cgi?id=1042 Reported-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: Table print header function: Increase default width for table length.Bob Moore2013-10-301-3/+3
| | | | | | | | | | | This change increases the default width for the length of tables from 5 to 6, to improve alignment/readability on systems with large tables. These are being seen more frequently, especially large DSDTs (greater than 1 MB). 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: Ensure that debug output is immediately disabled on termination.Tomasz Nowicki2013-10-301-0/+1
| | | | | | | | | | | | | | Set the global debug flag to "no output" when the debugger is shutdown. ACPICA BZ 1011. Tomasz Nowicki. Since the debugger is not shipped in the Linux kernel upstream, this change doesn't affect Linux kernel's behavior. References: https://bugs.acpica.org/show_bug.cgi?id=1011 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: SCI Handlers: Update handler interface, eliminate unnecessary argument.Bob Moore2013-09-241-3/+1
| | | | | | | | | | The SCI interrupt number is not needed for the SCI handlers, and was just unnecessary overhead. 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: Tables: Cleanup RSDP signature codes.Lv Zheng2013-09-242-3/+2
| | | | | | | | | | | | This patch introduces new macors to handle RSDP signature and cleans up the affected codes. Lv Zheng. Some updates are only used for ACPICA utilities which are not shipped in the kernel yet. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Reviewed-by: Len Brown <len.brown@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Tables: Cleanup table checksum verification code.Lv Zheng2013-09-242-9/+13
| | | | | | | | | | | This patch reduces code redundancy by moving the FACS/S3PT checksum verification skip logic into acpi_tb_verify_checksum() and other calls of this function also get benefit from this change. Lv Zheng. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Reviewed-by: Len Brown <len.brown@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Debugger: Add new command to display full namespace pathnames.Bob Moore2013-09-243-0/+142
| | | | | | | | | | Paths command displays the full pathname and object type for the entire namespace. Alternative to the Namespace command. 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: Operation region support: Never free the handler "context" pointer.David E. Box2013-09-241-10/+13
| | | | | | | | | | | | | | | | This change removes some dangerous code that attempts to free the handler context pointer in some (rare) circumstances. The owner of the handler owns this pointer and the ACPICA code should never touch it. Although not seen to be an issue in any kernel, it did show up as a problem under AcpiExec. Also, set the internal storage field for the context pointer to zero when the region is deactivated, simply for sanity. David Box. Signed-off-by: David E. Box <david.e.box@intel.com> 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: Add support for host-installed SCI handlers.Lv Zheng2013-09-249-20/+236
| | | | | | | | | | | | | | | | | | | | | | | This change adds support to allow hosts to install System Control Interrupt handlers. Certain ACPI functionality requires the host to handle raw SCIs. For example, the "SCI Doorbell" that is defined for memory power state support requires the host device driver to handle SCIs to examine if the doorbell has been activated. Multiple SCI handlers can be installed to allow for future expansion. Debugger support is included. Lv Zheng, Bob Moore. ACPICA BZ 1032. Bug summary: It is reported when the PCC (Platform Communication Channel, via MPST table, defined in ACPI specification 5.0) subchannel responds to the host, it issues an SCI and the host must probe the subchannel for channel status. Buglink: http://bugs.acpica.org/show_bug.cgi?id=1032 Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Reviewed-by: Len Brown <len.brown@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Validate start object for acpi_walk_namespace.Bob Moore2013-09-241-0/+8
| | | | | | | | | | | | | Perform a sanity check on the start object to prevent problems later. ACPICA BZ 1025. This patch only adds additional input parameter validation, no actual kernel suffering has been discovered. Buglink: http://bugs.acpica.org/show_bug.cgi?id=1025 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: Debugger: Prevent possible command line buffer overflow, kernel ↵Bob Moore2013-09-241-7/+10
| | | | | | | | | | | | | | | | behavior is not affected. Increase the size of a couple of the debugger line buffers. ACPICA BZ 1037. The debugger related code is not in the kernel so the behavior of the kernel is not affected. Buglink: http://bugs.acpica.org/show_bug.cgi?id=1037 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: Debug output: small formatting update, no functional change.Bob Moore2013-09-241-1/+1
| | | | | | | | | | Allow for longer filenames in the module name output during trace operations. 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: acpi_read: On error, do not modify the return value target location.Bjorn Helgaas2013-09-241-12/+14
| | | | | | | | | | | | If an error happens in the middle of a split 32/32 64-bit I/O operation, do not modify the target of the return value pointer. Makes the code consistent with the rest of ACPICA. Bjorn Helgaas. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> 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: Improve error message for "too many parent prefixes" condition.Bob Moore2013-09-241-2/+3
| | | | | | | | | Emit the full offending pathname in the error message. 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 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>
OpenPOWER on IntegriCloud