static u8 acpi_tb_compare_tables(struct acpi_table_desc *table_desc, u32 table_index) { acpi_status status = AE_OK; u8 is_identical; struct acpi_table_header *table; u32 table_length; u8 table_flags; status = acpi_tb_acquire_table(&acpi_gbl_root_table_list.tables[table_index], &table, &table_length, &table_flags); if (ACPI_FAILURE(status)) { return (FALSE); } /* * Check for a table match on the entire table length, * not just the header. */ is_identical = (u8)((table_desc->length != table_length || memcmp(table_desc->pointer, table, table_length)) ? FALSE : TRUE); /* Release the acquired table */ acpi_tb_release_table(table, table_length, table_flags); return (is_identical); }
void acpi_tb_invalidate_table(struct acpi_table_desc *table_desc) { ACPI_FUNCTION_TRACE(tb_invalidate_table); /* Table must be validated */ if (!table_desc->pointer) { return_VOID; } acpi_tb_release_table(table_desc->pointer, table_desc->length, table_desc->flags); table_desc->pointer = NULL; return_VOID; }