Loading drivers/acpi/acpica/tbfadt.c +20 −13 Original line number Diff line number Diff line Loading @@ -132,7 +132,8 @@ static struct acpi_fadt_info fadt_info_table[] = { ACPI_FADT_SEPARATE_LENGTH} }; #define ACPI_FADT_INFO_ENTRIES (sizeof (fadt_info_table) / sizeof (struct acpi_fadt_info)) #define ACPI_FADT_INFO_ENTRIES \ (sizeof (fadt_info_table) / sizeof (struct acpi_fadt_info)) /* Table used to split Event Blocks into separate status/enable registers */ Loading Loading @@ -161,7 +162,8 @@ static struct acpi_fadt_pm_info fadt_pm_info_table[] = { 1} }; #define ACPI_FADT_PM_INFO_ENTRIES (sizeof (fadt_pm_info_table) / sizeof (struct acpi_fadt_pm_info)) #define ACPI_FADT_PM_INFO_ENTRIES \ (sizeof (fadt_pm_info_table) / sizeof (struct acpi_fadt_pm_info)) /******************************************************************************* * Loading Loading @@ -416,7 +418,7 @@ static void acpi_tb_convert_fadt(void) } } /****************************************************************************** /******************************************************************************* * * FUNCTION: acpi_tb_validate_fadt * Loading Loading @@ -503,7 +505,8 @@ static void acpi_tb_validate_fadt(void) */ if (!address64->address || !length) { ACPI_ERROR((AE_INFO, "Required field %s has zero address and/or length: %8.8X%8.8X/%X", "Required field %s has zero address and/or length:" " %8.8X%8.8X/%X", name, ACPI_FORMAT_UINT64(address64-> address), Loading @@ -512,12 +515,14 @@ static void acpi_tb_validate_fadt(void) } else if (fadt_info_table[i].type & ACPI_FADT_SEPARATE_LENGTH) { /* * Field is optional (PM2Control, GPE0, GPE1) AND has its own * length field. If present, both the address and length must be valid. * length field. If present, both the address and length must * be valid. */ if ((address64->address && !length) || (!address64->address && length)) { if ((address64->address && !length) || (!address64->address && length)) { ACPI_WARNING((AE_INFO, "Optional field %s has zero address or length: %8.8X%8.8X/%X", "Optional field %s has zero address or length: " "%8.8X%8.8X/%X", name, ACPI_FORMAT_UINT64(address64-> address), Loading @@ -525,8 +530,10 @@ static void acpi_tb_validate_fadt(void) } } /* If both 32- and 64-bit addresses are valid (non-zero), they must match */ /* * If both 32- and 64-bit addresses are valid (non-zero), * they must match */ if (address64->address && *address32 && (address64->address != (u64) * address32)) { ACPI_ERROR((AE_INFO, Loading @@ -537,7 +544,7 @@ static void acpi_tb_validate_fadt(void) } } /****************************************************************************** /******************************************************************************* * * FUNCTION: acpi_tb_setup_fadt_registers * Loading Loading @@ -596,8 +603,8 @@ static void acpi_tb_setup_fadt_registers(void) * Each register is defined to be (event block length / 2). Extra divide * by 8 converts bits to bytes. */ pm1_register_byte_width = (u8)ACPI_DIV_16(acpi_gbl_FADT.xpm1a_event_block.bit_width); pm1_register_byte_width = (u8) ACPI_DIV_16(acpi_gbl_FADT.xpm1a_event_block.bit_width); /* * Calculate separate GAS structs for the PM1x (A/B) Status and Enable Loading drivers/acpi/acpica/tbinstal.c +5 −4 Original line number Diff line number Diff line Loading @@ -273,8 +273,9 @@ acpi_status acpi_tb_resize_root_table_list(void) /* Increase the Table Array size */ tables = ACPI_ALLOCATE_ZEROED(((acpi_size) acpi_gbl_root_table_list. size + ACPI_ROOT_TABLE_SIZE_INCREMENT) * sizeof(struct acpi_table_desc)); size + ACPI_ROOT_TABLE_SIZE_INCREMENT) * sizeof(struct acpi_table_desc)); if (!tables) { ACPI_ERROR((AE_INFO, "Could not allocate new root table array")); Loading Loading @@ -561,8 +562,8 @@ u8 acpi_tb_is_table_loaded(u32 table_index) (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES); if (table_index < acpi_gbl_root_table_list.count) { is_loaded = (u8) (acpi_gbl_root_table_list.tables[table_index]. flags & ACPI_TABLE_IS_LOADED); (acpi_gbl_root_table_list.tables[table_index].flags & ACPI_TABLE_IS_LOADED); } (void)acpi_ut_release_mutex(ACPI_MTX_TABLES); Loading drivers/acpi/acpica/tbutils.c +9 −8 Original line number Diff line number Diff line Loading @@ -413,7 +413,8 @@ acpi_tb_get_root_table_entry(u8 *table_entry, u32 table_entry_size) } else { /* * 32-bit platform, XSDT: Truncate 64-bit to 32-bit and return * 64-bit platform, XSDT: Move (unaligned) 64-bit to local, return 64-bit * 64-bit platform, XSDT: Move (unaligned) 64-bit to local, * return 64-bit */ ACPI_MOVE_64_TO_64(&address64, table_entry); Loading @@ -423,7 +424,8 @@ acpi_tb_get_root_table_entry(u8 *table_entry, u32 table_entry_size) /* Will truncate 64-bit address to 32 bits, issue warning */ ACPI_WARNING((AE_INFO, "64-bit Physical Address in XSDT is too large (%8.8X%8.8X), truncating", "64-bit Physical Address in XSDT is too large (%8.8X%8.8X)," " truncating", ACPI_FORMAT_UINT64(address64))); } #endif Loading Loading @@ -546,13 +548,12 @@ acpi_tb_parse_root_table(acpi_physical_address rsdp_address) /* Calculate the number of tables described in the root table */ table_count = (u32) ((table->length - sizeof(struct acpi_table_header)) / table_entry_size); table_count = (u32)((table->length - sizeof(struct acpi_table_header)) / table_entry_size); /* * First two entries in the table array are reserved for the DSDT and FACS, * which are not actually present in the RSDT/XSDT - they come from the FADT * First two entries in the table array are reserved for the DSDT * and FACS, which are not actually present in the RSDT/XSDT - they * come from the FADT */ table_entry = ACPI_CAST_PTR(u8, table) + sizeof(struct acpi_table_header); Loading drivers/acpi/acpica/tbxface.c +16 −21 Original line number Diff line number Diff line Loading @@ -246,7 +246,7 @@ acpi_status acpi_load_table(struct acpi_table_header *table_ptr) ACPI_EXPORT_SYMBOL(acpi_load_table) /****************************************************************************** /******************************************************************************* * * FUNCTION: acpi_get_table_header * Loading @@ -261,7 +261,7 @@ ACPI_EXPORT_SYMBOL(acpi_load_table) * NOTE: Caller is responsible in unmapping the header with * acpi_os_unmap_memory * *****************************************************************************/ ******************************************************************************/ acpi_status acpi_get_table_header(char *signature, u32 instance, struct acpi_table_header *out_table_header) Loading @@ -276,9 +276,8 @@ acpi_get_table_header(char *signature, return (AE_BAD_PARAMETER); } /* * Walk the root table list */ /* Walk the root table list */ for (i = 0, j = 0; i < acpi_gbl_root_table_list.count; i++) { if (!ACPI_COMPARE_NAME (&(acpi_gbl_root_table_list.tables[i].signature), Loading @@ -291,8 +290,8 @@ acpi_get_table_header(char *signature, } if (!acpi_gbl_root_table_list.tables[i].pointer) { if ((acpi_gbl_root_table_list.tables[i]. flags & ACPI_TABLE_ORIGIN_MASK) == if ((acpi_gbl_root_table_list.tables[i].flags & ACPI_TABLE_ORIGIN_MASK) == ACPI_TABLE_ORIGIN_MAPPED) { header = acpi_os_map_memory(acpi_gbl_root_table_list. Loading Loading @@ -323,7 +322,7 @@ acpi_get_table_header(char *signature, ACPI_EXPORT_SYMBOL(acpi_get_table_header) /****************************************************************************** /******************************************************************************* * * FUNCTION: acpi_unload_table_id * Loading Loading @@ -374,7 +373,7 @@ ACPI_EXPORT_SYMBOL(acpi_unload_table_id) * * DESCRIPTION: Finds and verifies an ACPI table. * *****************************************************************************/ ******************************************************************************/ acpi_status acpi_get_table(char *signature, u32 instance, struct acpi_table_header **out_table) Loading @@ -389,9 +388,8 @@ acpi_get_table(char *signature, return (AE_BAD_PARAMETER); } /* * Walk the root table list */ /* Walk the root table list */ for (i = 0, j = 0; i < acpi_gbl_root_table_list.count; i++) { if (!ACPI_COMPARE_NAME (&(acpi_gbl_root_table_list.tables[i].signature), Loading Loading @@ -526,17 +524,15 @@ static acpi_status acpi_tb_load_namespace(void) (void)acpi_ut_release_mutex(ACPI_MTX_TABLES); /* * Load and parse tables. */ /* Load and parse tables */ status = acpi_ns_load_table(ACPI_TABLE_INDEX_DSDT, acpi_gbl_root_node); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } /* * Load any SSDT or PSDT tables. Note: Loop leaves tables locked */ /* Load any SSDT or PSDT tables. Note: Loop leaves tables locked */ (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES); for (i = 0; i < acpi_gbl_root_table_list.count; ++i) { if ((!ACPI_COMPARE_NAME Loading Loading @@ -589,9 +585,8 @@ acpi_status acpi_load_tables(void) ACPI_FUNCTION_TRACE(acpi_load_tables); /* * Load the namespace from the tables */ /* Load the namespace from the tables */ status = acpi_tb_load_namespace(); if (ACPI_FAILURE(status)) { ACPI_EXCEPTION((AE_INFO, status, Loading drivers/acpi/acpica/tbxfroot.c +2 −2 Original line number Diff line number Diff line Loading @@ -75,8 +75,8 @@ static acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp *rsdp) * Note: Sometimes there exists more than one RSDP in memory; the valid * RSDP has a valid checksum, all others have an invalid checksum. */ if (ACPI_STRNCMP((char *)rsdp, ACPI_SIG_RSDP, sizeof(ACPI_SIG_RSDP) - 1) != 0) { if (ACPI_STRNCMP((char *)rsdp, ACPI_SIG_RSDP, sizeof(ACPI_SIG_RSDP) - 1) != 0) { /* Nope, BAD Signature */ Loading Loading
drivers/acpi/acpica/tbfadt.c +20 −13 Original line number Diff line number Diff line Loading @@ -132,7 +132,8 @@ static struct acpi_fadt_info fadt_info_table[] = { ACPI_FADT_SEPARATE_LENGTH} }; #define ACPI_FADT_INFO_ENTRIES (sizeof (fadt_info_table) / sizeof (struct acpi_fadt_info)) #define ACPI_FADT_INFO_ENTRIES \ (sizeof (fadt_info_table) / sizeof (struct acpi_fadt_info)) /* Table used to split Event Blocks into separate status/enable registers */ Loading Loading @@ -161,7 +162,8 @@ static struct acpi_fadt_pm_info fadt_pm_info_table[] = { 1} }; #define ACPI_FADT_PM_INFO_ENTRIES (sizeof (fadt_pm_info_table) / sizeof (struct acpi_fadt_pm_info)) #define ACPI_FADT_PM_INFO_ENTRIES \ (sizeof (fadt_pm_info_table) / sizeof (struct acpi_fadt_pm_info)) /******************************************************************************* * Loading Loading @@ -416,7 +418,7 @@ static void acpi_tb_convert_fadt(void) } } /****************************************************************************** /******************************************************************************* * * FUNCTION: acpi_tb_validate_fadt * Loading Loading @@ -503,7 +505,8 @@ static void acpi_tb_validate_fadt(void) */ if (!address64->address || !length) { ACPI_ERROR((AE_INFO, "Required field %s has zero address and/or length: %8.8X%8.8X/%X", "Required field %s has zero address and/or length:" " %8.8X%8.8X/%X", name, ACPI_FORMAT_UINT64(address64-> address), Loading @@ -512,12 +515,14 @@ static void acpi_tb_validate_fadt(void) } else if (fadt_info_table[i].type & ACPI_FADT_SEPARATE_LENGTH) { /* * Field is optional (PM2Control, GPE0, GPE1) AND has its own * length field. If present, both the address and length must be valid. * length field. If present, both the address and length must * be valid. */ if ((address64->address && !length) || (!address64->address && length)) { if ((address64->address && !length) || (!address64->address && length)) { ACPI_WARNING((AE_INFO, "Optional field %s has zero address or length: %8.8X%8.8X/%X", "Optional field %s has zero address or length: " "%8.8X%8.8X/%X", name, ACPI_FORMAT_UINT64(address64-> address), Loading @@ -525,8 +530,10 @@ static void acpi_tb_validate_fadt(void) } } /* If both 32- and 64-bit addresses are valid (non-zero), they must match */ /* * If both 32- and 64-bit addresses are valid (non-zero), * they must match */ if (address64->address && *address32 && (address64->address != (u64) * address32)) { ACPI_ERROR((AE_INFO, Loading @@ -537,7 +544,7 @@ static void acpi_tb_validate_fadt(void) } } /****************************************************************************** /******************************************************************************* * * FUNCTION: acpi_tb_setup_fadt_registers * Loading Loading @@ -596,8 +603,8 @@ static void acpi_tb_setup_fadt_registers(void) * Each register is defined to be (event block length / 2). Extra divide * by 8 converts bits to bytes. */ pm1_register_byte_width = (u8)ACPI_DIV_16(acpi_gbl_FADT.xpm1a_event_block.bit_width); pm1_register_byte_width = (u8) ACPI_DIV_16(acpi_gbl_FADT.xpm1a_event_block.bit_width); /* * Calculate separate GAS structs for the PM1x (A/B) Status and Enable Loading
drivers/acpi/acpica/tbinstal.c +5 −4 Original line number Diff line number Diff line Loading @@ -273,8 +273,9 @@ acpi_status acpi_tb_resize_root_table_list(void) /* Increase the Table Array size */ tables = ACPI_ALLOCATE_ZEROED(((acpi_size) acpi_gbl_root_table_list. size + ACPI_ROOT_TABLE_SIZE_INCREMENT) * sizeof(struct acpi_table_desc)); size + ACPI_ROOT_TABLE_SIZE_INCREMENT) * sizeof(struct acpi_table_desc)); if (!tables) { ACPI_ERROR((AE_INFO, "Could not allocate new root table array")); Loading Loading @@ -561,8 +562,8 @@ u8 acpi_tb_is_table_loaded(u32 table_index) (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES); if (table_index < acpi_gbl_root_table_list.count) { is_loaded = (u8) (acpi_gbl_root_table_list.tables[table_index]. flags & ACPI_TABLE_IS_LOADED); (acpi_gbl_root_table_list.tables[table_index].flags & ACPI_TABLE_IS_LOADED); } (void)acpi_ut_release_mutex(ACPI_MTX_TABLES); Loading
drivers/acpi/acpica/tbutils.c +9 −8 Original line number Diff line number Diff line Loading @@ -413,7 +413,8 @@ acpi_tb_get_root_table_entry(u8 *table_entry, u32 table_entry_size) } else { /* * 32-bit platform, XSDT: Truncate 64-bit to 32-bit and return * 64-bit platform, XSDT: Move (unaligned) 64-bit to local, return 64-bit * 64-bit platform, XSDT: Move (unaligned) 64-bit to local, * return 64-bit */ ACPI_MOVE_64_TO_64(&address64, table_entry); Loading @@ -423,7 +424,8 @@ acpi_tb_get_root_table_entry(u8 *table_entry, u32 table_entry_size) /* Will truncate 64-bit address to 32 bits, issue warning */ ACPI_WARNING((AE_INFO, "64-bit Physical Address in XSDT is too large (%8.8X%8.8X), truncating", "64-bit Physical Address in XSDT is too large (%8.8X%8.8X)," " truncating", ACPI_FORMAT_UINT64(address64))); } #endif Loading Loading @@ -546,13 +548,12 @@ acpi_tb_parse_root_table(acpi_physical_address rsdp_address) /* Calculate the number of tables described in the root table */ table_count = (u32) ((table->length - sizeof(struct acpi_table_header)) / table_entry_size); table_count = (u32)((table->length - sizeof(struct acpi_table_header)) / table_entry_size); /* * First two entries in the table array are reserved for the DSDT and FACS, * which are not actually present in the RSDT/XSDT - they come from the FADT * First two entries in the table array are reserved for the DSDT * and FACS, which are not actually present in the RSDT/XSDT - they * come from the FADT */ table_entry = ACPI_CAST_PTR(u8, table) + sizeof(struct acpi_table_header); Loading
drivers/acpi/acpica/tbxface.c +16 −21 Original line number Diff line number Diff line Loading @@ -246,7 +246,7 @@ acpi_status acpi_load_table(struct acpi_table_header *table_ptr) ACPI_EXPORT_SYMBOL(acpi_load_table) /****************************************************************************** /******************************************************************************* * * FUNCTION: acpi_get_table_header * Loading @@ -261,7 +261,7 @@ ACPI_EXPORT_SYMBOL(acpi_load_table) * NOTE: Caller is responsible in unmapping the header with * acpi_os_unmap_memory * *****************************************************************************/ ******************************************************************************/ acpi_status acpi_get_table_header(char *signature, u32 instance, struct acpi_table_header *out_table_header) Loading @@ -276,9 +276,8 @@ acpi_get_table_header(char *signature, return (AE_BAD_PARAMETER); } /* * Walk the root table list */ /* Walk the root table list */ for (i = 0, j = 0; i < acpi_gbl_root_table_list.count; i++) { if (!ACPI_COMPARE_NAME (&(acpi_gbl_root_table_list.tables[i].signature), Loading @@ -291,8 +290,8 @@ acpi_get_table_header(char *signature, } if (!acpi_gbl_root_table_list.tables[i].pointer) { if ((acpi_gbl_root_table_list.tables[i]. flags & ACPI_TABLE_ORIGIN_MASK) == if ((acpi_gbl_root_table_list.tables[i].flags & ACPI_TABLE_ORIGIN_MASK) == ACPI_TABLE_ORIGIN_MAPPED) { header = acpi_os_map_memory(acpi_gbl_root_table_list. Loading Loading @@ -323,7 +322,7 @@ acpi_get_table_header(char *signature, ACPI_EXPORT_SYMBOL(acpi_get_table_header) /****************************************************************************** /******************************************************************************* * * FUNCTION: acpi_unload_table_id * Loading Loading @@ -374,7 +373,7 @@ ACPI_EXPORT_SYMBOL(acpi_unload_table_id) * * DESCRIPTION: Finds and verifies an ACPI table. * *****************************************************************************/ ******************************************************************************/ acpi_status acpi_get_table(char *signature, u32 instance, struct acpi_table_header **out_table) Loading @@ -389,9 +388,8 @@ acpi_get_table(char *signature, return (AE_BAD_PARAMETER); } /* * Walk the root table list */ /* Walk the root table list */ for (i = 0, j = 0; i < acpi_gbl_root_table_list.count; i++) { if (!ACPI_COMPARE_NAME (&(acpi_gbl_root_table_list.tables[i].signature), Loading Loading @@ -526,17 +524,15 @@ static acpi_status acpi_tb_load_namespace(void) (void)acpi_ut_release_mutex(ACPI_MTX_TABLES); /* * Load and parse tables. */ /* Load and parse tables */ status = acpi_ns_load_table(ACPI_TABLE_INDEX_DSDT, acpi_gbl_root_node); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } /* * Load any SSDT or PSDT tables. Note: Loop leaves tables locked */ /* Load any SSDT or PSDT tables. Note: Loop leaves tables locked */ (void)acpi_ut_acquire_mutex(ACPI_MTX_TABLES); for (i = 0; i < acpi_gbl_root_table_list.count; ++i) { if ((!ACPI_COMPARE_NAME Loading Loading @@ -589,9 +585,8 @@ acpi_status acpi_load_tables(void) ACPI_FUNCTION_TRACE(acpi_load_tables); /* * Load the namespace from the tables */ /* Load the namespace from the tables */ status = acpi_tb_load_namespace(); if (ACPI_FAILURE(status)) { ACPI_EXCEPTION((AE_INFO, status, Loading
drivers/acpi/acpica/tbxfroot.c +2 −2 Original line number Diff line number Diff line Loading @@ -75,8 +75,8 @@ static acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp *rsdp) * Note: Sometimes there exists more than one RSDP in memory; the valid * RSDP has a valid checksum, all others have an invalid checksum. */ if (ACPI_STRNCMP((char *)rsdp, ACPI_SIG_RSDP, sizeof(ACPI_SIG_RSDP) - 1) != 0) { if (ACPI_STRNCMP((char *)rsdp, ACPI_SIG_RSDP, sizeof(ACPI_SIG_RSDP) - 1) != 0) { /* Nope, BAD Signature */ Loading