summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica
Commit message (Collapse)AuthorAgeFilesLines
* ACPICA: exmutex: General cleanup, restructured some codeBob Moore2016-01-011-21/+59
| | | | | | | | | | | ACPICA commit c2a7d000b6be34313b1c50c8a718df16113f0f32 Should be no functional change. Link: https://github.com/acpica/acpica/commit/c2a7d000 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 "const" to some functions that return fixed stringsLABBE Corentin2016-01-014-25/+22Star
| | | | | | | | | | | | | | | ACPICA commit 28645f8a113f346c8db103a4f7565fcba88c746f Most of the "get_name" - style functions can return "const char *" with no ill side-effects. Original linux patch from LABBE Corentin <clabbe.montjoie@gmail.com> and backported to ACPICA. Link: https://github.com/acpica/acpica/commit/28645f8a Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.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 SyncLevel support interaction with method auto-serializationDavid E. Box2016-01-011-2/+13
| | | | | | | | | | | | | | | ACPICA commit 253e3c03efc1a495d2aa61eee09ab1d0842a3dce The control method auto-serialization can interfere with existing ASL code that makes use of Mutex/Method SyncLevel support. This change makes the auto-serialization transparent to the SyncLevel support and management. David Box. Link: https://github.com/acpica/acpica/commit/253e3c03 Signed-off-by: David E. Box <david.e.box@linux.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: Debugger: reduce old external path formatLv Zheng2016-01-019-10/+12
| | | | | | | | | | | | | | | | | ACPICA commit 75c0da9e796bdf9bdd46d75f028a3e1779903214 In the error logs and debugger outputs, use new external path format that does not contain a trailing underscore. This patch takes care of acpi_ns_get_external_pathname() invocations, chaning them into acpi_ns_get_normalized_pathname(TRUE) where possible. Along with some error log fixes, the following debugger commands are fixed: resources, handlers, paths. Lv Zheng. Link: https://github.com/acpica/acpica/commit/75c0da9e 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: Namespace: Fix wrong error logLv Zheng2016-01-011-1/+1
| | | | | | | | | | | | | ACPICA commit 20228e39e125d92f9d80c6e07d3767b225d0536e The Info->Node in acpi_ns_init_one_device() may not be initialized. Even it is initialized, the redundant "._INI" can be seen for this log entry. This patch fixes this issue by using device_node instead. Lv Zheng. Link: https://github.com/acpica/acpica/commit/20228e39 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: acpi_get_sleep_type_data: Reduce warningsPrarit Bhargava2016-01-011-7/+17
| | | | | | | | | | | | | | | | | ACPICA commit 7bb77313091e52a846df4c9c2bea90be31bfb9d8 Eliminate warnings for "not found" _Sx errors, since these are optional. Original NOT_FOUND status is still returned. Original changes by Prarit Bhargava. ACPICA BZ 1208. Link: https://github.com/acpica/acpica/commit/7bb77313 Link: https://bugs.acpica.org/show_bug.cgi?id=1208 Signed-off-by: Prarit Bhargava <prarit@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: Linuxize: reduce divergences for 20151218 releaseLv Zheng2016-01-0112-324/+324
| | | | | | | | | | | | | The patch reduces source code differences between the Linux kernel and the ACPICA upstream so that the linuxized ACPICA 20151218 release can be applied with reduced human intervention. The pscode.c has already been out of sync for months, and it becomes more and more difficult to merge pscode.c changes, so instead of update the affected lines of pscode.c, this patch synchronizes entire pscode.c file. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Debugger: Fix runtime stub issues of ACPI_DEBUGGER_EXEC using ↵Lv Zheng2015-12-157-46/+83
| | | | | | | | | | | | | | | | | | | | different stub mechanism ACPICA commit 11522d6b894054fc4d62dd4f9863ec151296b386 The ACPI_DEBUGGER_EXEC is a problem now when the debugger code is compiled but runtime disabled. They actually will get executed in this situation. Although such executions are harmless if we can correctly make acpi_db_single_step() a runtime stub, users may still do not want to see the debugger print messages logged into OSPMs' kernel logs when a debugger driver is not loaded to enable the debugger during runtime. This patch fixes this issue by introducing new stub mechanism instead of ACPI_DEBUGGER_EXEC. Lv Zheng. Link: https://github.com/acpica/acpica/commit/11522d6b Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Debugger: Convert some mechanisms to OSPM specificLv Zheng2015-12-155-146/+38Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following mechanisms are OSPM specific: 1. Redirect output destination to console: no file redirection will be needed by an in-kernel debugger, there is even no file can be accessed when the debugger is running in the kernel mode. 2. Output command prompts: programs other than acpiexec can have different prompt characters and the prompt characters may be implemented as a special character sequence to form a char device IO protocol. 3. Command ready/complete handshake: OSPM debugger may wait more conditions to implement OSPM specific semantics (for example, FIFO full/empty conditions for O_NONBLOCK or IO open/close conditions). Leaving such OSPM specific stuffs in the ACPICA debugger core blocks Linux debugger IO driver implementation. Several new OSL APIs are provided by this patch: 1. acpi_os_initialize_command_signals: initialize command handshake mechanism or any other OSPM specific stuffs. 2. acpi_os_terminate_command_signals: reversal of acpi_os_initialize_command_signals. 3. acpi_os_wait_command_ready: putting debugger task into wait state when a command is not ready. OSPMs can terminate command loop by returning AE_CTRL_TERMINATE from this API. Normally, wait_event() or wait_for_multiple_object() may be used to implement this API. 4. acpi_os_notify_command_complete: putting user task into running state when a command has been completed. OSPMs can terminate command loop by returning AE_CTRL_TERMINATE from this API. Normally, wake_up() or set_event() may be used to implement this API. This patch also converts current command signaling implementation into a generic debugger layer (osgendbg.c) to be used by the existing OSPMs or acpiexec, in return, Linux can have chance to implement its own command handshake mechanism. This patch also implements acpiexec batch mode in a multi-threading mode comaptible style as a demo (this can be confirmed by configuring acpiexec into DEBUGGER_MULTI_THREADED mode where the batch mode is still working). Lv Zheng. Note that the OSPM specific command handshake mechanism is required by Linux kernel because: 1. Linux kernel trends to use wait queue to synchronize two threads, using mutexes to achieve that will cause false "dead lock" warnings. 2. The command handshake mechanism implemented by ACPICA is implemented in this way because of a design issue in debugger IO streaming. Debugger IO outputs are simply cached using a giant buffer, this should be tuned by Linux in the future. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Debugger: Remove unnecessary status checkColin Ian King2015-12-151-3/+0Star
| | | | | | | | | | | | | ACPICA commit f9d5c6c9a25e9f5ac05458bfcd8b381e21bb2ba5 ACPICA BZ 1205. Colin Ian King. Link: https://bugs.acpica.org/show_bug.cgi?id=1205 Link: https://github.com/acpica/acpica/commit/f9d5c6c9 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: Debugger: Fix dead lock issue ocurred in single stepping modeLv Zheng2015-10-221-0/+10
| | | | | | | | | | | | | | ACPICA commit 35273add90da19cd8790fdb5735f52e3c9861684 When single step execution is not ended, executing another control methods leads to dead locks around interpreter lock/namespace lock/method serialization lock. So we should only allow one execution from the debugger at same time. Lv Zheng. Link: https://github.com/acpica/acpica/commit/35273add 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>
* ACPI: Enable build of AML interpreter debuggerLv Zheng2015-10-2212-29/+21Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch enables ACPICA debugger files using a configurable CONFIG_ACPI_DEBUGGER configuration item. Those debugger related code that was originally masked as ACPI_FUTURE_USAGE now gets unmasked. Necessary OSL stubs are also added in this patch: 1. acpi_os_readable(): This should be arch specific in Linux, while this patch doesn't introduce real implementation and a complex mechanism to allow architecture specific acpi_os_readable() to be implemented to validate the address. It may be done by future commits. 2. acpi_os_get_line(): This is used to obtain debugger command input. This patch only introduces a simple KDB concept example in it and the example should be co-working with the code implemented in acpi_os_printf(). Since this KDB example won't be compiled unless ENABLE_DEBUGGER is defined and it seems Linux has already stopped to use ENABLE_DEBUGGER, thus do not expect it can work properly. This patch also cleans up all other ACPI_FUTURE_USAGE surroundings accordingly. 1. Since linkage error can be automatically detected, declaration in the headers needn't be surrounded by ACPI_FUTURE_USAGE. So only the following separate exported fuction bodies are masked by this macro (other exported fucntions may have already been masked at entire module level via drivers/acpi/acpica/Makefile): acpi_install_exception_handler() acpi_subsystem_status() acpi_get_system_info() acpi_get_statistics() acpi_install_initialization_handler() 2. Since strip can automatically zap the no-user functions, functions that are not marked with ACPI_EXPORT_SYMBOL() needn't get surrounded by ACPI_FUTURE_USAGE. So the following function which is not used by Linux kernel now won't get surrounded by this macro: acpi_ps_get_name() Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Debugger: Add thread ID support so that single step mode can only ↵Lv Zheng2015-10-224-2/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | apply to the debugger thread When the debugger is running in the kernel mode, acpi_db_single_step() may also be invoked by the kernel runtime code path but the single stepping command prompt may be erronously logged as the kernel logs and runtime code path cannot proceed. This patch fixes this issue by adding acpi_gbl_db_thread_id for the debugger thread and preventing acpi_db_single_step() to be invoked from other threads. It is not suitable to add acpi_thread_id parameter for acpi_os_execute() as the function may be implemented as work queue on some hosts. So it is better to let the hosts invoke acpi_set_debugger_thread_id(). Currently acpiexec is not configured as DEBUGGER_MULTI_THREADED, but we can do this. When we do this, it is better to invoke acpi_set_debugger_thread_id() in acpi_os_execute() when the execution type is OSL_DEBUGGER_MAIN_THREAD. The support should look like: create_thread(&tid); if (type == OSL_DEBUGGER_MAIN_THREAD) acpi_set_debugger_thread_id(tid); resume_thread(tid); Similarly, semop() may be used for pthread implementation. But this patch simply skips debugger thread ID check for application instead of introducing such complications as there is no need to skip acpi_db_single_step() for an application debugger - acpiexec. Note that the debugger thread ID can also be used by acpi_os_printf() to filter out debugger output. Lv Zheng. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Debugger: Fix "terminate" command by cleaning up subsystem shutdown ↵Lv Zheng2015-10-223-14/+15
| | | | | | | | | | | | | | | | | logic ACPICA commit 7e823714911480be47e310fb1b3590d289b9fd99 Segmentation fault can be seen for executing the "terminate" command. This is because acpi_ut_subsystem_shutdown() is errnously called multiple times. This patch cleans up acpi_ut_subsystem_shutdown() logics to fix this issue. Lv Zheng. Link: https://github.com/acpica/acpica/commit/7e823714 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: Debugger: Fix "quit/exit" command by cleaning up user commands ↵Lv Zheng2015-10-225-19/+26
| | | | | | | | | | | | | | | | | | | | | termination logic ACPICA commit 0dd68e16274cd38224aa4781eddc57dc2cbaa108 The quit/exit commands shouldn't invoke acpi_terminate_debugger() and acpi_terminate() right in the user command loop, because when the debugger exits, the kernel ACPI subsystem shouldn't be terminated (acpi_terminate()) and the debugger should only be terminated by its users (acpi_terminate_debugger()) rather than being terminated itself. Leaving such invocations causes kernel panic when the debugger is shipped in the Linux kernel. This patch fixes this issue. Lv Zheng. Link: https://github.com/acpica/acpica/commit/0dd68e16 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: Export debugger files to LinuxLv Zheng2015-10-2214-0/+9677
| | | | | | | | | | | ACPICA commit bc2d3daa4bd429611451f28800def9fea55e63de This patch exports debugger files to Linux. Link: https://github.com/acpica/acpica/commit/bc2d3daa 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: iASL: General cleanup of the file suffix #definesBob Moore2015-10-221-1/+1
| | | | | | | | | | | ACPICA commit bed456ed2976bdaafdef406b982fdf6c539befc0 Removed some extraneous defines, reordered others. Link: https://github.com/acpica/acpica/commit/bed456ed 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 typechecking, both compile-time and runtimeBob Moore2015-10-2210-44/+129
| | | | | | | | | | | | ACPICA commit 8d0f96e2a11a4ceabb2cae4b41e0ce1f4d3786b9 Adds much stricter typechecking in the iASL compiler, and also adds some additional checking in the interpreter. Link: https://github.com/acpica/acpica/commit/8d0f96e2 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: Debugger: Update mutexes used for multithreaded debuggerBob Moore2015-10-224-5/+25
| | | | | | | | | | | | | | | | | ACPICA commit 6b2701f619040e803313363f516b200e362a9100 Make these mutex objects independent of the deadlock detection mechanism. This mechanism caused failures with the multithread debugger. This patch doesn't affect Linux kernel as debugger is currently not fully functioning in the Linux kernel. And the further debugger cleanups will take care of handling debugger command signalling correctly instead of using such kind of mutexes. So it is safe to leave this patch as it is. Link: https://github.com/acpica/acpica/commit/6b2701f6 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: Update exception code for "file not found" errorBob Moore2015-10-221-0/+6
| | | | | | | | | | | | | | | | | ACPICA commit ac1564c26d239348ef13455f61d5616f3961ff43 Used by the ACPICA applications. This patch is a bit broken due to non-portable <errno.h> inclusion as on some platforms, there is no such a header file for their lib-c exports. Fortunately, Linux doesn't compile utfileio.c for either the kernel space ACPICA core (drivers/acpi/acpica) or the userspace ACPICA tools (tools/power/acpi) for now, so it's safe to leave this patch as it is. Link: https://github.com/acpica/acpica/commit/ac1564c2 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: iASL: Add symbolic operator support for Index() operatorBob Moore2015-10-221-1/+1
| | | | | | | | | | | | | ACPICA commit fbe67c46830f10c839941f8512cac5bddcb86bd3 Index (XXXX, 2) is now supported by XXXX [2] This patch doesn't affect Linux kernel. Link: https://github.com/acpica/acpica/commit/fbe67c46 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 unnecessary conditional compilationBob Moore2015-10-223-4/+7
| | | | | | | | | | | | | | ACPICA commit eea1f0e561893b6d6417913b2d224082fe3a0a5e Remove use of ACPI_DEBUGGER and ACPI_DISASSEMBLER where these defines are used around entire modules. Note: This type of code also causes problems with IDEs. Link: https://github.com/acpica/acpica/commit/eea1f0e5 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: Tables: Fix FADT dependency regressionLv Zheng2015-10-145-33/+10Star
| | | | | | | | | | | | | | | | | | | | Some logics actually relying on the existence of FADT, currently relies on the number of loaded tables. This false dependency can easily trigger regressions. One of them has been introduced by commit 8ec3f459073e (ACPICA: Tables: Fix global table list issues by removing fixed table). The commit changing the fixed table indexes results in the change of FADT table index, originally, it was 3 (thus the installed table count should be greater than 4), while currently it is 0 (and the installed table count may be 3). This patch fixes this regression by cleaning up the code. Lv Zheng. Link: https://bugzilla.kernel.org/show_bug.cgi?id=105351 Fixes: 8ec3f459073e (ACPICA: Tables: Fix global table list issues by removing fixed table) Reported-and-tested-by: Meelis Roos <mroos@linux.ee> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Debugger: Cleanup debugging outputs to dump name path without ↵Lv Zheng2015-08-254-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | trailing underscores ACPICA commit 51a49c2fb4a73f302a6df2b8ddc1350dd261684d It is better to use unified ASL path name to interact with the developers. There are following acpi_ns_build_normalized_pathname() users invoking it for debugging purposes (acpiexec test results are attached): 1. acpi_ut_display_init_pathname (acpi_ns_handle_to_pathname): --------------------------------------------- Initializing Region \_SB.H_EC.ECF2 --------------------------------------------- 2. acpi_ns_print_node_pathname (acpi_ns_handle_to_pathname): --------------------------------------------- - ex \_SB.H_EC._STA Evaluating \_SB.H_EC._STA --------------------------------------------- 3. acpi_ds_print_node_pathname (acpi_ns_handle_to_pathname): --------------------------------------------- - level 211b console - execute \M1 ... **** Exception AE_AML_UNINITIALIZED_ARG during execution of method [\M1] (Node 009CB6B8) --------------------------------------------- 4. acpi_ex_dump_reference_obj (acpi_ns_handle_to_pathname): --------------------------------------------- - dump \_TZ.FAN4._PR0 ... [00] 00835E98 [Object Reference] Type [Named Object] 05 00828878 \_TZ.FN04 --------------------------------------------- 5. acpi_db_bus_walk (acpi_ns_handle_to_pathname): --------------------------------------------- - businfo \_SB.PCI0 Type 6 ... --------------------------------------------- 6. acpi_db_walk_and_match_name (acpi_ns_handle_to_pathname): --------------------------------------------- - find _PR0 \_TZ.FAN4._PR0 Package 002D8DF8 01 Elements 01 --------------------------------------------- 7. acpi_db_walk_for_specific_objects (acpi_ns_handle_to_pathname): --------------------------------------------- - methods ... \_SB.PCI0._PRT Method 0026D918 01 Args 0 Len 0005 Aml 0026B199 ... --------------------------------------------- 8. acpi_db_decode_and_dispaly_object (acpi_get_name): --------------------------------------------- - gpes Block 0 - Info 003AC7B0 device_node 003A0E08 [\_GPE] - FADT-defined GPE block ... --------------------------------------------- 9. acpi_db_display_gpes (acpi_get_name): --------------------------------------------- - dump \_GPE Object (003A0E08) Pathname: \_GPE --------------------------------------------- 10.ae_miscellaneous_tests (acpi_get_name): No output available This patch cleans up all of the above usages. ACPICA BZ 1178, Lv Zheng. Linux kernel's ACPICA debugging messages may also be changed. Link: https://github.com/acpica/acpica/commit/51a49c2f 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: Cleanup acpi_gbl_db_opt_verbose acpiexec usageLv Zheng2015-08-252-4/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | ACPICA commit 42d7ad7bfb1cfb95183c1386c77509f2036f521d When acpi_gbl_db_opt_verbose is used in acpi_dm_descending_op() (invoked by acpi_dm_disassemble()), it is actually exported by the disassembler but used by the debugger to distinguish the output of the disassembler for different debugger commands. It is by default TRUE but is set to FALSE for control method disassembly command - "disassemble". So it's initialization should be a part of the ACPI_DISASSEMBLER conditioned code. This patch uses ACPI_INIT_GLOBAL to achieve a clean manner so that when ACPI_DISASSEMBLER is not defined, ACPI_DEBUGGER conditioned code needn't link to this option. Since it is a disassembler exported variable, it is renamed to acpi_gbl_dm_opt_Verbose in this patch. As VERBOSE_PRINT() macro has only one user, this patch also removes the definition of this macro. Lv Zheng. This patch doesn't affect Linux kernel. Link: https://github.com/acpica/acpica/commit/42d7ad7b 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: Cleanup acpi_gbl_db_opt_disasmLv Zheng2015-08-251-1/+1
| | | | | | | | | | | | | | | | | | | ACPICA commit 969989cf7f85e2a2a0cd048cd25fc706246a48a2 This patch cleans up the following global variable - acpi_gbl_db_opt_disasm: The setting is used to control the full disassembly feature for iasl. ACPI debugger (acpiexec) shall have nothing to do with it. Actually, acpiexec never links to ad_aml_disassemble(). This patch thus renames this global option to acpi_gbl_dm_opt_disasm and removes all acpiexec and debugger references on it. Lv Zheng. This patch doesn't affect Linux kernel. Link: https://github.com/acpica/acpica/commit/969989cf 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: Debugger: Split debugger initialization/termination APIsLv Zheng2015-08-253-22/+0Star
| | | | | | | | | | | | | | | | | | | | ACPICA commit 7a3f22baab000b186779dac64ad71d9776b8f432 It is likely that the debugger is enabled only when a userspace program explicitly tells a kernel to do so, so it shouldn't be initialized as early as current implementation. The only tool requiring ACPI_DEBUGGER is acpiexec, so acpiexec need to call the new APIs by itself. And BSD developers may also get notified to invoke the APIs for DDB enabling. Lv Zheng. This patch doesn't affect Linux kernel as debugger is currently not enabled in the Linux kernel. Link: https://github.com/acpica/acpica/commit/7a3f22ba 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: Make the max-number-of-loops runtime configurableBob Moore2015-08-253-1/+6
| | | | | | | | | | | | ACPICA commit a9d9c2d0c2d077bb3175ec9c252cf0e5da3efd45 Was previously compile-time only. Add support option for acpiexec. Link: https://github.com/acpica/acpica/commit/a9d9c2d0 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: Debugger: Add option to display namespace summary/countsBob Moore2015-08-252-2/+6
| | | | | | | | | | | | | | | ACPICA commit bba222c15c2ce79076eb3a5e9d4d5f7120db8a00 If "Objects" command is invoked with no arguments, the counts for each object type are displayed. Linux kernel is not affected by this commit as currently debugger is not enabled in the Linux kernel. Link: https://github.com/acpica/acpica/commit/bba222c1 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 additional debug info/statementsBob Moore2015-08-255-6/+57
| | | | | | | | | | | | | ACPICA commit 74094ca9f51e2652a9b5f01722d8640a653cc75a For _REG methods and module-level code blocks. For acpiexec, add deletion of module-level blocks in case of an early abort. Link: https://github.com/acpica/acpica/commit/74094ca9 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 handling: Cleanup and update debug output for toolsBob Moore2015-08-252-34/+30Star
| | | | | | | | | | | | | | ACPICA commit 93862bd7a227543bc617d822ef5c4f8a5d68b519 Add output of table OEM ID along with signature to support lots of SSDTs. Cleanup use of table pointers. Link: https://github.com/acpica/acpica/commit/93862bd7 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: acpiexec/acpinames: Support very large number of ACPI tablesBob Moore2015-08-253-6/+18
| | | | | | | | | | | | | | | ACPICA commit ca3bd4c5cdc39a9009280032adbbc20f34e94c47 Fix a couple of issues with >40 ACPI tables. Return exit error for acpinames to enable use with BIOS builds. The new exported function is used by acpinames. For Linux kernel, this change is a no-op. Link: https://github.com/acpica/acpica/commit/ca3bd4c5 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: acpinames: Add new options and wildcard supportBob Moore2015-08-252-2/+2
| | | | | | | | | | | | | | | | ACPICA commit 0ecf5b5a41c3d2e09af48f0fdbc9ae784f631788 - Add wilcard support for input filenames. - Add -l option to load tables and exit, no display. This is useful for validation of the namespace during BIOS generation. - Add -x option for specifying debug level. Linux kernel is not affected by this commit. Link: https://github.com/acpica/acpica/commit/0ecf5b5a 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: Tables: Cleanup to reduce FACS globalsLv Zheng2015-08-253-19/+7Star
| | | | | | | | | | | | | ACPICA commit 3f42ba76e2a0453976d3108296d5f656fdf2bd6e In this patch, FACS table mapping is also tuned a bit so that only the selected FACS table will be mapped by the OSPM (mapped on demand) and the FACS related global variables can be reduced. Lv Zheng. Link: https://github.com/acpica/acpica/commit/3f42ba76 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: Tables: Fix global table list issues by removing fixed table indexesLv Zheng2015-08-257-58/+51Star
| | | | | | | | | | | | | | | | | | | | | | | | | ACPICA commit c0b38b4c3982c2336ee92a2a14716107248bd941 The fixed table indexes leave holes in the global table list: 1. One hole can be seen when there is only 1 FACS provided by the BIOS. 2. Tow holes can be seen when it is a reduced hardware platform. The holes do not break OSPMs but have broken ACPI debugger "tables" command. Also the "fixed table indexes" mechanism may make the descriptors of the standard tables installed earlier than DSDT to be overwritten by the descriptors of the fixed tables. For example, FACP disappears from the global table list after DSDT is installed. This patch fixes all above issues by removing the "fixed table indexes" mechanism which is too complicated to be maintained in a regression safe manner. After removal, the table loader will determine the indexes of the fixed tables. Lv Zheng. Link: https://github.com/acpica/acpica/commit/c0b38b4c 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: Update info messages during ACPICA initBob Moore2015-08-252-2/+11
| | | | | | | | | | | ACPICA commit 4ccf8a1cc499ec8f00345f662a5887483980e1dd Small cleanup of messages. Link: https://github.com/acpica/acpica/commit/4ccf8a1c 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: Disassembler: Update for new listing modeBob Moore2015-08-251-1/+1
| | | | | | | | | | | | | | | | | | | | ACPICA commit 2ed09bb7619d25f5a5c065c33a8a775a6db3a856 ACPICA commit 2fefacf73825b0ec96bbfc4f70a256735b715d6c This mode emits AML code along with the ASL code. A new global was needed to ensure the listing mode is completely separate from the debugger verbose mode. Emits the correct AML offset for the AML code. The -l option now works for both the compiler and disassembler. Linux kernel is not affected by this commit. Link: https://github.com/acpica/acpica/commit/2fefacf7 Link: https://github.com/acpica/acpica/commit/2ed09bb7 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: Update parameter validation for data_table_region and load_tableBob Moore2015-08-255-20/+69
| | | | | | | | | | | | | | ACPICA commit 51ab555e60b4a3de3cc4a846e86d0de255be441a Add additional validation for the table signature and the OEM strings. Eliminates buffer read overrun in data_table_region. ACPICA BZ 1184. Link: https://bugs.acpica.org/show_bug.cgi?id=1184 Link: https://github.com/acpica/acpica/commit/51ab555e 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: Disassembler: Remove duplicate code in _PLD processing.Bob Moore2015-08-251-2/+3
| | | | | | | | | | | | ACPICA commit 6d9c827b540837b6e54059e17756a06985e4a196 ACPICA BZ 1176. Link: https://bugs.acpica.org/show_bug.cgi?id=1176 Link: https://github.com/acpica/acpica/commit/6d9c827b 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: Correctly cleanup after a ACPI table load failureBob Moore2015-08-255-10/+54
| | | | | | | | | | | | | | | ACPICA commit ed7769e832de6c7ba90615480d916c85fd100422 If a table load fails, delete all namespace objects created by the table, otherwise these objects will be uninitialized, causing problems later. This appears to be a very rare problem. Also handle the unitialized node problem to prevent possible faults. ACPICA BZ 1185. Link: https://github.com/acpica/acpica/commit/ed7769e8 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: iASL/Disassembler: Add prototype verbose modeBob Moore2015-07-231-0/+1
| | | | | | | | | | | | | | | ACPICA commit add72dca18ab5d02f1bf9b08027570e58da520e8 This mode will emit AML byte code after each ASL statement. This is a prototype only and requires additional development. This patch only affects ACPICA disassembler which is not in the kernel source tree. Link: https://github.com/acpica/acpica/commit/add72dca 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: Debugger: Move debugger specific APIs to debugger componentLv Zheng2015-07-232-7/+22
| | | | | | | | | | | | | | | ACPICA commit 2164923d60429eea7cd5a4a8629b607af7325afa Some disassembler APIs should rather be debugger APIs. This patch moves them to the debugger folder to be ready for debugger porting. Since there is no in-kernel ACPICA debugger in the kernel source tree, this patch doesn't affect the Linux kernel. Link: https://github.com/acpica/acpica/commit/2164923d 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: Debugger: Reduce structure size for debuggerLv Zheng2015-07-231-0/+3
| | | | | | | | | | | | | | ACPICA commit 310e0ae1c4730f4dadc80125125099ab76851499 arg_types in struct acpi_db_method_info is only referenced by ACPI_DEBUGGER. This patch only affects ACPICA debugger which is only used by a non-kernel tool - acpiexec, so Linux kernel is currently not affected by this patch. Link: https://github.com/acpica/acpica/commit/310e0ae1 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 use of NEGATIVE and POSITIVE definesBob Moore2015-07-231-0/+5
| | | | | | | | | | | | | | ACPICA commit f88814201e01043a4f8caa69a69b799af11c44a3 These were defined in two places. Changed to ACPI_SIGN* names and define them once in acmacros.h This patch doesn't affect Linux kernel. Link: https://github.com/acpica/acpica/commit/f8881420 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 use of all non-ANSI local C library functionsBob Moore2015-07-235-354/+396
| | | | | | | | | | | | | | | ACPICA commit 7c490c28a18b435c543c6b410e7e7c2131fccc78 ACPICA implements all non-ANSI functions locally. However, there are sometimes two or more versions of the same function throughout the ACPICA code. This change fixes this. Adds a new file, utilities/utnonansi.c Link: https://github.com/acpica/acpica/commit/7c490c28 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: iASL: Add new warnings for method local_x and arg_x variablesBob Moore2015-07-231-0/+4
| | | | | | | | | | | | | | | ACPICA commit eb9f8cb9fd65f1149dd335d05944c31cbca41af3 1) Warn if a Local is set but never used 2) Warn if a arg_x is never used (for non-predefined method names) 3) Warn if a arg_x that is used as a local is never used This patch only affects iASL which is not in the kernel source tree. Link: https://github.com/acpica/acpica/commit/eb9f8cb9 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 extraneous check for null walk_stateMarkus Elfring2015-07-231-3/+1Star
| | | | | | | | | | | | ACPICA commit f9fd6e8bad0f16ce2b436c5cda36ced0c2d85302 Reported by Markus Elfring. Link: https://github.com/acpica/acpica/commit/f9fd6e8b Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> 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: Parser: Remove redundant opcode execution debugging outputLv Zheng2015-07-231-8/+0Star
| | | | | | | | | | | | ACPICA commit c832b0a9263c560b3ae3ae31d7298ef33988f8d5 This patch removes one redundant debugging output of opcode execution which has already been covered by acpi_ex_start_trace_opcode(). Lv Zheng. Link: https://github.com/acpica/acpica/commit/c832b0a9 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: Executer: Add option to bypass opcode tracingLv Zheng2015-07-231-2/+4
| | | | | | | | | | | | ACPICA commit 61e9e20aadfaa03184d0959fbdc1fa5cdfea2551 This patch adds option to bypass opcode tracing. The option can be used to reduce the trace message output. Lv Zheng. Link: https://github.com/acpica/acpica/commit/61e9e20a 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: Executer: Add OSL trace hook supportLv Zheng2015-07-233-38/+122
| | | | | | | | | | | | | | | ACPICA commit e8e4a9b19d0b72a7b165398bdc961fc2f6f502ec This patch adds OSL trace hook support. OSPMs are encouraged to use acpi_os_trace_point() with ACPI_USE_SYSTEM_TRACER defined to implement platform specific trace facility. Lv Zheng. Link: https://github.com/acpica/acpica/commit/e8e4a9b1 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>