summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/utilities/utinit.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/utilities/utinit.c')
-rw-r--r--drivers/acpi/utilities/utinit.c72
1 files changed, 42 insertions, 30 deletions
diff --git a/drivers/acpi/utilities/utinit.c b/drivers/acpi/utilities/utinit.c
index ff76055..2d2c4a3 100644
--- a/drivers/acpi/utilities/utinit.c
+++ b/drivers/acpi/utilities/utinit.c
@@ -44,6 +44,7 @@
#include <acpi/acpi.h>
#include <acpi/acnamesp.h>
#include <acpi/acevents.h>
+#include <acpi/actables.h>
#define _COMPONENT ACPI_UTILITIES
ACPI_MODULE_NAME("utinit")
@@ -73,8 +74,8 @@ acpi_ut_fadt_register_error(char *register_name, u32 value, u8 offset)
{
ACPI_WARNING((AE_INFO,
- "Invalid FADT value %s=%X at offset %X FADT=%p",
- register_name, value, offset, acpi_gbl_FADT));
+ "Invalid FADT value %s=%X at offset %X in FADT=%p",
+ register_name, value, offset, &acpi_gbl_FADT));
}
/******************************************************************************
@@ -96,62 +97,70 @@ acpi_status acpi_ut_validate_fadt(void)
* Verify Fixed ACPI Description Table fields,
* but don't abort on any problems, just display error
*/
- if (acpi_gbl_FADT->pm1_evt_len < 4) {
+ if (acpi_gbl_FADT.pm1_event_length < 4) {
acpi_ut_fadt_register_error("PM1_EVT_LEN",
- (u32) acpi_gbl_FADT->pm1_evt_len,
- ACPI_FADT_OFFSET(pm1_evt_len));
+ (u32) acpi_gbl_FADT.
+ pm1_event_length,
+ ACPI_FADT_OFFSET(pm1_event_length));
}
- if (!acpi_gbl_FADT->pm1_cnt_len) {
+ if (!acpi_gbl_FADT.pm1_control_length) {
acpi_ut_fadt_register_error("PM1_CNT_LEN", 0,
- ACPI_FADT_OFFSET(pm1_cnt_len));
+ ACPI_FADT_OFFSET
+ (pm1_control_length));
}
- if (!acpi_gbl_FADT->xpm1a_evt_blk.address) {
+ if (!acpi_gbl_FADT.xpm1a_event_block.address) {
acpi_ut_fadt_register_error("X_PM1a_EVT_BLK", 0,
- ACPI_FADT_OFFSET(xpm1a_evt_blk.
+ ACPI_FADT_OFFSET(xpm1a_event_block.
address));
}
- if (!acpi_gbl_FADT->xpm1a_cnt_blk.address) {
+ if (!acpi_gbl_FADT.xpm1a_control_block.address) {
acpi_ut_fadt_register_error("X_PM1a_CNT_BLK", 0,
- ACPI_FADT_OFFSET(xpm1a_cnt_blk.
- address));
+ ACPI_FADT_OFFSET
+ (xpm1a_control_block.address));
}
- if (!acpi_gbl_FADT->xpm_tmr_blk.address) {
+ if (!acpi_gbl_FADT.xpm_timer_block.address) {
acpi_ut_fadt_register_error("X_PM_TMR_BLK", 0,
- ACPI_FADT_OFFSET(xpm_tmr_blk.
+ ACPI_FADT_OFFSET(xpm_timer_block.
address));
}
- if ((acpi_gbl_FADT->xpm2_cnt_blk.address &&
- !acpi_gbl_FADT->pm2_cnt_len)) {
+ if ((acpi_gbl_FADT.xpm2_control_block.address &&
+ !acpi_gbl_FADT.pm2_control_length)) {
acpi_ut_fadt_register_error("PM2_CNT_LEN",
- (u32) acpi_gbl_FADT->pm2_cnt_len,
- ACPI_FADT_OFFSET(pm2_cnt_len));
+ (u32) acpi_gbl_FADT.
+ pm2_control_length,
+ ACPI_FADT_OFFSET
+ (pm2_control_length));
}
- if (acpi_gbl_FADT->pm_tm_len < 4) {
+ if (acpi_gbl_FADT.pm_timer_length < 4) {
acpi_ut_fadt_register_error("PM_TM_LEN",
- (u32) acpi_gbl_FADT->pm_tm_len,
- ACPI_FADT_OFFSET(pm_tm_len));
+ (u32) acpi_gbl_FADT.pm_timer_length,
+ ACPI_FADT_OFFSET(pm_timer_length));
}
/* Length of GPE blocks must be a multiple of 2 */
- if (acpi_gbl_FADT->xgpe0_blk.address &&
- (acpi_gbl_FADT->gpe0_blk_len & 1)) {
+ if (acpi_gbl_FADT.xgpe0_block.address &&
+ (acpi_gbl_FADT.gpe0_block_length & 1)) {
acpi_ut_fadt_register_error("(x)GPE0_BLK_LEN",
- (u32) acpi_gbl_FADT->gpe0_blk_len,
- ACPI_FADT_OFFSET(gpe0_blk_len));
+ (u32) acpi_gbl_FADT.
+ gpe0_block_length,
+ ACPI_FADT_OFFSET
+ (gpe0_block_length));
}
- if (acpi_gbl_FADT->xgpe1_blk.address &&
- (acpi_gbl_FADT->gpe1_blk_len & 1)) {
+ if (acpi_gbl_FADT.xgpe1_block.address &&
+ (acpi_gbl_FADT.gpe1_block_length & 1)) {
acpi_ut_fadt_register_error("(x)GPE1_BLK_LEN",
- (u32) acpi_gbl_FADT->gpe1_blk_len,
- ACPI_FADT_OFFSET(gpe1_blk_len));
+ (u32) acpi_gbl_FADT.
+ gpe1_block_length,
+ ACPI_FADT_OFFSET
+ (gpe1_block_length));
}
return (AE_OK);
@@ -178,7 +187,6 @@ static void acpi_ut_terminate(void)
ACPI_FUNCTION_TRACE(ut_terminate);
- /* Free global tables, etc. */
/* Free global GPE blocks and related info structures */
gpe_xrupt_info = acpi_gbl_gpe_xrupt_list_head;
@@ -239,6 +247,10 @@ void acpi_ut_subsystem_shutdown(void)
acpi_ns_terminate();
+ /* Delete the ACPI tables */
+
+ acpi_tb_terminate();
+
/* Close the globals */
acpi_ut_terminate();
OpenPOWER on IntegriCloud