aboutsummaryrefslogtreecommitdiff
path: root/drivers/acpi/acpica/evregion.c
AgeCommit message (Collapse)Author
2015-05-17ACPICA: Utilities: Cleanup to remove useless ACPI_PRINTF/FORMAT_xxx helpers.Lv Zheng
commit 1d0a0b2f6df2bf2643fadc990eb143361eca6ada upstream. ACPICA commit b60612373a4ef63b64a57c124576d7ddb6d8efb6 For physical addresses, since the address may exceed 32-bit address range after calculation, we should use 0x%8.8X%8.8X instead of ACPI_PRINTF_UINT and ACPI_FORMAT_UINT64() instead of ACPI_FORMAT_NATIVE_UINT()/ACPI_FORMAT_TO_UINT(). This patch also removes above replaced macros as there are no users. This is a preparation to switch acpi_physical_address to 64-bit on 32-bit kernel builds. Link: https://github.com/acpica/acpica/commit/b6061237 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> Signed-off-by: Dirk Behme <dirk.behme@gmail.com> Signed-off-by: George G. Davis <george_davis@mentor.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-05ACPICA: Update to GPIO region handler interface.Bob Moore
commit 75ec6e55f1384548311a13ce4fcb39c516053314 upstream. Changes to correct several GPIO issues: 1) The update_rule in a GPIO field definition is now ignored; a read-modify-write operation is never performed for GPIO fields. (Internally, this means that the field assembly/disassembly code is completely bypassed for GPIO.) 2) The Address parameter passed to a GPIO region handler is now the bit offset of the field from a previous Connection() operator. Thus, it becomes a "Pin Number Index" into the Connection() resource descriptor. 3) The bit_width parameter passed to a GPIO region handler is now the exact bit width of the GPIO field. Thus, it can be interpreted as "number of pins". Overall, we can now say that the region handler interface to GPIO handlers is a raw "bit/pin" addressed interface, not a byte-addressed interface like the system_memory handler interface. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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-09-24ACPICA: Operation region support: Never free the handler "context" pointer.David E. Box
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>
2013-06-01ACPICA: Update for "orphan" embedded controller _REG method supportZhang Rui
This refers to _REG methods under the EC device that have no corresponding operation region. This is allowed by the ACPI specification. This update removes a dependency on having an ECDT table, and will execute an orphan _REG method as long as the handler for the EC is installed at the EC device node (not the namespace root). Rui Zhang (original update), Bob Moore (update/integrate). Signed-off-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> Acked-by: Len Brown <len.brown@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-11ACPICA: Source restructuring: split large files into 8 new files.Bob Moore
Created logical splits for eight new files. Improves modularity and configurability. 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-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>
2012-01-17ACPI 5.0: Implement Connection() and AccessAs() changesBob Moore
Support within the interpreter and operation region dispatch. 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-05-09ACPICA: Execute an orphan _REG method under the EC deviceBob Moore
This change will force the execution of a _REG method underneath the EC device even if there is no corresponding operation region of type EmbeddedControl. Fixes a problem seen on some machines and apparently is compatible with Windows behavior. http://www.acpica.org/bugzilla/show_bug.cgi?id=875 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-03-02ACPICA: Add mechanism to defer _REG methods for some installed handlersBob Moore
The memory/io/pci/dataTable regions must always be available. For any user installed handlers for these spaces, defer execution of _REG methods until acpi_enable_subsystem. This prevents any chicken/egg problems and ensures that no methods are executed until all of these regions are ready and available. 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-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: Remove obsolete ACPI_INTEGER (acpi_integer) typeBob Moore
This type was introduced as the code was migrated from ACPI 1.0 (with 32-bit AML integers) to ACPI 2.0 (with 64-bit integers). It is now obsolete and this change removes it from the ACPICA code base, replaced by u64. The original typedef has been retained for now for compatibility with existing device driver code. 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: 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: Deploy new create integer interface where appropriateBob Moore
Simplifies creation of simple integer objects. ACPICA BZ 823. http://www.acpica.org/bugzilla/show_bug.cgi?id=823 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-11-24ACPICA: Remove possibility of executing _REG methods twiceLin Ming
If a custom address space handler is installed by the host before the "initialize operation regions" phase of the ACPICA initialization, any _REG methods for that address space could be executed twice. This change fixes the problem. ACPICA BZ 427. http://www.acpica.org/bugzilla/show_bug.cgi?id=427 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-05-27ACPICA: Simplify internal operation region interfaceBob Moore
Changed address parameter to a simple offset. This removes the need for the caller to access the region object to obtain the physical address. 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-27ACPICA: Formatting update - no functional changesBob Moore
Split long lines, update comments. 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>