summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica
Commit message (Collapse)AuthorAgeFilesLines
* ACPICA: Fix buffer allocation issue for generic_serial_bus region accesses.Lv Zheng2014-04-211-7/+97
| | | | | | | | | | | The size of the buffer allocated for generic_serial_bus region access is not correct. This patch introduces acpi_ex_get_serial_access_length() to be invoked to obtain correct data buffer length. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Reported by: Lan Tianyu <tianyu.lan@intel.com> Acked-by: Lan Tianyu <tianyu.lan@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* Merge branch 'acpica'Rafael J. Wysocki2014-04-0114-115/+262
|\ | | | | | | | | | | | | | | | | * acpica: ACPICA: Enable auto-serialization as a default kernel behavior. ACPICA: Ignore sync_level for methods that have been auto-serialized. ACPICA: Add additional named objects for the auto-serialize method scan. ACPICA: Add auto-serialization support for ill-behaved control methods. ACPICA: Remove global option to serialize all control methods.
| * ACPICA: Enable auto-serialization as a default kernel behavior.Lv Zheng2014-03-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous commit "ACPICA: Add auto-serialization support for ill-behaved control methods" introduced the auto-serialization facility as a workaround that can be enabled by "acpi_auto_serialize": This feature marks control methods that create named objects as "serialized" to avoid unwanted AE_ALREADY_EXISTS control method evaluation failures. Enable method auto-serialization as the default kernel behavior. The new kernel parameter is also changed from "acpi_auto_serialize" to "acpi_no_auto_serialize" to reflect the default behavior. References: https://bugzilla.kernel.org/show_bug.cgi?id=52191 References: http://www.spinics.net/lists/linux-acpi/msg49496.html Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| * ACPICA: Ignore sync_level for methods that have been auto-serialized.Bob Moore2014-03-262-6/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cannot use a sync_level for methods that have been serialized at load-time or runtime because this may interfere with any existing use of sync_levels within the ASL code. So, we simply ignore the sync_level for these methods, thus preserving any existing sync_level priorities. Note, the use of sync_levels is actually rather rare within BIOS ASL code. References: http://www.spinics.net/lists/linux-acpi/msg49496.html Reported-by: Valdis Kletnieks <valdis.kletnieks@vt.edu> Reported-by: Sabrina Dubroka <sd@queasysnail.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: Add additional named objects for the auto-serialize method scan.Lv Zheng2014-03-261-2/+4
| | | | | | | | | | | | | | | | | | | | | | This change adds some additional opcodes that are detected and will cause a method to be auto-serialized. These opcodes are the various CreateXField and the FieldUnit opcodes. Lv Zheng. References: https://bugzilla.kernel.org/show_bug.cgi?id=52191 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 auto-serialization support for ill-behaved control methods.Bob Moore2014-03-2610-25/+227
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds support to automatically mark a control method as "serialized" if the method creates any named objects. This will positively prevent the method from being entered by more than one thread and thus preventing a possible abort when an attempt is made to create an object twice. Implemented by parsing all non-serialize control methods at table load time. This feature is disabled by default and this patch also adds a new Linux kernel parameter "acpi_auto_serialize" to allow this feature to be turned on for a specific boot. References: https://bugzilla.kernel.org/show_bug.cgi?id=52191 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 global option to serialize all control methods.Lv Zheng2014-03-264-88/+16Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to the reports, the "acpi_serialize" mechanism is broken as: A. The parallel method calls can still happen when the interpreter lock is released under the following conditions: 1. External callbacks are invoked, for example, by the region handlers, the exception handlers, etc.; 2. Module level execution is performed when Load/LoadTable opcodes are executed, and 3. The _REG control methods are invoked to complete the region registrations. B. For the following situations, the interpreter lock need to be released even for a serialized method while currently, the lock-releasing operation is marked as a no-op by acpi_ex_relinquish/reacquire_interpreter() when this mechanism is enabled: 1. Wait opcode is executed, 2. Acquire opcode is executed, and 3. Sleep opcode is executed. This patch removes this mechanism and the internal acpi_ex_relinquish/reacquire_interpreter() APIs. Lv Zheng. References: https://bugzilla.kernel.org/show_bug.cgi?id=52191 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>
* | Merge branch 'acpica'Rafael J. Wysocki2014-03-20169-491/+759
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * acpica: (29 commits) ACPICA: Revert "Headers: Deploy #pragma pack (push) and (pop)." ACPICA: Update version to 20140214. ACPICA: Prevent infinite loops when traversing corrupted lists. ACPICA: Debugger: Add missing objects; Traverse linked lists ACPICA: Add text: ACPICA policy for new _OSI strings. No functional change. ACPICA: Update for _PRP predefined name. ACPICA: Cleanup/improve global variable declarations. ACPICA: Comment update - no functional change. ACPICA: Do not abort _PRT repair on a single subpackage failure. ACPICA: Harden _PRT repair code; check for minimum package length. ACPICA: Restore code that repairs NULL package elements in return values. ACPICA: Properly handle NULL entries in _PRT return packages. ACPICA: Update conditional compilation flags for resource dump functions. ACPICA: Predefined names: Add support for the _PRP method. ACPICA: Headers: Deploy #pragma pack (push) and (pop). ACPICA: Add boot option to disable auto return object repair ACPICA: acpidump: Remove integer types translation protection. ACPICA: acpidump: Add sparse declarators support. ACPICA: Add "Windows 2013" string to _OSI support. ACPICA: Update version to 20140114. ...
| * ACPICA: Revert "Headers: Deploy #pragma pack (push) and (pop)."Robert Moore2014-03-1818-70/+1Star
| | | | | | | | | | | | | | | | | | | | This reverts commit aae576e5faefa8ba70647efa320d4747b6375f1e. Push and Pop are not portable "enough", and caused problems for some ACPICA customers. Signed-off-by: Robert 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: Prevent infinite loops when traversing corrupted lists.Bob Moore2014-03-183-4/+32
| | | | | | | | | | | | | | | | | | This change hardens the ACPICA code to detect circular linked object lists and prevent an infinite loop if such corruption exists. 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 missing objects; Traverse linked listsBob Moore2014-03-182-34/+199
| | | | | | | | | | | | | | | | | | | | This change adds support for two missing objects, the "extra" and "data" secondary objects, as well as adding support to traverse and display linked lists related to ACPICA objects. 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 text: ACPICA policy for new _OSI strings. No functional change.Bob Moore2014-03-181-0/+25
| | | | | | | | | | | | | | | | | | Adds further information about why new _OSI strings should be adopted by all hosts as soon as possible. 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 for _PRP predefined name.Bob Moore2014-03-181-1/+1
| | | | | | | | | | | | | | | | Allow objects of type "reference" in the second subpackage element. 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/improve global variable declarations.Lv Zheng2014-03-182-201/+189Star
| | | | | | | | | | | | | | | | | | | | This change cleans up the entire global variable mechaninism including the related macros. Also reduces warnings from the "sparse" utility in the Linux environment. 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: Comment update - no functional change.Bob Moore2014-03-186-37/+37
| | | | | | | | | | | | | | | | Change all instances of "sub-package" to "subpackage" for consistency. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| * ACPICA: Do not abort _PRT repair on a single subpackage failure.Bob Moore2014-02-271-8/+9
| | | | | | | | | | | | | | | | Always examine all subpackages for reversed entries. 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: Harden _PRT repair code; check for minimum package length.Bob Moore2014-02-271-1/+7
| | | | | | | | | | | | | | | | | | | | This change prevents a fault during the repair by checking up front if the _PRT subpackage contains the minimum number of elements (4). 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: Restore code that repairs NULL package elements in return values.Lv Zheng2014-02-271-4/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original code was lost accidently, it was not generated along with the following commit of mechanism improvements and thus not get merged: Commit: d5a36100f62fa6db5541344e08b361b34e9114c5 Subject: ACPICA: Add mechanism for early object repairs on a per-name basis Adds the framework to allow object repairs very early in the return object analysis. Enables repairs like string->unicode, etc. This patch restores the implementation of the NULL element repair code for ACPI_RTYPE_NONE. In the original design, ACPI_RTYPE_NONE is defined to collect simple NULL object repairs. Lv Zheng. Buglink: https://bugzilla.kernel.org/show_bug.cgi?id=67901 Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Cc: 3.10+ <stable@vger.kernel.org> # 3.10+ Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| * ACPICA: Properly handle NULL entries in _PRT return packages.Lv Zheng2014-02-271-3/+3
| | | | | | | | | | | | | | | | | | | | This change enables proper handling of NULL package entries in a _PRT return value, during construction of the PCI routing table. 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: Update conditional compilation flags for resource dump functions.Lv Zheng2014-02-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Corrects ACPI_DISASSEMBLER to the compile conditions. The wrong condition was introduced by this commit: Commit: 3334861b1e9947631230b573eba27bcd778b93c8 Subject: ACPICA: Update the conditions to enable the utility resource dump strings. This was detected in the ACPICA upstream. Linux is not affected by the wrong commit as the disassembler is not shipped in the Linux. 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: Predefined names: Add support for the _PRP method.Bob Moore2014-02-271-0/+6
| | | | | | | | | | | | | | | | | | This is not an official predefined name yet, but we add it to assist with development. 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: Headers: Deploy #pragma pack (push) and (pop).Bob Moore2014-02-2718-1/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use push and pop to both guarantee that the correct alignment is used, and to restore the alignment to whatever it was before the header was included. It is reported that the #pragma pack(push/pop) directives are not supported by the specific GCCs, but this patch still doesn't affect kernel build as there are already #pragma pack([1]) directives used in the old ACPICA headers, which means there shouldn't be GCCs that are currently used to compile the ACPI kernels do not support #pragma pack() directives. References: https://bugs.acpica.org/show_bug.cgi?id=1058 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 "Windows 2013" string to _OSI support.Bob Moore2014-02-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This urgent patch is cherry picked from ACPICA upstream. It is reported that some platforms fail to boot without this new _OSI string. This change adds this string for Windows 8.1 and Server 2012 R2. Reported-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Bob Moore <Robert.Moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
| * ACPICA: Update the conditions to enable the utility resource dump strings.Lv Zheng2014-02-116-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch enables resource dump functions for debugging purpose where ACPI_DEBUG_OUTPUT is enabled. Such functions are useful for developers to track kernel issues when composing debugging patches. They will be optimized out during link stage for normal builds. This patch updates the compilation condition used for the resource dump related string tables to match the compilation environment used for rsdump.c and rsdumpinfo.c. This patch can help to improve the ACPICA release automation. 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: Debugger: Add new command to read/write/compare all namespace objects.Bob Moore2014-02-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This command "test objects" will exercise the entire namespace by writing new values to each data object, and ensuring that the write was successful. The original value is then restored and verified. This patch doesn't affect kernel behavior as the debugger is currently not shipped in the Linux source tree. 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 support references in the union acpi_object.Bob Moore2014-02-111-3/+3
| | | | | | | | | | | | | | | | | | | | This change fixes the support to allow references (namespace nodes) to be passed as arguments to control methods via the evaluate object interface. This is probably most useful for testing purposes, however. 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 ACPICA copyrights to 2014.Bob Moore2014-02-11168-168/+168
| | | | | | | | | | | | | | | | | | Update ACPICA copyrights to 2014. Includes all source headers and signons for the various tools. 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 parameter validation for acpi_install_gpe_block.Bob Moore2014-02-111-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | Add the following checks: 1) The incoming device handle refers to type ACPI_TYPE_DEVICE. 2) There is not already a gpe block attached to the device. Likewise, with acpi_remove_gpe_block, ensure that the incoming object is a device. 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: Utilities: Load of local test tables is now optional.Bob Moore2014-02-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The utility has the capability to load some various tables to test features of ACPICA. However, there are enough of them that the output of the utility became confusing. With this change, only the required local tables are displayed (RSDP, XSDT, etc.) along with the actual tables loaded via the command line specification. This makes the default output simler and easier to understand. The -el command line option restores the original behavior for testing purposes. This patch doesn't affect kernel behavior as Linux doesn't use ACPICA allocation tracking implementation. 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: Deploy new 32/64 printf support for table override mechanism.Bob Moore2014-02-111-7/+8
| | | | | | | | | | | | | | | | Similar to the earlier tbprint.c change. 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 support for 32/64 bit physical addresses in printf().Bob Moore2014-02-112-13/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | This change improves the support for physical addresses in printf debug statements and other output on both 32-bit and 64-bit hosts. It consistently outputs the appropriate number of bytes for each host. The %p specifier is unsatisfactory since it does not emit uniform output on all hosts/clib implementations (on some, leading zeros are not supported, leading to difficult-to-read output). 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: Introduce acpi_get_data_full() and rework acpi_get_data()Rafael J. Wysocki2014-02-051-3/+30
|/ | | | | | | | | | | | | | | Introduce a new function, acpi_get_data_full(), working in analogy with acpi_get_data() except that it can execute a callback provided as its 4th argument right after acpi_ns_get_attached_data() has returned a success. That will allow Linux to reference count the object pointed to by *data before the namespace mutex is released so as to ensure that it will not be freed going forward until the reference to it acquired by acpi_get_data_full() is dropped. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com>
* ACPICA: Remove bool usage from ACPICA.Lv Zheng2014-01-271-1/+1
| | | | | | | | | | | | | The use of "bool" is not safe for ACPICA code where it is originally using a "BOOLEAN" defined as "unsigned char". This patch removes the only "bool" usage from kernel source tree to reduce the source code differences between Linux and ACPICA upstream. This patch is required by future acpidump release automation. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
* ACPICA: Utilities: Cleanup declarations of the acpi_gbl_debug_file global.Lv Zheng2014-01-081-0/+12
| | | | | | | | | | | | | | | This global is acting as an OSL global variable, implemented in the oswinxf.c and osunixxf.c. This patch cleans up the definition of this variable so that new utilities do not need to define it in order to link. Linux kernel behaviour is not affected as the changes only applies to the ACPICA userspace utilities which are not shipped in the kernel currently. 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: Cleanup spaces after special macro invocations.Lv Zheng2014-01-083-8/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch reflects the improvment of a cleanup step which is performed in the release process. There are still spaces in the "linuxized" ACPICA files after special macro invocations. This is because indent treats comments and pre-processor directives as spaces, thus we need to skip them. Before applying this patch, cleanup code will search from keyword back to end of line and wipe spaces between them. After applying this patch, cleanup code will search to the end of the macro invocations, skip "empty lines", "comments" and "pre-processor directives", then wipe the spaces between the new line and the first non-spaces characters. Following improvements are thus achieved in the release automation by this commit which are originally maintained manually: - acpi_status acpi_ev_remove_global_lock_handler(void); +acpi_status acpi_ev_remove_global_lock_handler(void); - acpi_status +acpi_status acpi_ev_match_gpe_method(acpi_handle obj_handle, - acpi_status acpi_subsystem_status(void); +acpi_status acpi_subsystem_status(void); - acpi_status acpi_install_notify_handler(acpi_handle device, u32 handler_type, +acpi_status acpi_install_notify_handler(acpi_handle device, u32 handler_type, - acpi_status +acpi_status acpi_acquire_mutex(acpi_handle handle, acpi_string pathname, u16 timeout); - acpi_status +acpi_status acpi_get_sleep_type_data(u8 sleep_state, u8 *slp_typ_a, u8 *slp_typ_b); - acpi_status acpi_leave_sleep_state_prep(u8 sleep_state); +acpi_status acpi_leave_sleep_state_prep(u8 sleep_state); Some empty lines are restored by this commit due to the change of the removal implementation. 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: Interpreter: Add additional debug info for an error case.Bob Moore2014-01-081-1/+2
| | | | | | | | | Emit the name of the namespace node for the error case when there is no subobject attached to the node. 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 an error message if the Debugger fails initialization.Bob Moore2014-01-081-2/+10
| | | | | | | | | | | Previously, only status was returned. Linux kernel behaviour is not affected as the changes only apply to the debugger which is currently not shipped in the kernel. 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: Conditionally define a local variable that is used for debug only.Bob Moore2014-01-081-1/+3
| | | | | | | | | This patch improves the relationship between the opcode debugging information and CONFIG_ACPI_DEBUG enablement. 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: Updates/fixes for debug output.Bob Moore2014-01-081-2/+47
| | | | | | | | | | | | Major changes in this patch are made to improve the debug output mode of the compiler. Linux kernel behaviour is not affected as the change only applies to the compiler which is not shipped in the Linux kernel. 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: Enhance ACPI warning for memory/IO address conflicts.Bob Moore2014-01-081-6/+13
| | | | | | | | | | | This change improves the warning message when a system address conflicts with an existing operation region. It now emits the region address range in addition to the input (system) address range. Reported-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: 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>