aboutsummaryrefslogtreecommitdiff
path: root/drivers/acpi/acpica/nsxfeval.c
AgeCommit message (Collapse)Author
2015-07-01ACPICA: De-macroize calls to standard C library functionsBob Moore
ACPICA commit 3b1026e0bdd3c32eb6d5d313f3ba0b1fee7597b4 ACPICA commit 00f0dc83f5cfca53b27a3213ae0d7719b88c2d6b ACPICA commit 47d22a738d0e19fd241ffe4e3e9d4e198e4afc69 Across all of ACPICA. Replace C library macros such as ACPI_STRLEN with the standard names such as strlen. The original purpose for these macros is long since obsolete. Also cast various invocations as necessary. Bob Moore, Jung-uk Kim, Lv Zheng. Link: https://github.com/acpica/acpica/commit/3b1026e0 Link: https://github.com/acpica/acpica/commit/00f0dc83 Link: https://github.com/acpica/acpica/commit/47d22a73 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Jung-uk Kim <jkim@FreeBSD.org> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-02-05ACPICA: Update Copyright headers to 2015David E. Box
ACPICA commit 8990e73ab2aa15d6a0068b860ab54feff25bee36 Link: https://github.com/acpica/acpica/commit/8990e73a 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>
2014-03-20Merge branch 'acpica'Rafael J. Wysocki
* 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. ...
2014-02-11ACPICA: Update ACPICA copyrights to 2014.Bob Moore
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>
2014-02-05ACPICA: Introduce acpi_get_data_full() and rework acpi_get_data()Rafael J. Wysocki
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>
2014-01-08ACPICA: Remove unused ACPI_FREE_BUFFER macro. No functional change.Lv Zheng
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>
2013-10-31ACPICA: Linuxize: Change indentation of C labels.Lv Zheng
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>
2013-10-31ACPICA: Clarify ACPI_FREE_BUFFER usage.Bob Moore
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>
2013-10-31ACPICA: Add EXPORT_ACPI_INTERFACES macro to external interface modules.Lv Zheng
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>
2013-09-24ACPICA: Validate start object for acpi_walk_namespace.Bob Moore
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>
2013-08-13ACPICA: Update names for walk_namespace callbacks to clarify usage.Bob Moore
Use of "preorder" and "postorder" was incorrect. The callbacks are simply invoked during tree ascent and descent during the depth-first walk. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-06-16ACPICA: Standardize all switch() blocksChao Guan
After many years, different formatting for switch() has crept in. This change makes every switch block identical. Chao Guan. ACPICA bugzilla 997. References: https://bugs.acpica.org/show_bug.cgi?id=997 Signed-off-by: Chao Guan <chao.guan@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-06-01ACPICA: Add argument typechecking for all predefined ACPI namesBob Moore
Fully implements typechecking on all incoming arguments for all predefined names. This ensures that ACPI-related drivers are passing the correct number of arguments, each of the correct object type. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Acked-by: Len Brown <len.brown@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-01-25ACPICA: Update ACPICA copyrights to 2013Bob Moore
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>
2013-01-10ACPICA: Eliminate some small unnecessary pathname functions.Bob Moore
Removed several small pathname functions to increase efficiency. Essentially, they replace a function call with a single compare. 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>
2013-01-10ACPICA: Fix broken call depth tracing logic.Lv Zheng
This patch does not affect the generation of the Linux binary. This patch decreases 26 lines of 20121018 divergence.diff. The ACPICA uses a call depth tracing mechanism by wrapping the return statements with return macros and marking the entrance with ACPI_FUNCTION_TRACE_ macros. There are other ACPI_FUNCTION_ macros used to mark the functions not using this tracing mechanism. This patch fixes broken call depth tracing logic. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-01-10ACPICA: Cleanup indentation to reduce differences between Linux and ACPICA.Lv Zheng
This is a cosmetic patch only. Comparison of the resulting binary showed only line number differences. This patch does not affect the generation of the Linux binary. This patch decreases 210 lines of 20121018 divergence.diff. The ACPICA source codes uses a totally different indentation style from the Linux to be compatible with other users (operating systems or BIOS). Indentation differences are critical to the release automation. There are two causes related to the "indentation" that are affecting the release automation: 1. The ACPICA -> Linux release process is: ACPICA source -- acpisrc - hierarchy - indent -> linuxized ACPICA source -- diff -> linuxized ACPICA patch (x) -- human intervention -> linuxized ACPICA patch (o) Where 'x' means "cannot be directly applied to the Linux" 'o' means "can be directly applied to the Linux" Different "indent" version or "indent" options used in the "indent" step will lead to different divergences. The version of "indent" used for the current release process is: GNU indent 2.2.11 The options of "indent" used for the current release process is: -npro -kr -i8 -ts8 -sob -l80 -ss -ncs 2. Manual indentation prettifying work in the Linux side will also harm the automatically generated linuxized ACPICA patches, making them impossible to apply directly. This patch fixes source code differences caused by the two causes so that the "human intervention" can be reduced in the future. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-01-10ACPICA: Cleanup source to reduce differences between Linux and ACPICA.Lv Zheng
This is a cosmetic patch only. Comparison of the resulting binary showed only line number differences. This patch does not affect the generation of the Linux binary. This patch decreases 389 lines of 20121018 divergence.diff. This patch reduces source code diff caused by the simple code maintenance work: 1. Deletion of the unused include files. 2. Deletion of the deprecated codes blocks. 3. Repositioning of the code blocks. 4. Replacing the values with the well defined macros. 5. Replacing the types with the equivalent types. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-01-10ACPICA: Cleanup updated comments.Lv Zheng
This is a cosmetic patch only. Comparison of the resulting binary showed only line number differences. This patch does not affect the generation of the Linux binary. This patch decreases 558 lines of 20121018 divergence.diff. This patch reduces the source code diff between Linux and ACPICA by cleaning the comments that already have been updated in ACPICA. There is no extra indentation done in this patch. Even the empty line deletions and insertions are also splitted into another cleanup patch so that this patch can be easily reviewed, and the binary differences can be held to a lowest level. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2012-11-15ACPICA: Remove extra spaces after periods within commentsBob Moore
This makes all comments consistent. 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>
2012-11-15ACPICA: Audit/update for ACPICA return macros and debug depth counterBob Moore
1) Ensure that all functions that use the various TRACE macros also use the appropriate ACPICA return macros. 2) Ensure that all normal return statements surround the return expression (value) with parens. 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>
2012-11-15ACPICA: Fix divergences of definition conflicts.Lv Zheng
There are conflicts in the "acpi_device_id*" definitions between the Linux and the ACPICA. The definitions of acpi_device_id* in ACPICA have been changed to the "acpi_pnp_device_id*". This patch changes the corresponding "acpica_device_id*" definitiions in the Linux. This patch will not affect the generated vmlinx binary. This will decrease 298 lines of 20120913 divergence.diff. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2012-07-17ACPICA: AcpiSrc: Fix some translation issues for Linux conversionBob Moore
Fixes issues like this: i_aSL -> iASL 00-7_f -> 00-7F local_fADT -> local_FADT execute_oSI -> execute_OSI Also, in function headers, the parameters are now translated to lower case (with underscores if necessary.) Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2012-01-17ACPICA: Update all copyrights to 2012Bob Moore
Update all copyrights to 2012. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2011-10-31acpi: add export.h to files using THIS_MODULE/EXPORT_SYMBOLPaul Gortmaker
These files were relying on module.h to come in via the path in an include/acpi header file, but we don't want to have instances of module.h being included from include/* files if it can be avoided. Have the files include export.h instead. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-01-18ACPICA: Update all ACPICA copyrights and signons to 2011Bob Moore
Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2010-01-22ACPICA: AcpiGetDevices: Eliminate unnecessary _STA callsLin Ming
In the case where a specific _HID is requested, do not run _STA until a _HID match is found. This eliminates potentially dozens of _STA calls during a search for a particular device/HID. Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2010-01-22ACPICA: Update all ACPICA copyrights and signons to 2010Bob Moore
Add 2010 copyright to all module headers and signons, including the Linux header. This affects virtually every file in the ACPICA core subsystem, iASL compiler, and all utilities. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-12-15ACPICA: Update internal namespace node/handle interfacesBob Moore
This change deletes the unnecessary acpi_ns_convert_entry_to_handle interface and renames the acpi_ns_map_handle_to_node interface to acpi_ns_validate_handle. ACPICA BZ 798. http://www.acpica.org/bugzilla/show_bug.cgi?id=798 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-11-24ACPICA: Add post-order callback to acpi_walk_namespaceLin Ming
The existing interface only has a pre-order callback. This change adds an additional parameter for a post-order callback which will be more useful for bus scans. ACPICA BZ 779. Also update the external calls to acpi_walk_namespace. http://www.acpica.org/bugzilla/show_bug.cgi?id=779 Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-08-27ACPICA: Major update for acpi_get_object_info external interfaceBob Moore
Completed a major update for the acpi_get_object_info external interface. Changes include: - Support for variable, unlimited length HID, UID, and CID strings - Support Processor objects the same as Devices (HID,UID,CID,ADR,STA, etc.) - Call the _SxW power methods on behalf of a device object - Determine if a device is a PCI root bridge - Change the ACPI_BUFFER parameter to ACPI_DEVICE_INFO. These changes will require an update to all callers of this interface. See the ACPICA Programmer Reference for details. Also, update all invocations of acpi_get_object_info interface Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-04-07hwmon: Add Asus ATK0110 supportLuca Tettamanti
Asus boards have an ACPI interface for interacting with the hwmon (fan, temperatures, voltages) subsystem; this driver exposes the relevant information via the standard sysfs interface. There are two different ACPI interfaces: - an old one (based on RVLT/RFAN/RTMP) - a new one (GGRP/GITM) Both may be present but there a few cases (my board, sigh) where the new interface is just an empty stub; the driver defaults to the old one when both are present. The old interface has received a considerable testing, but I'm still awaiting confirmation from my tester that the new one is working as expected (hence the debug code is still enabled). Currently all the attributes are read-only, though a (partial) control should be possible with a bit more work. Signed-off-by: Luca Tettamanti <kronos.it@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
2009-03-27ACPICA: Fix AcpiWalkNamespace race condition with table unloadBob Moore
Added a reader/writer locking mechanism to allow multiple concurrent namespace walks (readers), but a dynamic table unload will have exclusive access to the namespace. This fixes a problem where a table unload could delete the portion of the namespace that is currently being examined by a walk. Adds a new file, utlock.c that implements the reader/writer lock mechanism. ACPICA BZ 749. http://www.acpica.org/bugzilla/show_bug.cgi?id=749 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-03-26ACPICA: Remove ACPI_GET_OBJECT_TYPE macroBob Moore
Remove all instances of this obsolete macro, since it is now a simple reference to ->common.type. There were about 150 invocations of the macro across 41 files. ACPICA BZ 755. http://www.acpica.org/bugzilla/show_bug.cgi?id=755 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2009-01-09ACPICA: hide private headersLen Brown
Signed-off-by: Len Brown <len.brown@intel.com>
2009-01-09ACPICA: create acpica/ directoryLen Brown
also, delete sleep/ and delete ACPI_CFLAGS from Makefile Signed-off-by: Len Brown <len.brown@intel.com>