aboutsummaryrefslogtreecommitdiffstats
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 ff76055eb7d6..2d2c4a3aeaae 100644
--- a/drivers/acpi/utilities/utinit.c
+++ b/drivers/acpi/utilities/utinit.c
@@ -44,6 +44,7 @@
44#include <acpi/acpi.h> 44#include <acpi/acpi.h>
45#include <acpi/acnamesp.h> 45#include <acpi/acnamesp.h>
46#include <acpi/acevents.h> 46#include <acpi/acevents.h>
47#include <acpi/actables.h>
47 48
48#define _COMPONENT ACPI_UTILITIES 49#define _COMPONENT ACPI_UTILITIES
49ACPI_MODULE_NAME("utinit") 50ACPI_MODULE_NAME("utinit")
@@ -73,8 +74,8 @@ acpi_ut_fadt_register_error(char *register_name, u32 value, u8 offset)
73{ 74{
74 75
75 ACPI_WARNING((AE_INFO, 76 ACPI_WARNING((AE_INFO,
76 "Invalid FADT value %s=%X at offset %X FADT=%p", 77 "Invalid FADT value %s=%X at offset %X in FADT=%p",
77 register_name, value, offset, acpi_gbl_FADT)); 78 register_name, value, offset, &acpi_gbl_FADT));
78} 79}
79 80
80/****************************************************************************** 81/******************************************************************************
@@ -96,62 +97,70 @@ acpi_status acpi_ut_validate_fadt(void)
96 * Verify Fixed ACPI Description Table fields, 97 * Verify Fixed ACPI Description Table fields,
97 * but don't abort on any problems, just display error 98 * but don't abort on any problems, just display error
98 */ 99 */
99 if (acpi_gbl_FADT->pm1_evt_len < 4) { 100 if (acpi_gbl_FADT.pm1_event_length < 4) {
100 acpi_ut_fadt_register_error("PM1_EVT_LEN", 101 acpi_ut_fadt_register_error("PM1_EVT_LEN",
101 (u32) acpi_gbl_FADT->pm1_evt_len, 102 (u32) acpi_gbl_FADT.
102 ACPI_FADT_OFFSET(pm1_evt_len)); 103 pm1_event_length,
104 ACPI_FADT_OFFSET(pm1_event_length));
103 } 105 }
104 106
105 if (!acpi_gbl_FADT->pm1_cnt_len) { 107 if (!acpi_gbl_FADT.pm1_control_length) {
106 acpi_ut_fadt_register_error("PM1_CNT_LEN", 0, 108 acpi_ut_fadt_register_error("PM1_CNT_LEN", 0,
107 ACPI_FADT_OFFSET(pm1_cnt_len)); 109 ACPI_FADT_OFFSET
110 (pm1_control_length));
108 } 111 }
109 112
110 if (!acpi_gbl_FADT->xpm1a_evt_blk.address) { 113 if (!acpi_gbl_FADT.xpm1a_event_block.address) {
111 acpi_ut_fadt_register_error("X_PM1a_EVT_BLK", 0, 114 acpi_ut_fadt_register_error("X_PM1a_EVT_BLK", 0,
112 ACPI_FADT_OFFSET(xpm1a_evt_blk. 115 ACPI_FADT_OFFSET(xpm1a_event_block.
113 address)); 116 address));
114 } 117 }
115 118
116 if (!acpi_gbl_FADT->xpm1a_cnt_blk.address) { 119 if (!acpi_gbl_FADT.xpm1a_control_block.address) {
117 acpi_ut_fadt_register_error("X_PM1a_CNT_BLK", 0, 120 acpi_ut_fadt_register_error("X_PM1a_CNT_BLK", 0,
118 ACPI_FADT_OFFSET(xpm1a_cnt_blk. 121 ACPI_FADT_OFFSET
119 address)); 122 (xpm1a_control_block.address));
120 } 123 }
121 124
122 if (!acpi_gbl_FADT->xpm_tmr_blk.address) { 125 if (!acpi_gbl_FADT.xpm_timer_block.address) {
123 acpi_ut_fadt_register_error("X_PM_TMR_BLK", 0, 126 acpi_ut_fadt_register_error("X_PM_TMR_BLK", 0,
124 ACPI_FADT_OFFSET(xpm_tmr_blk. 127 ACPI_FADT_OFFSET(xpm_timer_block.
125 address)); 128 address));
126 } 129 }
127 130
128 if ((acpi_gbl_FADT->xpm2_cnt_blk.address && 131 if ((acpi_gbl_FADT.xpm2_control_block.address &&
129 !acpi_gbl_FADT->pm2_cnt_len)) { 132 !acpi_gbl_FADT.pm2_control_length)) {
130 acpi_ut_fadt_register_error("PM2_CNT_LEN", 133 acpi_ut_fadt_register_error("PM2_CNT_LEN",
131 (u32) acpi_gbl_FADT->pm2_cnt_len, 134 (u32) acpi_gbl_FADT.
132 ACPI_FADT_OFFSET(pm2_cnt_len)); 135 pm2_control_length,
136 ACPI_FADT_OFFSET
137 (pm2_control_length));
133 } 138 }
134 139
135 if (acpi_gbl_FADT->pm_tm_len < 4) { 140 if (acpi_gbl_FADT.pm_timer_length < 4) {
136 acpi_ut_fadt_register_error("PM_TM_LEN", 141 acpi_ut_fadt_register_error("PM_TM_LEN",
137 (u32) acpi_gbl_FADT->pm_tm_len, 142 (u32) acpi_gbl_FADT.pm_timer_length,
138 ACPI_FADT_OFFSET(pm_tm_len)); 143 ACPI_FADT_OFFSET(pm_timer_length));
139 } 144 }
140 145
141 /* Length of GPE blocks must be a multiple of 2 */ 146 /* Length of GPE blocks must be a multiple of 2 */
142 147
143 if (acpi_gbl_FADT->xgpe0_blk.address && 148 if (acpi_gbl_FADT.xgpe0_block.address &&
144 (acpi_gbl_FADT->gpe0_blk_len & 1)) { 149 (acpi_gbl_FADT.gpe0_block_length & 1)) {
145 acpi_ut_fadt_register_error("(x)GPE0_BLK_LEN", 150 acpi_ut_fadt_register_error("(x)GPE0_BLK_LEN",
146 (u32) acpi_gbl_FADT->gpe0_blk_len, 151 (u32) acpi_gbl_FADT.
147 ACPI_FADT_OFFSET(gpe0_blk_len)); 152 gpe0_block_length,
153 ACPI_FADT_OFFSET
154 (gpe0_block_length));
148 } 155 }
149 156
150 if (acpi_gbl_FADT->xgpe1_blk.address && 157 if (acpi_gbl_FADT.xgpe1_block.address &&
151 (acpi_gbl_FADT->gpe1_blk_len & 1)) { 158 (acpi_gbl_FADT.gpe1_block_length & 1)) {
152 acpi_ut_fadt_register_error("(x)GPE1_BLK_LEN", 159 acpi_ut_fadt_register_error("(x)GPE1_BLK_LEN",
153 (u32) acpi_gbl_FADT->gpe1_blk_len, 160 (u32) acpi_gbl_FADT.
154 ACPI_FADT_OFFSET(gpe1_blk_len)); 161 gpe1_block_length,
162 ACPI_FADT_OFFSET
163 (gpe1_block_length));
155 } 164 }
156 165
157 return (AE_OK); 166 return (AE_OK);
@@ -178,7 +187,6 @@ static void acpi_ut_terminate(void)
178 187
179 ACPI_FUNCTION_TRACE(ut_terminate); 188 ACPI_FUNCTION_TRACE(ut_terminate);
180 189
181 /* Free global tables, etc. */
182 /* Free global GPE blocks and related info structures */ 190 /* Free global GPE blocks and related info structures */
183 191
184 gpe_xrupt_info = acpi_gbl_gpe_xrupt_list_head; 192 gpe_xrupt_info = acpi_gbl_gpe_xrupt_list_head;
@@ -239,6 +247,10 @@ void acpi_ut_subsystem_shutdown(void)
239 247
240 acpi_ns_terminate(); 248 acpi_ns_terminate();
241 249
250 /* Delete the ACPI tables */
251
252 acpi_tb_terminate();
253
242 /* Close the globals */ 254 /* Close the globals */
243 255
244 acpi_ut_terminate(); 256 acpi_ut_terminate();