diff options
author | Lv Zheng <lv.zheng@intel.com> | 2015-04-12 23:48:46 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2015-04-14 08:51:51 -0400 |
commit | cc2080b0e5a7c6c33ef5e9ffccbc2b8f6f861393 (patch) | |
tree | fe53c9ea282188585ed8f15170c108a4d1536da8 | |
parent | 6d3fd3cc33d50e4c0d0c0bd172de02caaec3127c (diff) |
ACPICA: Utilities: Cleanup to convert physical address printing formats.
ACPICA commit 7f06739db43a85083a70371c14141008f20b2198
For physical addresses, since the address may exceed 32-bit address range
after calculation, we should use %8.8X%8.8X (see ACPI_FORMAT_UINT64()) to
convert the %p formats.
This is a preparation to switch acpi_physical_address to 64-bit on 32-bit
kernel builds.
Link: https://github.com/acpica/acpica/commit/7f06739d
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/acpi/acpica/exfldio.c | 10 | ||||
-rw-r--r-- | drivers/acpi/acpica/hwvalid.c | 16 | ||||
-rw-r--r-- | drivers/acpi/acpica/nsdump.c | 7 | ||||
-rw-r--r-- | drivers/acpi/acpica/tbinstal.c | 15 | ||||
-rw-r--r-- | drivers/acpi/acpica/utaddress.c | 34 |
5 files changed, 39 insertions, 43 deletions
diff --git a/drivers/acpi/acpica/exfldio.c b/drivers/acpi/acpica/exfldio.c index 49479927e7f7..725a3746a2df 100644 --- a/drivers/acpi/acpica/exfldio.c +++ b/drivers/acpi/acpica/exfldio.c | |||
@@ -263,17 +263,15 @@ acpi_ex_access_region(union acpi_operand_object *obj_desc, | |||
263 | } | 263 | } |
264 | 264 | ||
265 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_BFIELD, | 265 | ACPI_DEBUG_PRINT_RAW((ACPI_DB_BFIELD, |
266 | " Region [%s:%X], Width %X, ByteBase %X, Offset %X at %p\n", | 266 | " Region [%s:%X], Width %X, ByteBase %X, Offset %X at %8.8X%8.8X\n", |
267 | acpi_ut_get_region_name(rgn_desc->region. | 267 | acpi_ut_get_region_name(rgn_desc->region. |
268 | space_id), | 268 | space_id), |
269 | rgn_desc->region.space_id, | 269 | rgn_desc->region.space_id, |
270 | obj_desc->common_field.access_byte_width, | 270 | obj_desc->common_field.access_byte_width, |
271 | obj_desc->common_field.base_byte_offset, | 271 | obj_desc->common_field.base_byte_offset, |
272 | field_datum_byte_offset, ACPI_CAST_PTR(void, | 272 | field_datum_byte_offset, |
273 | (rgn_desc-> | 273 | ACPI_FORMAT_UINT64(rgn_desc->region.address + |
274 | region. | 274 | region_offset))); |
275 | address + | ||
276 | region_offset)))); | ||
277 | 275 | ||
278 | /* Invoke the appropriate address_space/op_region handler */ | 276 | /* Invoke the appropriate address_space/op_region handler */ |
279 | 277 | ||
diff --git a/drivers/acpi/acpica/hwvalid.c b/drivers/acpi/acpica/hwvalid.c index 2bd33fe56cb3..29033d71417b 100644 --- a/drivers/acpi/acpica/hwvalid.c +++ b/drivers/acpi/acpica/hwvalid.c | |||
@@ -142,17 +142,17 @@ acpi_hw_validate_io_request(acpi_io_address address, u32 bit_width) | |||
142 | byte_width = ACPI_DIV_8(bit_width); | 142 | byte_width = ACPI_DIV_8(bit_width); |
143 | last_address = address + byte_width - 1; | 143 | last_address = address + byte_width - 1; |
144 | 144 | ||
145 | ACPI_DEBUG_PRINT((ACPI_DB_IO, "Address %p LastAddress %p Length %X", | 145 | ACPI_DEBUG_PRINT((ACPI_DB_IO, |
146 | ACPI_CAST_PTR(void, address), ACPI_CAST_PTR(void, | 146 | "Address %8.8X%8.8X LastAddress %8.8X%8.8X Length %X", |
147 | last_address), | 147 | ACPI_FORMAT_UINT64(address), |
148 | byte_width)); | 148 | ACPI_FORMAT_UINT64(last_address), byte_width)); |
149 | 149 | ||
150 | /* Maximum 16-bit address in I/O space */ | 150 | /* Maximum 16-bit address in I/O space */ |
151 | 151 | ||
152 | if (last_address > ACPI_UINT16_MAX) { | 152 | if (last_address > ACPI_UINT16_MAX) { |
153 | ACPI_ERROR((AE_INFO, | 153 | ACPI_ERROR((AE_INFO, |
154 | "Illegal I/O port address/length above 64K: %p/0x%X", | 154 | "Illegal I/O port address/length above 64K: %8.8X%8.8X/0x%X", |
155 | ACPI_CAST_PTR(void, address), byte_width)); | 155 | ACPI_FORMAT_UINT64(address), byte_width)); |
156 | return_ACPI_STATUS(AE_LIMIT); | 156 | return_ACPI_STATUS(AE_LIMIT); |
157 | } | 157 | } |
158 | 158 | ||
@@ -181,8 +181,8 @@ acpi_hw_validate_io_request(acpi_io_address address, u32 bit_width) | |||
181 | 181 | ||
182 | if (acpi_gbl_osi_data >= port_info->osi_dependency) { | 182 | if (acpi_gbl_osi_data >= port_info->osi_dependency) { |
183 | ACPI_DEBUG_PRINT((ACPI_DB_IO, | 183 | ACPI_DEBUG_PRINT((ACPI_DB_IO, |
184 | "Denied AML access to port 0x%p/%X (%s 0x%.4X-0x%.4X)", | 184 | "Denied AML access to port 0x%8.8X%8.8X/%X (%s 0x%.4X-0x%.4X)", |
185 | ACPI_CAST_PTR(void, address), | 185 | ACPI_FORMAT_UINT64(address), |
186 | byte_width, port_info->name, | 186 | byte_width, port_info->name, |
187 | port_info->start, | 187 | port_info->start, |
188 | port_info->end)); | 188 | port_info->end)); |
diff --git a/drivers/acpi/acpica/nsdump.c b/drivers/acpi/acpica/nsdump.c index 80f097eb7381..e76d8fda24a5 100644 --- a/drivers/acpi/acpica/nsdump.c +++ b/drivers/acpi/acpica/nsdump.c | |||
@@ -271,12 +271,11 @@ acpi_ns_dump_one_object(acpi_handle obj_handle, | |||
271 | switch (type) { | 271 | switch (type) { |
272 | case ACPI_TYPE_PROCESSOR: | 272 | case ACPI_TYPE_PROCESSOR: |
273 | 273 | ||
274 | acpi_os_printf("ID %02X Len %02X Addr %p\n", | 274 | acpi_os_printf("ID %02X Len %02X Addr %8.8X%8.8X\n", |
275 | obj_desc->processor.proc_id, | 275 | obj_desc->processor.proc_id, |
276 | obj_desc->processor.length, | 276 | obj_desc->processor.length, |
277 | ACPI_CAST_PTR(void, | 277 | ACPI_FORMAT_UINT64(obj_desc->processor. |
278 | obj_desc->processor. | 278 | address)); |
279 | address)); | ||
280 | break; | 279 | break; |
281 | 280 | ||
282 | case ACPI_TYPE_DEVICE: | 281 | case ACPI_TYPE_DEVICE: |
diff --git a/drivers/acpi/acpica/tbinstal.c b/drivers/acpi/acpica/tbinstal.c index 201332a63140..65da4c0f13e6 100644 --- a/drivers/acpi/acpica/tbinstal.c +++ b/drivers/acpi/acpica/tbinstal.c | |||
@@ -187,8 +187,9 @@ acpi_tb_install_fixed_table(acpi_physical_address address, | |||
187 | status = acpi_tb_acquire_temp_table(&new_table_desc, address, | 187 | status = acpi_tb_acquire_temp_table(&new_table_desc, address, |
188 | ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL); | 188 | ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL); |
189 | if (ACPI_FAILURE(status)) { | 189 | if (ACPI_FAILURE(status)) { |
190 | ACPI_ERROR((AE_INFO, "Could not acquire table length at %p", | 190 | ACPI_ERROR((AE_INFO, |
191 | ACPI_PHYSADDR_TO_PTR(address))); | 191 | "Could not acquire table length at %8.8X%8.8X", |
192 | ACPI_FORMAT_UINT64(address))); | ||
192 | return_ACPI_STATUS(status); | 193 | return_ACPI_STATUS(status); |
193 | } | 194 | } |
194 | 195 | ||
@@ -246,8 +247,9 @@ acpi_tb_install_standard_table(acpi_physical_address address, | |||
246 | 247 | ||
247 | status = acpi_tb_acquire_temp_table(&new_table_desc, address, flags); | 248 | status = acpi_tb_acquire_temp_table(&new_table_desc, address, flags); |
248 | if (ACPI_FAILURE(status)) { | 249 | if (ACPI_FAILURE(status)) { |
249 | ACPI_ERROR((AE_INFO, "Could not acquire table length at %p", | 250 | ACPI_ERROR((AE_INFO, |
250 | ACPI_PHYSADDR_TO_PTR(address))); | 251 | "Could not acquire table length at %8.8X%8.8X", |
252 | ACPI_FORMAT_UINT64(address))); | ||
251 | return_ACPI_STATUS(status); | 253 | return_ACPI_STATUS(status); |
252 | } | 254 | } |
253 | 255 | ||
@@ -258,9 +260,10 @@ acpi_tb_install_standard_table(acpi_physical_address address, | |||
258 | if (!reload && | 260 | if (!reload && |
259 | acpi_gbl_disable_ssdt_table_install && | 261 | acpi_gbl_disable_ssdt_table_install && |
260 | ACPI_COMPARE_NAME(&new_table_desc.signature, ACPI_SIG_SSDT)) { | 262 | ACPI_COMPARE_NAME(&new_table_desc.signature, ACPI_SIG_SSDT)) { |
261 | ACPI_INFO((AE_INFO, "Ignoring installation of %4.4s at %p", | 263 | ACPI_INFO((AE_INFO, |
264 | "Ignoring installation of %4.4s at %8.8X%8.8X", | ||
262 | new_table_desc.signature.ascii, | 265 | new_table_desc.signature.ascii, |
263 | ACPI_PHYSADDR_TO_PTR(address))); | 266 | ACPI_FORMAT_UINT64(address))); |
264 | goto release_and_exit; | 267 | goto release_and_exit; |
265 | } | 268 | } |
266 | 269 | ||
diff --git a/drivers/acpi/acpica/utaddress.c b/drivers/acpi/acpica/utaddress.c index 1279f50da757..911ea8e7fe87 100644 --- a/drivers/acpi/acpica/utaddress.c +++ b/drivers/acpi/acpica/utaddress.c | |||
@@ -107,10 +107,10 @@ acpi_ut_add_address_range(acpi_adr_space_type space_id, | |||
107 | acpi_gbl_address_range_list[space_id] = range_info; | 107 | acpi_gbl_address_range_list[space_id] = range_info; |
108 | 108 | ||
109 | ACPI_DEBUG_PRINT((ACPI_DB_NAMES, | 109 | ACPI_DEBUG_PRINT((ACPI_DB_NAMES, |
110 | "\nAdded [%4.4s] address range: 0x%p-0x%p\n", | 110 | "\nAdded [%4.4s] address range: 0x%8.8X%8.8X-0x%8.8X%8.8X\n", |
111 | acpi_ut_get_node_name(range_info->region_node), | 111 | acpi_ut_get_node_name(range_info->region_node), |
112 | ACPI_CAST_PTR(void, address), | 112 | ACPI_FORMAT_UINT64(address), |
113 | ACPI_CAST_PTR(void, range_info->end_address))); | 113 | ACPI_FORMAT_UINT64(range_info->end_address))); |
114 | 114 | ||
115 | (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); | 115 | (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); |
116 | return_ACPI_STATUS(AE_OK); | 116 | return_ACPI_STATUS(AE_OK); |
@@ -160,15 +160,13 @@ acpi_ut_remove_address_range(acpi_adr_space_type space_id, | |||
160 | } | 160 | } |
161 | 161 | ||
162 | ACPI_DEBUG_PRINT((ACPI_DB_NAMES, | 162 | ACPI_DEBUG_PRINT((ACPI_DB_NAMES, |
163 | "\nRemoved [%4.4s] address range: 0x%p-0x%p\n", | 163 | "\nRemoved [%4.4s] address range: 0x%8.8X%8.8X-0x%8.8X%8.8X\n", |
164 | acpi_ut_get_node_name(range_info-> | 164 | acpi_ut_get_node_name(range_info-> |
165 | region_node), | 165 | region_node), |
166 | ACPI_CAST_PTR(void, | 166 | ACPI_FORMAT_UINT64(range_info-> |
167 | range_info-> | 167 | start_address), |
168 | start_address), | 168 | ACPI_FORMAT_UINT64(range_info-> |
169 | ACPI_CAST_PTR(void, | 169 | end_address))); |
170 | range_info-> | ||
171 | end_address))); | ||
172 | 170 | ||
173 | ACPI_FREE(range_info); | 171 | ACPI_FREE(range_info); |
174 | return_VOID; | 172 | return_VOID; |
@@ -245,16 +243,14 @@ acpi_ut_check_address_range(acpi_adr_space_type space_id, | |||
245 | region_node); | 243 | region_node); |
246 | 244 | ||
247 | ACPI_WARNING((AE_INFO, | 245 | ACPI_WARNING((AE_INFO, |
248 | "%s range 0x%p-0x%p conflicts with OpRegion 0x%p-0x%p (%s)", | 246 | "%s range 0x%8.8X%8.8X-0x%8.8X%8.8X conflicts with OpRegion 0x%8.8X%8.8X-0x%8.8X%8.8X (%s)", |
249 | acpi_ut_get_region_name(space_id), | 247 | acpi_ut_get_region_name(space_id), |
250 | ACPI_CAST_PTR(void, address), | 248 | ACPI_FORMAT_UINT64(address), |
251 | ACPI_CAST_PTR(void, end_address), | 249 | ACPI_FORMAT_UINT64(end_address), |
252 | ACPI_CAST_PTR(void, | 250 | ACPI_FORMAT_UINT64(range_info-> |
253 | range_info-> | 251 | start_address), |
254 | start_address), | 252 | ACPI_FORMAT_UINT64(range_info-> |
255 | ACPI_CAST_PTR(void, | 253 | end_address), |
256 | range_info-> | ||
257 | end_address), | ||
258 | pathname)); | 254 | pathname)); |
259 | ACPI_FREE(pathname); | 255 | ACPI_FREE(pathname); |
260 | } | 256 | } |