ACPICA: Tables: Remove acpi_tb_install_fixed_table()
authorLv Zheng <lv.zheng@intel.com>
Wed, 7 Sep 2016 06:06:17 +0000 (14:06 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 10 Sep 2016 00:43:00 +0000 (02:43 +0200)
ACPICA commit 42c7b848d2faa02c7691ef2c53ea741c23cd4665

acpi_tb_install_fixed_table() is now redundant as we've removed the fixed
table indexing mechanism:
  Commit: 8ec3f459073e67e5c6d78507dec693064b3040a2
  Subject: ACPICA: Tables: Fix global table list issues by removing
           fixed table indexes
This patch cleans up the code accordingly.

No functional change. Lv Zheng.

Link: https://bugs.acpica.org/show_bug.cgi?id=1320
Link: https://github.com/acpica/acpica/commit/42c7b848
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>
drivers/acpi/acpica/actables.h
drivers/acpi/acpica/tbfadt.c
drivers/acpi/acpica/tbinstal.c

index 86d4d62ed640a54ff0fdf5ca845a80d91cf5b53d..9469cd4106c39887582e17ac6617c746f078e1fb 100644 (file)
@@ -155,12 +155,7 @@ void
 acpi_tb_install_table_with_override(struct acpi_table_desc *new_table_desc,
                                    u8 override, u32 *table_index);
 
-acpi_status
-acpi_tb_install_fixed_table(acpi_physical_address address,
-                           char *signature, u32 *table_index);
-
-acpi_status ACPI_INIT_FUNCTION
-acpi_tb_parse_root_table(acpi_physical_address rsdp_address);
+acpi_status acpi_tb_parse_root_table(acpi_physical_address rsdp_address);
 
 /*
  * tbxfload
index 016bcdce64ed35c43f2182da85aee40e6dc1219d..e678d6fb163c294e8f3f8d8086e83a6bec4b79f9 100644 (file)
@@ -344,23 +344,27 @@ void acpi_tb_parse_fadt(void)
 
        /* Obtain the DSDT and FACS tables via their addresses within the FADT */
 
-       acpi_tb_install_fixed_table((acpi_physical_address)acpi_gbl_FADT.Xdsdt,
-                                   ACPI_SIG_DSDT, &acpi_gbl_dsdt_index);
+       acpi_tb_install_standard_table((acpi_physical_address)acpi_gbl_FADT.
+                                      Xdsdt,
+                                      ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL,
+                                      FALSE, TRUE, &acpi_gbl_dsdt_index);
 
        /* If Hardware Reduced flag is set, there is no FACS */
 
        if (!acpi_gbl_reduced_hardware) {
                if (acpi_gbl_FADT.facs) {
-                       acpi_tb_install_fixed_table((acpi_physical_address)
-                                                   acpi_gbl_FADT.facs,
-                                                   ACPI_SIG_FACS,
-                                                   &acpi_gbl_facs_index);
+                       acpi_tb_install_standard_table((acpi_physical_address)
+                                                      acpi_gbl_FADT.facs,
+                                                      ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL,
+                                                      FALSE, TRUE,
+                                                      &acpi_gbl_facs_index);
                }
                if (acpi_gbl_FADT.Xfacs) {
-                       acpi_tb_install_fixed_table((acpi_physical_address)
-                                                   acpi_gbl_FADT.Xfacs,
-                                                   ACPI_SIG_FACS,
-                                                   &acpi_gbl_xfacs_index);
+                       acpi_tb_install_standard_table((acpi_physical_address)
+                                                      acpi_gbl_FADT.Xfacs,
+                                                      ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL,
+                                                      FALSE, TRUE,
+                                                      &acpi_gbl_xfacs_index);
                }
        }
 }
index 8b13052128fcbe54f9d4be724a4a8dab0fbdde93..d4618648ea13b53ef6f78d9b9d94d16ed8fc3321 100644 (file)
@@ -155,68 +155,6 @@ acpi_tb_install_table_with_override(struct acpi_table_desc *new_table_desc,
        }
 }
 
-/*******************************************************************************
- *
- * FUNCTION:    acpi_tb_install_fixed_table
- *
- * PARAMETERS:  address                 - Physical address of DSDT or FACS
- *              signature               - Table signature, NULL if no need to
- *                                        match
- *              table_index             - Where the table index is returned
- *
- * RETURN:      Status
- *
- * DESCRIPTION: Install a fixed ACPI table (DSDT/FACS) into the global data
- *              structure.
- *
- ******************************************************************************/
-
-acpi_status
-acpi_tb_install_fixed_table(acpi_physical_address address,
-                           char *signature, u32 *table_index)
-{
-       struct acpi_table_desc new_table_desc;
-       acpi_status status;
-
-       ACPI_FUNCTION_TRACE(tb_install_fixed_table);
-
-       if (!address) {
-               ACPI_ERROR((AE_INFO,
-                           "Null physical address for ACPI table [%s]",
-                           signature));
-               return (AE_NO_MEMORY);
-       }
-
-       /* Fill a table descriptor for validation */
-
-       status = acpi_tb_acquire_temp_table(&new_table_desc, address,
-                                           ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL);
-       if (ACPI_FAILURE(status)) {
-               ACPI_ERROR((AE_INFO,
-                           "Could not acquire table length at %8.8X%8.8X",
-                           ACPI_FORMAT_UINT64(address)));
-               return_ACPI_STATUS(status);
-       }
-
-       /* Validate and verify a table before installation */
-
-       status = acpi_tb_verify_temp_table(&new_table_desc, signature);
-       if (ACPI_FAILURE(status)) {
-               goto release_and_exit;
-       }
-
-       /* Add the table to the global root table list */
-
-       acpi_tb_install_table_with_override(&new_table_desc, TRUE, table_index);
-
-release_and_exit:
-
-       /* Release the temporary table descriptor */
-
-       acpi_tb_release_temp_table(&new_table_desc);
-       return_ACPI_STATUS(status);
-}
-
 /*******************************************************************************
  *
  * FUNCTION:    acpi_tb_install_standard_table
@@ -230,8 +168,7 @@ release_and_exit:
  *
  * RETURN:      Status
  *
- * DESCRIPTION: This function is called to install an ACPI table that is
- *              neither DSDT nor FACS (a "standard" table.)
+ * DESCRIPTION: This function is called to verify and install an ACPI table.
  *              When this function is called by "Load" or "LoadTable" opcodes,
  *              or by acpi_load_table() API, the "Reload" parameter is set.
  *              After sucessfully returning from this function, table is