aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/tables/tbutils.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/tables/tbutils.c')
-rw-r--r--drivers/acpi/tables/tbutils.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/drivers/acpi/tables/tbutils.c b/drivers/acpi/tables/tbutils.c
index 5bcafebb9ddf..4b2fbb592f49 100644
--- a/drivers/acpi/tables/tbutils.c
+++ b/drivers/acpi/tables/tbutils.c
@@ -80,14 +80,24 @@ acpi_status acpi_tb_is_table_installed(struct acpi_table_desc *new_table_desc)
80 /* Examine all installed tables of this type */ 80 /* Examine all installed tables of this type */
81 81
82 while (table_desc) { 82 while (table_desc) {
83 /* Compare Revision and oem_table_id */ 83 /*
84 84 * If the table lengths match, perform a full bytewise compare. This
85 * means that we will allow tables with duplicate oem_table_id(s), as
86 * long as the tables are different in some way.
87 *
88 * Checking if the table has been loaded into the namespace means that
89 * we don't check for duplicate tables during the initial installation
90 * of tables within the RSDT/XSDT.
91 */
85 if ((table_desc->loaded_into_namespace) && 92 if ((table_desc->loaded_into_namespace) &&
86 (table_desc->pointer->revision == 93 (table_desc->pointer->length ==
87 new_table_desc->pointer->revision) && 94 new_table_desc->pointer->length)
88 (!ACPI_MEMCMP(table_desc->pointer->oem_table_id, 95 &&
89 new_table_desc->pointer->oem_table_id, 8))) { 96 (!ACPI_MEMCMP
90 /* This table is already installed */ 97 ((const char *)table_desc->pointer,
98 (const char *)new_table_desc->pointer,
99 (acpi_size) new_table_desc->pointer->length))) {
100 /* Match: this table is already installed */
91 101
92 ACPI_DEBUG_PRINT((ACPI_DB_TABLES, 102 ACPI_DEBUG_PRINT((ACPI_DB_TABLES,
93 "Table [%4.4s] already installed: Rev %X oem_table_id [%8.8s]\n", 103 "Table [%4.4s] already installed: Rev %X oem_table_id [%8.8s]\n",