summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica
Commit message (Collapse)AuthorAgeFilesLines
* ACPICA: Update several debug statements - no functional change.Bob Moore2014-01-081-10/+9Star
| | | | | | | | | Update the format and information emitted from several debug output statements. 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 exception handling for GPE block installation.Bob Moore2014-01-083-14/+22
| | | | | | | | | | 1) Return an actual status value from acpi_ev_get_gpe_xrupt_block. 2) Don't clobber the status when exiting acpi_ev_install_gpe_block. References: https://bugs.acpica.org/show_bug.cgi?id=1019 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 favor 32-bit FADT addresses.Bob Moore2014-01-082-152/+193
| | | | | | | | | | | | | | | | | | | This change adds an option to favor 32-bit FADT addresses when there is a conflict between the 32-bit and 64-bit versions of the same address. The default behavior is to use the 64-bit version in accordance with the ACPI specification. This can now be overridden via the AcpiGbl_Use32BitFadtAddresses flag. Lv Zheng. Also, the "Convert FADT" and "Verify FADT" functions have been merged to simplify the code, make it easier to understand, and make it easier to maintain. Bob Moore. References: https://bugs.acpica.org/show_bug.cgi?id=885 References: https://bugs.acpica.org/show_bug.cgi?id=993 Original-by: Lv Zheng <lv.zheng@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: Cleanup the option of forcing the use of the RSDT.Lv Zheng2014-01-082-5/+13
| | | | | | | | | | | | | | | This change adds a runtime option that will force ACPICA to use the RSDT instead of the XSDT. Although the ACPI spec requires that an XSDT be used instead of the RSDT, the XSDT has been found to be corrupt or ill-formed on some machines. This option is already in the Linux kernel. When it is back ported to ACPICA, code is re-written to follow ACPICA coding style. This patch is the generation of the integration. 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: Back port and refine validation of the XSDT root table.Lv Zheng2014-01-081-90/+120
| | | | | | | | | | | | | | | | | Some platforms contain an XSDT that is ill-formed or otherwise invalid (such as containing some or all entries that are NULL pointers). This change adds a new function to validate the XSDT before actually using it. If the XSDT is found to be invalid, ACPICA will now fall back to using the RSDT instead. This feature is already in the Linux kernel. When it is back ported to ACPICA, code is refined to follow ACPICA coding style and this patch is the generation of the integration. Original-by: Zhao Yakui <yakui.zhao@intel.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: Remove unused ACPI_FREE_BUFFER macro. No functional change.Lv Zheng2014-01-082-13/+20
| | | | | | | | | | | This macro is no longer used by ACPICA and it is not public. Also update comments related to the use of ACPI_ALLOCATE_BUFFER and the use of acpi_os_free (kfree is equivalent and prefered in the kernel) to free the buffer. 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: Disassembler: Improve pathname support for emitted External() ↵Bob Moore2014-01-083-7/+8
| | | | | | | | | | | | | | | | | | | statements. This change adds full pathname support for external names that have been resolved internally by the inclusion of additional ACPI tables (via the iASL -e option). Without this change, the disassembler can emit multiple externals for the same object, or it become confused when the Scope() operator is used on an external object. Linux kernel behaviour is not affected as the structure changes and the new invocations are only used by compiler and disassembler which are not shipped in the kernel currently. Reported-by: Michael Tsirkin <mst@redhat.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: Debug output: Fix a couple of small output issues.Bob Moore2014-01-082-8/+8
| | | | | | | | | | | | | | | 1) Fix utcache to use the proper return macros in order to maintain the function nesting level. 2) Enable the function nesting level for all ACPI applications instead of just acpiexec. Linux kernel behaviour is not affected by this patch as Linux doesn't use ACPICA object cache mechanism currently. 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>
* Merge branch 'acpica'Rafael J. Wysocki2013-11-277-44/+76
|\ | | | | | | | | | | | | | | | | | | | | * acpica: ACPI: Clean up incorrect inclusions of ACPICA headers ACPICA: Update version to 20131115. ACPICA: Add support to delete all objects attached to the root namespace node. ACPICA: Delete all attached data objects during namespace node deletion. ACPICA: Resources: Fix loop termination for the get AML length function. ACPICA: Tests: Add CHECKSUM_ABORT protection for test utilities. ACPICA: Debug output: Do not emit function nesting level for kernel build.
| * ACPICA: Add support to delete all objects attached to the root namespace node.Bob Moore2013-11-212-8/+16
| | | | | | | | | | | | | | | | | | | | This fix deletes any and all objects that have been attached to the root node (via acpi_attach_data). Reported by Tomasz Nowicki. ACPICA BZ 1026. 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: 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>
* | Merge branch 'for-linus' of ↵Linus Torvalds2013-11-161-1/+1
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial Pull trivial tree updates from Jiri Kosina: "Usual earth-shaking, news-breaking, rocket science pile from trivial.git" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (23 commits) doc: usb: Fix typo in Documentation/usb/gadget_configs.txt doc: add missing files to timers/00-INDEX timekeeping: Fix some trivial typos in comments mm: Fix some trivial typos in comments irq: Fix some trivial typos in comments NUMA: fix typos in Kconfig help text mm: update 00-INDEX doc: Documentation/DMA-attributes.txt fix typo DRM: comment: `halve' -> `half' Docs: Kconfig: `devlopers' -> `developers' doc: typo on word accounting in kprobes.c in mutliple architectures treewide: fix "usefull" typo treewide: fix "distingush" typo mm/Kconfig: Grammar s/an/a/ kexec: Typo s/the/then/ Documentation/kvm: Update cpuid documentation for steal time and pv eoi treewide: Fix common typo in "identify" __page_to_pfn: Fix typo in comment Correct some typos for word frequency clk: fixed-factor: Fix a trivial typo ...
| * treewide: Fix typo in printkMasanari Iida2013-10-141-1/+1
| | | | | | | | | | | | | | | | Correct spelling typo within various part of the kernel Signed-off-by: Masanari Iida <standby24x7@gmail.com> Acked-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | ACPICA: Add __init for ACPICA initializers/finalizers.Lv Zheng2013-10-316-9/+8Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | 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/+0Star
| | | | | | | | | | | | | | | | | | | | 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/+59Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+1Star
| | | | | | | | | | | | | | | | | | | | 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/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | 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>