Merge branches 'acpi-apei', 'acpi-doc' and 'acpi-soc'
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 8 Jul 2019 09:04:14 +0000 (11:04 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 8 Jul 2019 09:04:14 +0000 (11:04 +0200)
* acpi-apei:
  ACPI / APEI: Remove needless __ghes_check_estatus() calls

* acpi-doc:
  docs: extcon: convert it to ReST and move to ACPI dir

* acpi-soc:
  ACPI: APD: remove redundant assignment to pointer clk

30 files changed:
Documentation/firmware-guide/acpi/extcon-intel-int3496.rst [moved from Documentation/extcon/intel-int3496.txt with 66% similarity]
Documentation/firmware-guide/acpi/index.rst
MAINTAINERS
drivers/acpi/Kconfig
drivers/acpi/acpi_configfs.c
drivers/acpi/acpica/acevents.h
drivers/acpi/acpica/acglobal.h
drivers/acpi/acpica/acnamesp.h
drivers/acpi/acpica/dsinit.c
drivers/acpi/acpica/evgpe.c
drivers/acpi/acpica/evgpeblk.c
drivers/acpi/acpica/evxface.c
drivers/acpi/acpica/evxfgpe.c
drivers/acpi/acpica/exconfig.c
drivers/acpi/acpica/nsaccess.c
drivers/acpi/acpica/nseval.c
drivers/acpi/acpica/nsinit.c
drivers/acpi/acpica/nsload.c
drivers/acpi/acpica/nsutils.c
drivers/acpi/acpica/tbdata.c
drivers/acpi/acpica/tbxfload.c
drivers/acpi/acpica/utinit.c
drivers/acpi/acpica/utxfinit.c
drivers/acpi/apei/ghes.c
drivers/acpi/osl.c
drivers/acpi/pmic/intel_pmic.c
drivers/acpi/tables.c
include/acpi/acpi_io.h
include/acpi/acpixf.h
tools/power/acpi/.gitignore

similarity index 66%
rename from Documentation/extcon/intel-int3496.txt
rename to Documentation/firmware-guide/acpi/extcon-intel-int3496.rst
index 8155dbc7fad36a253137c230a7f074fecd0a7969..5137ca834b547a9d0476c141ddbb2446d4132e61 100644 (file)
@@ -1,5 +1,6 @@
+=====================================================
 Intel INT3496 ACPI device extcon driver documentation
------------------------------------------------------
+=====================================================
 
 The Intel INT3496 ACPI device extcon driver is a driver for ACPI
 devices with an acpi-id of INT3496, such as found for example on
@@ -13,15 +14,20 @@ between an USB host and an USB peripheral controller.
 The ACPI devices exposes this functionality by returning an array with up
 to 3 gpio descriptors from its ACPI _CRS (Current Resource Settings) call:
 
-Index 0: The input gpio for the id-pin, this is always present and valid
-Index 1: The output gpio for enabling Vbus output from the device to the otg
+=======  =====================================================================
+Index 0  The input gpio for the id-pin, this is always present and valid
+Index 1  The output gpio for enabling Vbus output from the device to the otg
          port, write 1 to enable the Vbus output (this gpio descriptor may
          be absent or invalid)
-Index 2: The output gpio for muxing of the data pins between the USB host and
+Index 2  The output gpio for muxing of the data pins between the USB host and
          the USB peripheral controller, write 1 to mux to the peripheral
          controller
+=======  =====================================================================
 
 There is a mapping between indices and GPIO connection IDs as follows
+
+       ======= =======
        id      index 0
        vbus    index 1
        mux     index 2
+       ======= =======
index ae609eec4679c0dc19387677a71c8fb36cf65504..90c90d42d9ad6284dbf0a2126d5025cc31d1c491 100644 (file)
@@ -24,3 +24,4 @@ ACPI Support
    acpi-lid
    lpit
    video_extension
+   extcon-intel-int3496
index 01a52fc964daeaf54e30cdfe86ba4e23a9e55425..9a6c83282bdf03f67b9db88a0c3da3fa8f51297d 100644 (file)
@@ -321,7 +321,7 @@ F:  drivers/pnp/pnpacpi/
 F:     include/linux/acpi.h
 F:     include/linux/fwnode.h
 F:     include/acpi/
-F:     Documentation/acpi/
+F:     Documentation/firmware-guide/acpi/
 F:     Documentation/ABI/testing/sysfs-bus-acpi
 F:     Documentation/ABI/testing/configfs-acpi
 F:     drivers/pci/*acpi*
@@ -4872,7 +4872,7 @@ S:        Maintained
 F:     Documentation/
 F:     scripts/kernel-doc
 X:     Documentation/ABI/
-X:     Documentation/acpi/
+X:     Documentation/firmware-guide/acpi/
 X:     Documentation/devicetree/
 X:     Documentation/i2c/
 X:     Documentation/media/
@@ -6042,7 +6042,7 @@ S:        Maintained
 F:     drivers/extcon/
 F:     include/linux/extcon/
 F:     include/linux/extcon.h
-F:     Documentation/extcon/
+F:     Documentation/firmware-guide/acpi/extcon-intel-int3496.rst
 F:     Documentation/devicetree/bindings/extcon/
 
 EXYNOS DP DRIVER
index 283ee94224c6c0270008b99b257a59af7f15819e..4e1e517a33bc7cbc54f9ea7fa21ecfb5596eab0f 100644 (file)
@@ -155,7 +155,6 @@ config ACPI_EC_DEBUGFS
 
 config ACPI_AC
        tristate "AC Adapter"
-       depends on X86
        select POWER_SUPPLY
        default y
        help
@@ -168,7 +167,6 @@ config ACPI_AC
 
 config ACPI_BATTERY
        tristate "Battery"
-       depends on X86
        select POWER_SUPPLY
        default y
        help
index 9c6ff0f5a25e30b5e9e3a737845572b455ce9a9f..57d9d574d4dde6e448e83d12f3f66265fbc13398 100644 (file)
@@ -53,11 +53,7 @@ static ssize_t acpi_table_aml_write(struct config_item *cfg,
        if (!table->header)
                return -ENOMEM;
 
-       ACPI_INFO(("Host-directed Dynamic ACPI Table Load:"));
-       ret = acpi_tb_install_and_load_table(
-                       ACPI_PTR_TO_PHYSADDR(table->header),
-                       ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL, FALSE,
-                       &table->index);
+       ret = acpi_load_table(table->header);
        if (ret) {
                kfree(table->header);
                table->header = NULL;
index 831660179662ea60a3932ab71f3592e18ba19419..c8652f91054eb250494076051472b000fb1f3466 100644 (file)
@@ -69,7 +69,8 @@ acpi_status
 acpi_ev_mask_gpe(struct acpi_gpe_event_info *gpe_event_info, u8 is_masked);
 
 acpi_status
-acpi_ev_add_gpe_reference(struct acpi_gpe_event_info *gpe_event_info);
+acpi_ev_add_gpe_reference(struct acpi_gpe_event_info *gpe_event_info,
+                         u8 clear_on_enable);
 
 acpi_status
 acpi_ev_remove_gpe_reference(struct acpi_gpe_event_info *gpe_event_info);
index d056a1845613bc021a19b7c3609bbf2cff32bedb..fd3beea9342134e17de3c879909173054ba52252 100644 (file)
@@ -178,7 +178,6 @@ ACPI_GLOBAL(u8, acpi_gbl_verbose_leak_dump);
 ACPI_GLOBAL(struct acpi_namespace_node, acpi_gbl_root_node_struct);
 ACPI_GLOBAL(struct acpi_namespace_node *, acpi_gbl_root_node);
 ACPI_GLOBAL(struct acpi_namespace_node *, acpi_gbl_fadt_gpe_device);
-ACPI_GLOBAL(union acpi_operand_object *, acpi_gbl_module_code_list);
 
 extern const u8 acpi_gbl_ns_properties[ACPI_NUM_NS_TYPES];
 extern const struct acpi_predefined_names
index 39812fc4386a4d22de5464f0bb4e68950552fd0f..7da1864798a0e7fa679c611a68eb7ae75cb6a80b 100644 (file)
@@ -207,8 +207,6 @@ acpi_ns_dump_object_paths(acpi_object_type type,
  */
 acpi_status acpi_ns_evaluate(struct acpi_evaluate_info *info);
 
-void acpi_ns_exec_module_code_list(void);
-
 /*
  * nsarguments - Argument count/type checking for predefined/reserved names
  */
index 4ebd23700bbcb17d897056680fa6eef2fa30ed46..a1ffed29903bdb16851676c71e5be1501f13c1f8 100644 (file)
@@ -202,7 +202,7 @@ acpi_ds_initialize_objects(u32 table_index,
 
        if (ACPI_COMPARE_NAMESEG(table->signature, ACPI_SIG_DSDT)) {
                ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT,
-                                     "\nInitializing Namespace objects:\n"));
+                                     "\nACPI table initialization:\n"));
        }
 
        /* Summary of objects initialized */
index 62d3aa74277b4d03cb4bd1e7d5cee705864bd41b..344feba290635e02a588fc9316b49b4aaf16aeae 100644 (file)
@@ -146,6 +146,7 @@ acpi_ev_mask_gpe(struct acpi_gpe_event_info *gpe_event_info, u8 is_masked)
  * FUNCTION:    acpi_ev_add_gpe_reference
  *
  * PARAMETERS:  gpe_event_info          - Add a reference to this GPE
+ *              clear_on_enable         - Clear GPE status before enabling it
  *
  * RETURN:      Status
  *
@@ -155,7 +156,8 @@ acpi_ev_mask_gpe(struct acpi_gpe_event_info *gpe_event_info, u8 is_masked)
  ******************************************************************************/
 
 acpi_status
-acpi_ev_add_gpe_reference(struct acpi_gpe_event_info *gpe_event_info)
+acpi_ev_add_gpe_reference(struct acpi_gpe_event_info *gpe_event_info,
+                         u8 clear_on_enable)
 {
        acpi_status status = AE_OK;
 
@@ -170,6 +172,10 @@ acpi_ev_add_gpe_reference(struct acpi_gpe_event_info *gpe_event_info)
 
                /* Enable on first reference */
 
+               if (clear_on_enable) {
+                       (void)acpi_hw_clear_gpe(gpe_event_info);
+               }
+
                status = acpi_ev_update_gpe_enable_mask(gpe_event_info);
                if (ACPI_SUCCESS(status)) {
                        status = acpi_ev_enable_gpe(gpe_event_info);
index 328d1d6123ad6e04c50d8d485dc34ef26020c4e2..fb15e9e2373b93b5828eb63832510ef3d0f8189d 100644 (file)
@@ -453,7 +453,7 @@ acpi_ev_initialize_gpe_block(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
                                continue;
                        }
 
-                       status = acpi_ev_add_gpe_reference(gpe_event_info);
+                       status = acpi_ev_add_gpe_reference(gpe_event_info, FALSE);
                        if (ACPI_FAILURE(status)) {
                                ACPI_EXCEPTION((AE_INFO, status,
                                        "Could not enable GPE 0x%02X",
index 3df00eb6621bd200850b6c0439b9964d63534238..279ef0557aa38e29f56ed16a0993c342dc0af2fa 100644 (file)
@@ -971,7 +971,7 @@ acpi_remove_gpe_handler(acpi_handle gpe_device,
              ACPI_GPE_DISPATCH_METHOD) ||
             (ACPI_GPE_DISPATCH_TYPE(handler->original_flags) ==
              ACPI_GPE_DISPATCH_NOTIFY)) && handler->originally_enabled) {
-               (void)acpi_ev_add_gpe_reference(gpe_event_info);
+               (void)acpi_ev_add_gpe_reference(gpe_event_info, FALSE);
                if (ACPI_GPE_IS_POLLING_NEEDED(gpe_event_info)) {
 
                        /* Poll edge triggered GPEs to handle existing events */
index 30a083902f522115f23642233805a3c7fb11a812..710488ec59e99f7819a7de1d685f87fe6a87b500 100644 (file)
@@ -108,7 +108,7 @@ acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number)
        if (gpe_event_info) {
                if (ACPI_GPE_DISPATCH_TYPE(gpe_event_info->flags) !=
                    ACPI_GPE_DISPATCH_NONE) {
-                       status = acpi_ev_add_gpe_reference(gpe_event_info);
+                       status = acpi_ev_add_gpe_reference(gpe_event_info, TRUE);
                        if (ACPI_SUCCESS(status) &&
                            ACPI_GPE_IS_POLLING_NEEDED(gpe_event_info)) {
 
index 587aeeeb5070a1dea1bed495e0735af4f8818b1f..58c04d70672355e9b6585e6412c5024c9f86eaaa 100644 (file)
@@ -174,12 +174,9 @@ acpi_ex_load_table_op(struct acpi_walk_state *walk_state,
                return_ACPI_STATUS(status);
        }
 
-       /* Complete the initialization/resolution of package objects */
+       /* Complete the initialization/resolution of new objects */
 
-       status = acpi_ns_walk_namespace(ACPI_TYPE_PACKAGE, ACPI_ROOT_OBJECT,
-                                       ACPI_UINT32_MAX, 0,
-                                       acpi_ns_init_one_package, NULL, NULL,
-                                       NULL);
+       acpi_ns_initialize_objects();
 
        /* Parameter Data (optional) */
 
@@ -437,12 +434,11 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc,
                return_ACPI_STATUS(status);
        }
 
-       /* Complete the initialization/resolution of package objects */
+       /* Complete the initialization/resolution of new objects */
 
-       status = acpi_ns_walk_namespace(ACPI_TYPE_PACKAGE, ACPI_ROOT_OBJECT,
-                                       ACPI_UINT32_MAX, 0,
-                                       acpi_ns_init_one_package, NULL, NULL,
-                                       NULL);
+       acpi_ex_exit_interpreter();
+       acpi_ns_initialize_objects();
+       acpi_ex_enter_interpreter();
 
        /* Store the ddb_handle into the Target operand */
 
index 7b855603f81a5b81ad2a3d944165462b249fe4ab..2566e2d4c78031b4194ada252878b0b88194d1e4 100644 (file)
@@ -36,6 +36,7 @@ acpi_status acpi_ns_root_initialize(void)
        acpi_status status;
        const struct acpi_predefined_names *init_val = NULL;
        struct acpi_namespace_node *new_node;
+       struct acpi_namespace_node *prev_node = NULL;
        union acpi_operand_object *obj_desc;
        acpi_string val = NULL;
 
@@ -61,12 +62,28 @@ acpi_status acpi_ns_root_initialize(void)
         */
        acpi_gbl_root_node = &acpi_gbl_root_node_struct;
 
-       /* Enter the pre-defined names in the name table */
+       /* Enter the predefined names in the name table */
 
        ACPI_DEBUG_PRINT((ACPI_DB_INFO,
                          "Entering predefined entries into namespace\n"));
 
+       /*
+        * Create the initial (default) namespace.
+        * This namespace looks like something similar to this:
+        *
+        *   ACPI Namespace (from Namespace Root):
+        *    0  _GPE Scope        00203160 00
+        *    0  _PR_ Scope        002031D0 00
+        *    0  _SB_ Device       00203240 00 Notify Object: 0020ADD8
+        *    0  _SI_ Scope        002032B0 00
+        *    0  _TZ_ Device       00203320 00
+        *    0  _REV Integer      00203390 00 = 0000000000000002
+        *    0  _OS_ String       00203488 00 Len 14 "Microsoft Windows NT"
+        *    0  _GL_ Mutex        00203580 00 Object 002035F0
+        *    0  _OSI Method       00203678 00 Args 1 Len 0000 Aml 00000000
+        */
        for (init_val = acpi_gbl_pre_defined_names; init_val->name; init_val++) {
+               status = AE_OK;
 
                /* _OSI is optional for now, will be permanent later */
 
@@ -75,17 +92,32 @@ acpi_status acpi_ns_root_initialize(void)
                        continue;
                }
 
-               status =
-                   acpi_ns_lookup(NULL, ACPI_CAST_PTR(char, init_val->name),
-                                  init_val->type, ACPI_IMODE_LOAD_PASS2,
-                                  ACPI_NS_NO_UPSEARCH, NULL, &new_node);
-               if (ACPI_FAILURE(status)) {
-                       ACPI_EXCEPTION((AE_INFO, status,
-                                       "Could not create predefined name %s",
-                                       init_val->name));
-                       continue;
+               /*
+                * Create, init, and link the new predefined name
+                * Note: No need to use acpi_ns_lookup here because all the
+                * predefined names are at the root level. It is much easier to
+                * just create and link the new node(s) here.
+                */
+               new_node =
+                   ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_namespace_node));
+               if (!new_node) {
+                       status = AE_NO_MEMORY;
+                       goto unlock_and_exit;
                }
 
+               ACPI_COPY_NAMESEG(new_node->name.ascii, init_val->name);
+               new_node->descriptor_type = ACPI_DESC_TYPE_NAMED;
+               new_node->type = init_val->type;
+
+               if (!prev_node) {
+                       acpi_gbl_root_node_struct.child = new_node;
+               } else {
+                       prev_node->peer = new_node;
+               }
+
+               new_node->parent = &acpi_gbl_root_node_struct;
+               prev_node = new_node;
+
                /*
                 * Name entered successfully. If entry in pre_defined_names[] specifies
                 * an initial value, create the initial value.
@@ -131,7 +163,7 @@ acpi_status acpi_ns_root_initialize(void)
 
                                new_node->value = obj_desc->method.param_count;
 #else
-                               /* Mark this as a very SPECIAL method */
+                               /* Mark this as a very SPECIAL method (_OSI) */
 
                                obj_desc->method.info_flags =
                                    ACPI_METHOD_INTERNAL_ONLY;
index 6390b7951ebfac913c1d55d747797c676da748ae..63748ac699f73b58483982559efea2db7e690506 100644 (file)
 #define _COMPONENT          ACPI_NAMESPACE
 ACPI_MODULE_NAME("nseval")
 
-/* Local prototypes */
-static void
-acpi_ns_exec_module_code(union acpi_operand_object *method_obj,
-                        struct acpi_evaluate_info *info);
-
 /*******************************************************************************
  *
  * FUNCTION:    acpi_ns_evaluate
@@ -44,7 +39,6 @@ acpi_ns_exec_module_code(union acpi_operand_object *method_obj,
  * MUTEX:       Locks interpreter
  *
  ******************************************************************************/
-
 acpi_status acpi_ns_evaluate(struct acpi_evaluate_info *info)
 {
        acpi_status status;
@@ -310,187 +304,3 @@ cleanup:
        info->full_pathname = NULL;
        return_ACPI_STATUS(status);
 }
-
-/*******************************************************************************
- *
- * FUNCTION:    acpi_ns_exec_module_code_list
- *
- * PARAMETERS:  None
- *
- * RETURN:      None. Exceptions during method execution are ignored, since
- *              we cannot abort a table load.
- *
- * DESCRIPTION: Execute all elements of the global module-level code list.
- *              Each element is executed as a single control method.
- *
- * NOTE: With this option enabled, each block of detected executable AML
- * code that is outside of any control method is wrapped with a temporary
- * control method object and placed on a global list. The methods on this
- * list are executed below.
- *
- * This function executes the module-level code for all tables only after
- * all of the tables have been loaded. It is a legacy option and is
- * not compatible with other ACPI implementations. See acpi_ns_load_table.
- *
- * This function will be removed when the legacy option is removed.
- *
- ******************************************************************************/
-
-void acpi_ns_exec_module_code_list(void)
-{
-       union acpi_operand_object *prev;
-       union acpi_operand_object *next;
-       struct acpi_evaluate_info *info;
-       u32 method_count = 0;
-
-       ACPI_FUNCTION_TRACE(ns_exec_module_code_list);
-
-       /* Exit now if the list is empty */
-
-       next = acpi_gbl_module_code_list;
-       if (!next) {
-               ACPI_DEBUG_PRINT((ACPI_DB_INIT_NAMES,
-                                 "Legacy MLC block list is empty\n"));
-
-               return_VOID;
-       }
-
-       /* Allocate the evaluation information block */
-
-       info = ACPI_ALLOCATE(sizeof(struct acpi_evaluate_info));
-       if (!info) {
-               return_VOID;
-       }
-
-       /* Walk the list, executing each "method" */
-
-       while (next) {
-               prev = next;
-               next = next->method.mutex;
-
-               /* Clear the link field and execute the method */
-
-               prev->method.mutex = NULL;
-               acpi_ns_exec_module_code(prev, info);
-               method_count++;
-
-               /* Delete the (temporary) method object */
-
-               acpi_ut_remove_reference(prev);
-       }
-
-       ACPI_INFO(("Executed %u blocks of module-level executable AML code",
-                  method_count));
-
-       ACPI_FREE(info);
-       acpi_gbl_module_code_list = NULL;
-       return_VOID;
-}
-
-/*******************************************************************************
- *
- * FUNCTION:    acpi_ns_exec_module_code
- *
- * PARAMETERS:  method_obj          - Object container for the module-level code
- *              info                - Info block for method evaluation
- *
- * RETURN:      None. Exceptions during method execution are ignored, since
- *              we cannot abort a table load.
- *
- * DESCRIPTION: Execute a control method containing a block of module-level
- *              executable AML code. The control method is temporarily
- *              installed to the root node, then evaluated.
- *
- ******************************************************************************/
-
-static void
-acpi_ns_exec_module_code(union acpi_operand_object *method_obj,
-                        struct acpi_evaluate_info *info)
-{
-       union acpi_operand_object *parent_obj;
-       struct acpi_namespace_node *parent_node;
-       acpi_object_type type;
-       acpi_status status;
-
-       ACPI_FUNCTION_TRACE(ns_exec_module_code);
-
-       /*
-        * Get the parent node. We cheat by using the next_object field
-        * of the method object descriptor.
-        */
-       parent_node =
-           ACPI_CAST_PTR(struct acpi_namespace_node,
-                                   method_obj->method.next_object);
-       type = acpi_ns_get_type(parent_node);
-
-       /*
-        * Get the region handler and save it in the method object. We may need
-        * this if an operation region declaration causes a _REG method to be run.
-        *
-        * We can't do this in acpi_ps_link_module_code because
-        * acpi_gbl_root_node->Object is NULL at PASS1.
-        */
-       if ((type == ACPI_TYPE_DEVICE) && parent_node->object) {
-               method_obj->method.dispatch.handler =
-                   parent_node->object->device.handler;
-       }
-
-       /* Must clear next_object (acpi_ns_attach_object needs the field) */
-
-       method_obj->method.next_object = NULL;
-
-       /* Initialize the evaluation information block */
-
-       memset(info, 0, sizeof(struct acpi_evaluate_info));
-       info->prefix_node = parent_node;
-
-       /*
-        * Get the currently attached parent object. Add a reference,
-        * because the ref count will be decreased when the method object
-        * is installed to the parent node.
-        */
-       parent_obj = acpi_ns_get_attached_object(parent_node);
-       if (parent_obj) {
-               acpi_ut_add_reference(parent_obj);
-       }
-
-       /* Install the method (module-level code) in the parent node */
-
-       status =
-           acpi_ns_attach_object(parent_node, method_obj, ACPI_TYPE_METHOD);
-       if (ACPI_FAILURE(status)) {
-               goto exit;
-       }
-
-       /* Execute the parent node as a control method */
-
-       status = acpi_ns_evaluate(info);
-
-       ACPI_DEBUG_PRINT((ACPI_DB_INIT_NAMES,
-                         "Executed module-level code at %p\n",
-                         method_obj->method.aml_start));
-
-       /* Delete a possible implicit return value (in slack mode) */
-
-       if (info->return_object) {
-               acpi_ut_remove_reference(info->return_object);
-       }
-
-       /* Detach the temporary method object */
-
-       acpi_ns_detach_object(parent_node);
-
-       /* Restore the original parent object */
-
-       if (parent_obj) {
-               status = acpi_ns_attach_object(parent_node, parent_obj, type);
-       } else {
-               parent_node->type = (u8)type;
-       }
-
-exit:
-       if (parent_obj) {
-               acpi_ut_remove_reference(parent_obj);
-       }
-       return_VOID;
-}
index 53e5d00d3a5eddb00731cae9fd75652abdad8eef..61e9dfc9fe8c05a1f875e6ccec00527b809c50a8 100644 (file)
@@ -55,14 +55,19 @@ acpi_status acpi_ns_initialize_objects(void)
        ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
                          "**** Starting initialization of namespace objects ****\n"));
        ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT,
-                             "Completing Region/Field/Buffer/Package initialization:\n"));
+                             "Final data object initialization: "));
 
-       /* Set all init info to zero */
+       /* Clear the info block */
 
        memset(&info, 0, sizeof(struct acpi_init_walk_info));
 
        /* Walk entire namespace from the supplied root */
 
+       /*
+        * TBD: will become ACPI_TYPE_PACKAGE as this type object
+        * is now the only one that supports deferred initialization
+        * (forward references).
+        */
        status = acpi_walk_namespace(ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
                                     ACPI_UINT32_MAX, acpi_ns_init_one_object,
                                     NULL, &info, NULL);
@@ -71,13 +76,8 @@ acpi_status acpi_ns_initialize_objects(void)
        }
 
        ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT,
-                             "    Initialized %u/%u Regions %u/%u Fields %u/%u "
-                             "Buffers %u/%u Packages (%u nodes)\n",
-                             info.op_region_init, info.op_region_count,
-                             info.field_init, info.field_count,
-                             info.buffer_init, info.buffer_count,
-                             info.package_init, info.package_count,
-                             info.object_count));
+                             "Namespace contains %u (0x%X) objects\n",
+                             info.object_count, info.object_count));
 
        ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
                          "%u Control Methods found\n%u Op Regions found\n",
@@ -382,34 +382,18 @@ acpi_ns_init_one_object(acpi_handle obj_handle,
        acpi_ex_enter_interpreter();
 
        /*
-        * Each of these types can contain executable AML code within the
-        * declaration.
+        * Only initialization of Package objects can be deferred, in order
+        * to support forward references.
         */
        switch (type) {
-       case ACPI_TYPE_REGION:
-
-               info->op_region_init++;
-               status = acpi_ds_get_region_arguments(obj_desc);
-               break;
-
-       case ACPI_TYPE_BUFFER_FIELD:
-
-               info->field_init++;
-               status = acpi_ds_get_buffer_field_arguments(obj_desc);
-               break;
-
        case ACPI_TYPE_LOCAL_BANK_FIELD:
 
+               /* TBD: bank_fields do not require deferred init, remove this code */
+
                info->field_init++;
                status = acpi_ds_get_bank_field_arguments(obj_desc);
                break;
 
-       case ACPI_TYPE_BUFFER:
-
-               info->buffer_init++;
-               status = acpi_ds_get_buffer_arguments(obj_desc);
-               break;
-
        case ACPI_TYPE_PACKAGE:
 
                /* Complete the initialization/resolution of the package object */
@@ -421,8 +405,13 @@ acpi_ns_init_one_object(acpi_handle obj_handle,
 
        default:
 
-               /* No other types can get here */
+               /* No other types should get here */
 
+               status = AE_TYPE;
+               ACPI_EXCEPTION((AE_INFO, status,
+                               "Opcode is not deferred [%4.4s] (%s)",
+                               acpi_ut_get_node_name(node),
+                               acpi_ut_get_type_name(type)));
                break;
        }
 
index 35fff5c75da148a506da81fd7b8b1c99610357f1..d7c4d6e8e21e62dcffc7186db03f8b44e3609cc7 100644 (file)
@@ -109,18 +109,6 @@ unlock:
        ACPI_DEBUG_PRINT((ACPI_DB_INFO,
                          "**** Completed Table Object Initialization\n"));
 
-       /*
-        * This case handles the legacy option that groups all module-level
-        * code blocks together and defers execution until all of the tables
-        * are loaded. Execute all of these blocks at this time.
-        * Execute any module-level code that was detected during the table
-        * load phase.
-        *
-        * Note: this option is deprecated and will be eliminated in the
-        * future. Use of this option can cause problems with AML code that
-        * depends upon in-order immediate execution of module-level code.
-        */
-       acpi_ns_exec_module_code_list();
        return_ACPI_STATUS(status);
 }
 
index 6bc90d46db5caaf38b40684a7782a905f6181288..b8d007c84d329e86b06ee7c127c26941b6fd087c 100644 (file)
@@ -560,21 +560,9 @@ struct acpi_namespace_node *acpi_ns_validate_handle(acpi_handle handle)
 void acpi_ns_terminate(void)
 {
        acpi_status status;
-       union acpi_operand_object *prev;
-       union acpi_operand_object *next;
 
        ACPI_FUNCTION_TRACE(ns_terminate);
 
-       /* Delete any module-level code blocks */
-
-       next = acpi_gbl_module_code_list;
-       while (next) {
-               prev = next;
-               next = next->method.mutex;
-               prev->method.mutex = NULL;      /* Clear the Mutex (cheated) field */
-               acpi_ut_remove_reference(prev);
-       }
-
        /*
         * Free the entire namespace -- all nodes and all objects
         * attached to the nodes
index 933f81316ad2c1568ddbb5d82620ab69006c443a..91a4b984f224c71ced026462db951b08c2e478f1 100644 (file)
@@ -933,19 +933,6 @@ acpi_tb_load_table(u32 table_index, struct acpi_namespace_node *parent_node)
 
        status = acpi_ns_load_table(table_index, parent_node);
 
-       /*
-        * This case handles the legacy option that groups all module-level
-        * code blocks together and defers execution until all of the tables
-        * are loaded. Execute all of these blocks at this time.
-        * Execute any module-level code that was detected during the table
-        * load phase.
-        *
-        * Note: this option is deprecated and will be eliminated in the
-        * future. Use of this option can cause problems with AML code that
-        * depends upon in-order immediate execution of module-level code.
-        */
-       acpi_ns_exec_module_code_list();
-
        /*
         * Update GPEs for any new _Lxx/_Exx methods. Ignore errors. The host is
         * responsible for discovering any new wake GPEs by running _PRW methods
index 4f30f06a6f7874c43339b913ea4942a37c6b8a95..86f1693f6d29a8f5ae36d8abf84d288059994c9f 100644 (file)
@@ -297,6 +297,13 @@ acpi_status acpi_load_table(struct acpi_table_header *table)
        status = acpi_tb_install_and_load_table(ACPI_PTR_TO_PHYSADDR(table),
                                                ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL,
                                                FALSE, &table_index);
+       if (ACPI_SUCCESS(status)) {
+
+               /* Complete the initialization/resolution of new objects */
+
+               acpi_ns_initialize_objects();
+       }
+
        return_ACPI_STATUS(status);
 }
 
index bc124591320e920ccdf004382a6fa8e4251eda24..6f33e7c723276885350836407f102a0237839ea0 100644 (file)
@@ -180,7 +180,6 @@ acpi_status acpi_ut_init_globals(void)
 
        /* Namespace */
 
-       acpi_gbl_module_code_list = NULL;
        acpi_gbl_root_node = NULL;
        acpi_gbl_root_node_struct.name.integer = ACPI_ROOT_NAME;
        acpi_gbl_root_node_struct.descriptor_type = ACPI_DESC_TYPE_NAMED;
index 9f3b1e3a09de38815e7af3f24d2fee442def8928..cf769e94fe0f1dcbb82f38114d702f95bf8e3c1d 100644 (file)
@@ -211,24 +211,17 @@ acpi_status ACPI_INIT_FUNCTION acpi_initialize_objects(u32 flags)
 
        ACPI_FUNCTION_TRACE(acpi_initialize_objects);
 
+#ifdef ACPI_OBSOLETE_BEHAVIOR
        /*
-        * This case handles the legacy option that groups all module-level
-        * code blocks together and defers execution until all of the tables
-        * are loaded. Execute all of these blocks at this time.
-        * Execute any module-level code that was detected during the table
-        * load phase.
-        *
-        * Note: this option is deprecated and will be eliminated in the
-        * future. Use of this option can cause problems with AML code that
-        * depends upon in-order immediate execution of module-level code.
+        * 05/2019: Removed, initialization now happens at both object
+        * creation and table load time
         */
-       acpi_ns_exec_module_code_list();
 
        /*
         * Initialize the objects that remain uninitialized. This
         * runs the executable AML that may be part of the
-        * declaration of these objects:
-        * operation_regions, buffer_fields, Buffers, and Packages.
+        * declaration of these objects: operation_regions, buffer_fields,
+        * bank_fields, Buffers, and Packages.
         */
        if (!(flags & ACPI_NO_OBJECT_INIT)) {
                status = acpi_ns_initialize_objects();
@@ -236,6 +229,7 @@ acpi_status ACPI_INIT_FUNCTION acpi_initialize_objects(u32 flags)
                        return_ACPI_STATUS(status);
                }
        }
+#endif
 
        /*
         * Initialize all device/region objects in the namespace. This runs
index 993940d582f5075db5fb1f291f612a9f8f0039c7..a66e00fe31fec16774bbb795c50427183c137e27 100644 (file)
@@ -345,7 +345,7 @@ static int __ghes_peek_estatus(struct ghes *ghes,
                return -ENOENT;
        }
 
-       return __ghes_check_estatus(ghes, estatus);
+       return 0;
 }
 
 static int __ghes_read_estatus(struct acpi_hest_generic_status *estatus,
index cc7507091dec21653dba5850ea5cbddb3265158f..9c0edf2fc0dd57df77d526e25d3f69dd3b2cd81b 100644 (file)
@@ -301,8 +301,8 @@ static void acpi_unmap(acpi_physical_address pg_off, void __iomem *vaddr)
  * During early init (when acpi_permanent_mmap has not been set yet) this
  * routine simply calls __acpi_map_table() to get the job done.
  */
-void __iomem *__ref
-acpi_os_map_iomem(acpi_physical_address phys, acpi_size size)
+void __iomem __ref
+*acpi_os_map_iomem(acpi_physical_address phys, acpi_size size)
 {
        struct acpi_ioremap *map;
        void __iomem *virt;
index 1b722fd57d5eca1760df32b220dae30e95e9ac4f..452041398b347f67919f002b148730129919276e 100644 (file)
@@ -284,8 +284,6 @@ int intel_pmic_install_opregion_handler(struct device *dev, acpi_handle handle,
                                                    intel_pmic_thermal_handler,
                                                    NULL, opregion);
        if (ACPI_FAILURE(status)) {
-               acpi_remove_address_space_handler(handle, PMIC_POWER_OPREGION_ID,
-                                                 intel_pmic_power_handler);
                ret = -ENODEV;
                goto out_remove_power_handler;
        }
index de974322a197ebda83e904156c82d1f9e6d1d8ad..b323277593809269aaf4af8e7c8da3850be08011 100644 (file)
@@ -490,16 +490,17 @@ static u8 __init acpi_table_checksum(u8 *buffer, u32 length)
 
 /* All but ACPI_SIG_RSDP and ACPI_SIG_FACS: */
 static const char * const table_sigs[] = {
-       ACPI_SIG_BERT, ACPI_SIG_CPEP, ACPI_SIG_ECDT, ACPI_SIG_EINJ,
-       ACPI_SIG_ERST, ACPI_SIG_HEST, ACPI_SIG_MADT, ACPI_SIG_MSCT,
-       ACPI_SIG_SBST, ACPI_SIG_SLIT, ACPI_SIG_SRAT, ACPI_SIG_ASF,
-       ACPI_SIG_BOOT, ACPI_SIG_DBGP, ACPI_SIG_DMAR, ACPI_SIG_HPET,
-       ACPI_SIG_IBFT, ACPI_SIG_IVRS, ACPI_SIG_MCFG, ACPI_SIG_MCHI,
-       ACPI_SIG_SLIC, ACPI_SIG_SPCR, ACPI_SIG_SPMI, ACPI_SIG_TCPA,
-       ACPI_SIG_UEFI, ACPI_SIG_WAET, ACPI_SIG_WDAT, ACPI_SIG_WDDT,
-       ACPI_SIG_WDRT, ACPI_SIG_DSDT, ACPI_SIG_FADT, ACPI_SIG_PSDT,
-       ACPI_SIG_RSDT, ACPI_SIG_XSDT, ACPI_SIG_SSDT, ACPI_SIG_IORT,
-       ACPI_SIG_NFIT, ACPI_SIG_HMAT, ACPI_SIG_PPTT, NULL };
+       ACPI_SIG_BERT, ACPI_SIG_BGRT, ACPI_SIG_CPEP, ACPI_SIG_ECDT,
+       ACPI_SIG_EINJ, ACPI_SIG_ERST, ACPI_SIG_HEST, ACPI_SIG_MADT,
+       ACPI_SIG_MSCT, ACPI_SIG_SBST, ACPI_SIG_SLIT, ACPI_SIG_SRAT,
+       ACPI_SIG_ASF,  ACPI_SIG_BOOT, ACPI_SIG_DBGP, ACPI_SIG_DMAR,
+       ACPI_SIG_HPET, ACPI_SIG_IBFT, ACPI_SIG_IVRS, ACPI_SIG_MCFG,
+       ACPI_SIG_MCHI, ACPI_SIG_SLIC, ACPI_SIG_SPCR, ACPI_SIG_SPMI,
+       ACPI_SIG_TCPA, ACPI_SIG_UEFI, ACPI_SIG_WAET, ACPI_SIG_WDAT,
+       ACPI_SIG_WDDT, ACPI_SIG_WDRT, ACPI_SIG_DSDT, ACPI_SIG_FADT,
+       ACPI_SIG_PSDT, ACPI_SIG_RSDT, ACPI_SIG_XSDT, ACPI_SIG_SSDT,
+       ACPI_SIG_IORT, ACPI_SIG_NFIT, ACPI_SIG_HMAT, ACPI_SIG_PPTT,
+       NULL };
 
 #define ACPI_HEADER_SIZE sizeof(struct acpi_table_header)
 
index d0633fc1fc156eee7432a34481d64483a54964a6..12d8bd333fe741dea6bc476a6b68b18fd49b0731 100644 (file)
@@ -16,8 +16,8 @@ static inline void __iomem *acpi_os_ioremap(acpi_physical_address phys,
 
 extern bool acpi_permanent_mmap;
 
-void __iomem *__ref
-acpi_os_map_iomem(acpi_physical_address phys, acpi_size size);
+void __iomem __ref
+*acpi_os_map_iomem(acpi_physical_address phys, acpi_size size);
 void __ref acpi_os_unmap_iomem(void __iomem *virt, acpi_size size);
 void __iomem *acpi_os_get_iomem(acpi_physical_address phys, unsigned int size);
 
index 4a8a05401fb53cef2e21d62c02ffac7edf143eb8..3845c8fcc94e5de64d09b679f61f5ce0eca5b45c 100644 (file)
@@ -12,7 +12,7 @@
 
 /* Current ACPICA subsystem version in YYYYMMDD format */
 
-#define ACPI_CA_VERSION                 0x20190509
+#define ACPI_CA_VERSION                 0x20190703
 
 #include <acpi/acconfig.h>
 #include <acpi/actypes.h>
index cba3d994995c69e28be42ef192ae9cf06b3fbe96..f698a0e5bfa69c05d5a605de969c9f512edef7bd 100644 (file)
@@ -1,4 +1,4 @@
-acpidbg
-acpidump
-ec
-include
+/acpidbg
+/acpidump
+/ec
+/include/