Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ACPICA: Remove obsolete ACPI_INTEGER (acpi_integer) type

This type was introduced as the code was migrated from ACPI 1.0
(with 32-bit AML integers) to ACPI 2.0 (with 64-bit integers). It
is now obsolete and this change removes it from the ACPICA code
base, replaced by u64. The original typedef has been retained
for now for compatibility with existing device driver code.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>

authored by

Bob Moore and committed by
Len Brown
5df7e6cb 091f4d71

+169 -196
+1 -2
drivers/acpi/acpica/acevents.h
··· 139 139 acpi_status 140 140 acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, 141 141 u32 function, 142 - u32 region_offset, 143 - u32 bit_width, acpi_integer * value); 142 + u32 region_offset, u32 bit_width, u64 *value); 144 143 145 144 acpi_status 146 145 acpi_ev_attach_region(union acpi_operand_object *handler_obj,
+19 -23
drivers/acpi/acpica/acinterp.h
··· 129 129 130 130 acpi_status 131 131 acpi_ex_write_with_update_rule(union acpi_operand_object *obj_desc, 132 - acpi_integer mask, 133 - acpi_integer field_value, 134 - u32 field_datum_byte_offset); 132 + u64 mask, 133 + u64 field_value, u32 field_datum_byte_offset); 135 134 136 135 void 137 - acpi_ex_get_buffer_datum(acpi_integer * datum, 136 + acpi_ex_get_buffer_datum(u64 *datum, 138 137 void *buffer, 139 138 u32 buffer_length, 140 139 u32 byte_granularity, u32 buffer_offset); 141 140 142 141 void 143 - acpi_ex_set_buffer_datum(acpi_integer merged_datum, 142 + acpi_ex_set_buffer_datum(u64 merged_datum, 144 143 void *buffer, 145 144 u32 buffer_length, 146 145 u32 byte_granularity, u32 buffer_offset); ··· 167 168 168 169 acpi_status 169 170 acpi_ex_access_region(union acpi_operand_object *obj_desc, 170 - u32 field_datum_byte_offset, 171 - acpi_integer * value, u32 read_write); 171 + u32 field_datum_byte_offset, u64 *value, u32 read_write); 172 172 173 173 /* 174 174 * exmisc - misc support routines ··· 191 193 192 194 acpi_status 193 195 acpi_ex_do_logical_numeric_op(u16 opcode, 194 - acpi_integer integer0, 195 - acpi_integer integer1, u8 * logical_result); 196 + u64 integer0, u64 integer1, u8 *logical_result); 196 197 197 198 acpi_status 198 199 acpi_ex_do_logical_op(u16 opcode, 199 200 union acpi_operand_object *operand0, 200 - union acpi_operand_object *operand1, u8 * logical_result); 201 + union acpi_operand_object *operand1, u8 *logical_result); 201 202 202 - acpi_integer 203 - acpi_ex_do_math_op(u16 opcode, acpi_integer operand0, acpi_integer operand1); 203 + u64 acpi_ex_do_math_op(u16 opcode, u64 operand0, u64 operand1); 204 204 205 205 acpi_status acpi_ex_create_mutex(struct acpi_walk_state *walk_state); 206 206 ··· 274 278 acpi_ex_system_do_notify_op(union acpi_operand_object *value, 275 279 union acpi_operand_object *obj_desc); 276 280 277 - acpi_status acpi_ex_system_do_suspend(acpi_integer time); 281 + acpi_status acpi_ex_system_do_suspend(u64 time); 278 282 279 283 acpi_status acpi_ex_system_do_stall(u32 time); 280 284 ··· 457 461 458 462 void acpi_ex_release_global_lock(u32 rule); 459 463 460 - void acpi_ex_eisa_id_to_string(char *dest, acpi_integer compressed_id); 464 + void acpi_ex_eisa_id_to_string(char *dest, u64 compressed_id); 461 465 462 - void acpi_ex_integer_to_string(char *dest, acpi_integer value); 466 + void acpi_ex_integer_to_string(char *dest, u64 value); 463 467 464 468 /* 465 469 * exregion - default op_region handlers ··· 468 472 acpi_ex_system_memory_space_handler(u32 function, 469 473 acpi_physical_address address, 470 474 u32 bit_width, 471 - acpi_integer * value, 475 + u64 *value, 472 476 void *handler_context, 473 477 void *region_context); 474 478 ··· 476 480 acpi_ex_system_io_space_handler(u32 function, 477 481 acpi_physical_address address, 478 482 u32 bit_width, 479 - acpi_integer * value, 483 + u64 *value, 480 484 void *handler_context, void *region_context); 481 485 482 486 acpi_status 483 487 acpi_ex_pci_config_space_handler(u32 function, 484 488 acpi_physical_address address, 485 489 u32 bit_width, 486 - acpi_integer * value, 490 + u64 *value, 487 491 void *handler_context, void *region_context); 488 492 489 493 acpi_status 490 494 acpi_ex_cmos_space_handler(u32 function, 491 495 acpi_physical_address address, 492 496 u32 bit_width, 493 - acpi_integer * value, 497 + u64 *value, 494 498 void *handler_context, void *region_context); 495 499 496 500 acpi_status 497 501 acpi_ex_pci_bar_space_handler(u32 function, 498 502 acpi_physical_address address, 499 503 u32 bit_width, 500 - acpi_integer * value, 504 + u64 *value, 501 505 void *handler_context, void *region_context); 502 506 503 507 acpi_status 504 508 acpi_ex_embedded_controller_space_handler(u32 function, 505 509 acpi_physical_address address, 506 510 u32 bit_width, 507 - acpi_integer * value, 511 + u64 *value, 508 512 void *handler_context, 509 513 void *region_context); 510 514 ··· 512 516 acpi_ex_sm_bus_space_handler(u32 function, 513 517 acpi_physical_address address, 514 518 u32 bit_width, 515 - acpi_integer * value, 519 + u64 *value, 516 520 void *handler_context, void *region_context); 517 521 518 522 acpi_status 519 523 acpi_ex_data_table_space_handler(u32 function, 520 524 acpi_physical_address address, 521 525 u32 bit_width, 522 - acpi_integer * value, 526 + u64 *value, 523 527 void *handler_context, void *region_context); 524 528 525 529 #endif /* __INTERP_H__ */
+1 -1
drivers/acpi/acpica/aclocal.h
··· 650 650 }; 651 651 652 652 union acpi_parse_value { 653 - acpi_integer integer; /* Integer constant (Up to 64 bits) */ 653 + u64 integer; /* Integer constant (Up to 64 bits) */ 654 654 struct uint64_struct integer64; /* Structure overlay for 2 32-bit Dwords */ 655 655 u32 size; /* bytelist or field size */ 656 656 char *string; /* NULL terminated string */
+6 -6
drivers/acpi/acpica/acmacros.h
··· 272 272 * MASK_BITS_ABOVE creates a mask starting AT the position and above 273 273 * MASK_BITS_BELOW creates a mask starting one bit BELOW the position 274 274 */ 275 - #define ACPI_MASK_BITS_ABOVE(position) (~((ACPI_INTEGER_MAX) << ((u32) (position)))) 276 - #define ACPI_MASK_BITS_BELOW(position) ((ACPI_INTEGER_MAX) << ((u32) (position))) 275 + #define ACPI_MASK_BITS_ABOVE(position) (~((ACPI_UINT64_MAX) << ((u32) (position)))) 276 + #define ACPI_MASK_BITS_BELOW(position) ((ACPI_UINT64_MAX) << ((u32) (position))) 277 277 278 278 /* Bitfields within ACPI registers */ 279 279 ··· 414 414 acpi_ut_ptr_exit (ACPI_DEBUG_PARAMETERS, (u8 *) _s); \ 415 415 return (_s); }) 416 416 #define return_VALUE(s) ACPI_DO_WHILE0 ({ \ 417 - register acpi_integer _s = (s); \ 417 + register u64 _s = (s); \ 418 418 acpi_ut_value_exit (ACPI_DEBUG_PARAMETERS, _s); \ 419 419 return (_s); }) 420 420 #define return_UINT8(s) ACPI_DO_WHILE0 ({ \ 421 421 register u8 _s = (u8) (s); \ 422 - acpi_ut_value_exit (ACPI_DEBUG_PARAMETERS, (acpi_integer) _s); \ 422 + acpi_ut_value_exit (ACPI_DEBUG_PARAMETERS, (u64) _s); \ 423 423 return (_s); }) 424 424 #define return_UINT32(s) ACPI_DO_WHILE0 ({ \ 425 425 register u32 _s = (u32) (s); \ 426 - acpi_ut_value_exit (ACPI_DEBUG_PARAMETERS, (acpi_integer) _s); \ 426 + acpi_ut_value_exit (ACPI_DEBUG_PARAMETERS, (u64) _s); \ 427 427 return (_s); }) 428 428 #else /* Use original less-safe macros */ 429 429 ··· 434 434 acpi_ut_ptr_exit (ACPI_DEBUG_PARAMETERS, (u8 *) (s)); \ 435 435 return((s)); }) 436 436 #define return_VALUE(s) ACPI_DO_WHILE0 ({ \ 437 - acpi_ut_value_exit (ACPI_DEBUG_PARAMETERS, (acpi_integer) (s)); \ 437 + acpi_ut_value_exit (ACPI_DEBUG_PARAMETERS, (u64) (s)); \ 438 438 return((s)); }) 439 439 #define return_UINT8(s) return_VALUE(s) 440 440 #define return_UINT32(s) return_VALUE(s)
+1 -1
drivers/acpi/acpica/acobject.h
··· 111 111 112 112 struct acpi_object_integer { 113 113 ACPI_OBJECT_COMMON_HEADER u8 fill[3]; /* Prevent warning on some compilers */ 114 - acpi_integer value; 114 + u64 value; 115 115 }; 116 116 117 117 /*
+8 -12
drivers/acpi/acpica/acutils.h
··· 134 134 135 135 char *acpi_ut_get_event_name(u32 event_id); 136 136 137 - char acpi_ut_hex_to_ascii_char(acpi_integer integer, u32 position); 137 + char acpi_ut_hex_to_ascii_char(u64 integer, u32 position); 138 138 139 139 u8 acpi_ut_valid_object_type(acpi_object_type type); 140 140 ··· 279 279 void 280 280 acpi_ut_value_exit(u32 line_number, 281 281 const char *function_name, 282 - const char *module_name, 283 - u32 component_id, acpi_integer value); 282 + const char *module_name, u32 component_id, u64 value); 284 283 285 284 void 286 285 acpi_ut_ptr_exit(u32 line_number, ··· 323 324 acpi_status 324 325 acpi_ut_evaluate_numeric_object(char *object_name, 325 326 struct acpi_namespace_node *device_node, 326 - acpi_integer *value); 327 + u64 *value); 327 328 328 329 acpi_status 329 330 acpi_ut_execute_STA(struct acpi_namespace_node *device_node, u32 *status_flags); ··· 436 437 * utmath 437 438 */ 438 439 acpi_status 439 - acpi_ut_divide(acpi_integer in_dividend, 440 - acpi_integer in_divisor, 441 - acpi_integer * out_quotient, acpi_integer * out_remainder); 440 + acpi_ut_divide(u64 in_dividend, 441 + u64 in_divisor, u64 *out_quotient, u64 *out_remainder); 442 442 443 443 acpi_status 444 - acpi_ut_short_divide(acpi_integer in_dividend, 445 - u32 divisor, 446 - acpi_integer * out_quotient, u32 * out_remainder); 444 + acpi_ut_short_divide(u64 in_dividend, 445 + u32 divisor, u64 *out_quotient, u32 *out_remainder); 447 446 448 447 /* 449 448 * utmisc ··· 471 474 472 475 u8 acpi_ut_valid_acpi_char(char character, u32 position); 473 476 474 - acpi_status 475 - acpi_ut_strtoul64(char *string, u32 base, acpi_integer * ret_integer); 477 + acpi_status acpi_ut_strtoul64(char *string, u32 base, u64 * ret_integer); 476 478 477 479 void ACPI_INTERNAL_VAR_XFACE 478 480 acpi_ut_predefined_warning(const char *module_name,
+5 -5
drivers/acpi/acpica/dsfield.c
··· 220 220 union acpi_parse_object *arg) 221 221 { 222 222 acpi_status status; 223 - acpi_integer position; 223 + u64 position; 224 224 225 225 ACPI_FUNCTION_TRACE_PTR(ds_get_field_names, info); 226 226 ··· 240 240 switch (arg->common.aml_opcode) { 241 241 case AML_INT_RESERVEDFIELD_OP: 242 242 243 - position = (acpi_integer) info->field_bit_position 244 - + (acpi_integer) arg->common.value.size; 243 + position = (u64) info->field_bit_position 244 + + (u64) arg->common.value.size; 245 245 246 246 if (position > ACPI_UINT32_MAX) { 247 247 ACPI_ERROR((AE_INFO, ··· 305 305 306 306 /* Keep track of bit position for the next field */ 307 307 308 - position = (acpi_integer) info->field_bit_position 309 - + (acpi_integer) arg->common.value.size; 308 + position = (u64) info->field_bit_position 309 + + (u64) arg->common.value.size; 310 310 311 311 if (position > ACPI_UINT32_MAX) { 312 312 ACPI_ERROR((AE_INFO,
+1 -1
drivers/acpi/acpica/dsobject.c
··· 684 684 685 685 case AML_ONES_OP: 686 686 687 - obj_desc->integer.value = ACPI_INTEGER_MAX; 687 + obj_desc->integer.value = ACPI_UINT64_MAX; 688 688 689 689 /* Truncate value if we are executing from a 32-bit ACPI table */ 690 690
+2 -3
drivers/acpi/acpica/evregion.c
··· 329 329 * region_offset - Where in the region to read or write 330 330 * bit_width - Field width in bits (8, 16, 32, or 64) 331 331 * Value - Pointer to in or out value, must be 332 - * full 64-bit acpi_integer 332 + * a full 64-bit integer 333 333 * 334 334 * RETURN: Status 335 335 * ··· 341 341 acpi_status 342 342 acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj, 343 343 u32 function, 344 - u32 region_offset, 345 - u32 bit_width, acpi_integer * value) 344 + u32 region_offset, u32 bit_width, u64 *value) 346 345 { 347 346 acpi_status status; 348 347 acpi_adr_space_handler handler;
+1 -1
drivers/acpi/acpica/evrgnini.c
··· 168 168 void *handler_context, void **region_context) 169 169 { 170 170 acpi_status status = AE_OK; 171 - acpi_integer pci_value; 171 + u64 pci_value; 172 172 struct acpi_pci_id *pci_id = *region_context; 173 173 union acpi_operand_object *handler_obj; 174 174 struct acpi_namespace_node *parent_node;
+1 -1
drivers/acpi/acpica/exconfig.c
··· 284 284 acpi_ex_region_read(union acpi_operand_object *obj_desc, u32 length, u8 *buffer) 285 285 { 286 286 acpi_status status; 287 - acpi_integer value; 287 + u64 value; 288 288 u32 region_offset = 0; 289 289 u32 i; 290 290
+8 -11
drivers/acpi/acpica/exconvrt.c
··· 51 51 52 52 /* Local prototypes */ 53 53 static u32 54 - acpi_ex_convert_to_ascii(acpi_integer integer, 55 - u16 base, u8 * string, u8 max_length); 54 + acpi_ex_convert_to_ascii(u64 integer, u16 base, u8 *string, u8 max_length); 56 55 57 56 /******************************************************************************* 58 57 * ··· 74 75 { 75 76 union acpi_operand_object *return_desc; 76 77 u8 *pointer; 77 - acpi_integer result; 78 + u64 result; 78 79 u32 i; 79 80 u32 count; 80 81 acpi_status status; ··· 154 155 * Little endian is used, meaning that the first byte of the buffer 155 156 * is the LSB of the integer 156 157 */ 157 - result |= (((acpi_integer) pointer[i]) << (i * 8)); 158 + result |= (((u64) pointer[i]) << (i * 8)); 158 159 } 159 160 break; 160 161 ··· 284 285 ******************************************************************************/ 285 286 286 287 static u32 287 - acpi_ex_convert_to_ascii(acpi_integer integer, 288 - u16 base, u8 * string, u8 data_width) 288 + acpi_ex_convert_to_ascii(u64 integer, u16 base, u8 *string, u8 data_width) 289 289 { 290 - acpi_integer digit; 290 + u64 digit; 291 291 u32 i; 292 292 u32 j; 293 293 u32 k = 0; ··· 529 531 * (separated by commas or spaces) 530 532 */ 531 533 for (i = 0; i < obj_desc->buffer.length; i++) { 532 - new_buf += acpi_ex_convert_to_ascii((acpi_integer) 533 - obj_desc->buffer. 534 - pointer[i], base, 535 - new_buf, 1); 534 + new_buf += acpi_ex_convert_to_ascii((u64) obj_desc-> 535 + buffer.pointer[i], 536 + base, new_buf, 1); 536 537 *new_buf++ = separator; /* each separated by a comma or space */ 537 538 } 538 539
+3 -4
drivers/acpi/acpica/exfield.c
··· 130 130 /* Call the region handler for the read */ 131 131 132 132 status = acpi_ex_access_region(obj_desc, 0, 133 - ACPI_CAST_PTR(acpi_integer, 133 + ACPI_CAST_PTR(u64, 134 134 buffer_desc-> 135 135 buffer.pointer), 136 136 function); ··· 141 141 /* 142 142 * Allocate a buffer for the contents of the field. 143 143 * 144 - * If the field is larger than the size of an acpi_integer, create 144 + * If the field is larger than the current integer width, create 145 145 * a BUFFER to hold it. Otherwise, use an INTEGER. This allows 146 146 * the use of arithmetic operators on the returned value if the 147 147 * field size is equal or smaller than an Integer. ··· 306 306 * same buffer) 307 307 */ 308 308 status = acpi_ex_access_region(obj_desc, 0, 309 - (acpi_integer *) buffer, 310 - function); 309 + (u64 *) buffer, function); 311 310 acpi_ex_release_global_lock(obj_desc->common_field.field_flags); 312 311 313 312 *result_desc = buffer_desc;
+26 -31
drivers/acpi/acpica/exfldio.c
··· 55 55 static acpi_status 56 56 acpi_ex_field_datum_io(union acpi_operand_object *obj_desc, 57 57 u32 field_datum_byte_offset, 58 - acpi_integer * value, u32 read_write); 58 + u64 *value, u32 read_write); 59 59 60 60 static u8 61 - acpi_ex_register_overflow(union acpi_operand_object *obj_desc, 62 - acpi_integer value); 61 + acpi_ex_register_overflow(union acpi_operand_object *obj_desc, u64 value); 63 62 64 63 static acpi_status 65 64 acpi_ex_setup_region(union acpi_operand_object *obj_desc, ··· 211 212 * field_datum_byte_offset - Byte offset of this datum within the 212 213 * parent field 213 214 * Value - Where to store value (must at least 214 - * the size of acpi_integer) 215 + * 64 bits) 215 216 * Function - Read or Write flag plus other region- 216 217 * dependent flags 217 218 * ··· 223 224 224 225 acpi_status 225 226 acpi_ex_access_region(union acpi_operand_object *obj_desc, 226 - u32 field_datum_byte_offset, 227 - acpi_integer * value, u32 function) 227 + u32 field_datum_byte_offset, u64 *value, u32 function) 228 228 { 229 229 acpi_status status; 230 230 union acpi_operand_object *rgn_desc; ··· 315 317 ******************************************************************************/ 316 318 317 319 static u8 318 - acpi_ex_register_overflow(union acpi_operand_object *obj_desc, 319 - acpi_integer value) 320 + acpi_ex_register_overflow(union acpi_operand_object *obj_desc, u64 value) 320 321 { 321 322 322 323 if (obj_desc->common_field.bit_length >= ACPI_INTEGER_BIT_SIZE) { ··· 326 329 return (FALSE); 327 330 } 328 331 329 - if (value >= ((acpi_integer) 1 << obj_desc->common_field.bit_length)) { 332 + if (value >= ((u64) 1 << obj_desc->common_field.bit_length)) { 330 333 /* 331 334 * The Value is larger than the maximum value that can fit into 332 335 * the register. ··· 359 362 360 363 static acpi_status 361 364 acpi_ex_field_datum_io(union acpi_operand_object *obj_desc, 362 - u32 field_datum_byte_offset, 363 - acpi_integer * value, u32 read_write) 365 + u32 field_datum_byte_offset, u64 *value, u32 read_write) 364 366 { 365 367 acpi_status status; 366 - acpi_integer local_value; 368 + u64 local_value; 367 369 368 370 ACPI_FUNCTION_TRACE_U32(ex_field_datum_io, field_datum_byte_offset); 369 371 ··· 435 439 * the register 436 440 */ 437 441 if (acpi_ex_register_overflow(obj_desc->bank_field.bank_obj, 438 - (acpi_integer) obj_desc-> 439 - bank_field.value)) { 442 + (u64) obj_desc->bank_field. 443 + value)) { 440 444 return_ACPI_STATUS(AE_AML_REGISTER_LIMIT); 441 445 } 442 446 ··· 477 481 * the register 478 482 */ 479 483 if (acpi_ex_register_overflow(obj_desc->index_field.index_obj, 480 - (acpi_integer) obj_desc-> 481 - index_field.value)) { 484 + (u64) obj_desc->index_field. 485 + value)) { 482 486 return_ACPI_STATUS(AE_AML_REGISTER_LIMIT); 483 487 } 484 488 ··· 508 512 status = 509 513 acpi_ex_extract_from_field(obj_desc->index_field. 510 514 data_obj, value, 511 - sizeof(acpi_integer)); 515 + sizeof(u64)); 512 516 } else { 513 517 /* Write the datum to the data_register */ 514 518 ··· 519 523 status = 520 524 acpi_ex_insert_into_field(obj_desc->index_field. 521 525 data_obj, value, 522 - sizeof(acpi_integer)); 526 + sizeof(u64)); 523 527 } 524 528 break; 525 529 ··· 567 571 568 572 acpi_status 569 573 acpi_ex_write_with_update_rule(union acpi_operand_object *obj_desc, 570 - acpi_integer mask, 571 - acpi_integer field_value, 572 - u32 field_datum_byte_offset) 574 + u64 mask, 575 + u64 field_value, u32 field_datum_byte_offset) 573 576 { 574 577 acpi_status status = AE_OK; 575 - acpi_integer merged_value; 576 - acpi_integer current_value; 578 + u64 merged_value; 579 + u64 current_value; 577 580 578 581 ACPI_FUNCTION_TRACE_U32(ex_write_with_update_rule, mask); 579 582 ··· 582 587 583 588 /* If the mask is all ones, we don't need to worry about the update rule */ 584 589 585 - if (mask != ACPI_INTEGER_MAX) { 590 + if (mask != ACPI_UINT64_MAX) { 586 591 587 592 /* Decode the update rule */ 588 593 ··· 673 678 void *buffer, u32 buffer_length) 674 679 { 675 680 acpi_status status; 676 - acpi_integer raw_datum; 677 - acpi_integer merged_datum; 681 + u64 raw_datum; 682 + u64 merged_datum; 678 683 u32 field_offset = 0; 679 684 u32 buffer_offset = 0; 680 685 u32 buffer_tail_bits; ··· 799 804 void *buffer, u32 buffer_length) 800 805 { 801 806 acpi_status status; 802 - acpi_integer mask; 803 - acpi_integer width_mask; 804 - acpi_integer merged_datum; 805 - acpi_integer raw_datum = 0; 807 + u64 mask; 808 + u64 width_mask; 809 + u64 merged_datum; 810 + u64 raw_datum = 0; 806 811 u32 field_offset = 0; 807 812 u32 buffer_offset = 0; 808 813 u32 buffer_tail_bits; ··· 850 855 * shift operator 851 856 */ 852 857 if (obj_desc->common_field.access_bit_width == ACPI_INTEGER_BIT_SIZE) { 853 - width_mask = ACPI_INTEGER_MAX; 858 + width_mask = ACPI_UINT64_MAX; 854 859 } else { 855 860 width_mask = 856 861 ACPI_MASK_BITS_ABOVE(obj_desc->common_field.
+4 -6
drivers/acpi/acpica/exmisc.c
··· 409 409 * 410 410 ******************************************************************************/ 411 411 412 - acpi_integer 413 - acpi_ex_do_math_op(u16 opcode, acpi_integer integer0, acpi_integer integer1) 412 + u64 acpi_ex_do_math_op(u16 opcode, u64 integer0, u64 integer1) 414 413 { 415 414 416 415 ACPI_FUNCTION_ENTRY(); ··· 497 498 498 499 acpi_status 499 500 acpi_ex_do_logical_numeric_op(u16 opcode, 500 - acpi_integer integer0, 501 - acpi_integer integer1, u8 * logical_result) 501 + u64 integer0, u64 integer1, u8 *logical_result) 502 502 { 503 503 acpi_status status = AE_OK; 504 504 u8 local_result = FALSE; ··· 562 564 union acpi_operand_object *operand1, u8 * logical_result) 563 565 { 564 566 union acpi_operand_object *local_operand1 = operand1; 565 - acpi_integer integer0; 566 - acpi_integer integer1; 567 + u64 integer0; 568 + u64 integer1; 567 569 u32 length0; 568 570 u32 length1; 569 571 acpi_status status = AE_OK;
+7 -7
drivers/acpi/acpica/exoparg1.c
··· 261 261 union acpi_operand_object *return_desc2 = NULL; 262 262 u32 temp32; 263 263 u32 i; 264 - acpi_integer power_of_ten; 265 - acpi_integer digit; 264 + u64 power_of_ten; 265 + u64 digit; 266 266 267 267 ACPI_FUNCTION_TRACE_STR(ex_opcode_1A_1T_1R, 268 268 acpi_ps_get_opcode_name(walk_state->opcode)); ··· 362 362 /* Sum the digit into the result with the current power of 10 */ 363 363 364 364 return_desc->integer.value += 365 - (((acpi_integer) temp32) * power_of_ten); 365 + (((u64) temp32) * power_of_ten); 366 366 367 367 /* Shift to next BCD digit */ 368 368 ··· 392 392 * remainder from above 393 393 */ 394 394 return_desc->integer.value |= 395 - (((acpi_integer) temp32) << ACPI_MUL_4(i)); 395 + (((u64) temp32) << ACPI_MUL_4(i)); 396 396 } 397 397 398 398 /* Overflow if there is any data left in Digit */ ··· 439 439 440 440 /* The object exists in the namespace, return TRUE */ 441 441 442 - return_desc->integer.value = ACPI_INTEGER_MAX; 442 + return_desc->integer.value = ACPI_UINT64_MAX; 443 443 goto cleanup; 444 444 445 445 default: ··· 589 589 union acpi_operand_object *return_desc = NULL; 590 590 acpi_status status = AE_OK; 591 591 u32 type; 592 - acpi_integer value; 592 + u64 value; 593 593 594 594 ACPI_FUNCTION_TRACE_STR(ex_opcode_1A_0T_1R, 595 595 acpi_ps_get_opcode_name(walk_state->opcode)); ··· 610 610 * return_desc->Integer.Value is initially == 0 (FALSE) from above. 611 611 */ 612 612 if (!operand[0]->integer.value) { 613 - return_desc->integer.value = ACPI_INTEGER_MAX; 613 + return_desc->integer.value = ACPI_UINT64_MAX; 614 614 } 615 615 break; 616 616
+2 -2
drivers/acpi/acpica/exoparg2.c
··· 282 282 { 283 283 union acpi_operand_object **operand = &walk_state->operands[0]; 284 284 union acpi_operand_object *return_desc = NULL; 285 - acpi_integer index; 285 + u64 index; 286 286 acpi_status status = AE_OK; 287 287 acpi_size length; 288 288 ··· 584 584 * Default is FALSE (zero) 585 585 */ 586 586 if (logical_result) { 587 - return_desc->integer.value = ACPI_INTEGER_MAX; 587 + return_desc->integer.value = ACPI_UINT64_MAX; 588 588 } 589 589 590 590 cleanup:
+1 -1
drivers/acpi/acpica/exoparg3.c
··· 148 148 union acpi_operand_object *return_desc = NULL; 149 149 char *buffer = NULL; 150 150 acpi_status status = AE_OK; 151 - acpi_integer index; 151 + u64 index; 152 152 acpi_size length; 153 153 154 154 ACPI_FUNCTION_TRACE_STR(ex_opcode_3A_1T_1R,
+4 -4
drivers/acpi/acpica/exoparg6.c
··· 218 218 union acpi_operand_object **operand = &walk_state->operands[0]; 219 219 union acpi_operand_object *return_desc = NULL; 220 220 acpi_status status = AE_OK; 221 - acpi_integer index; 221 + u64 index; 222 222 union acpi_operand_object *this_element; 223 223 224 224 ACPI_FUNCTION_TRACE_STR(ex_opcode_6A_0T_1R, ··· 253 253 } 254 254 255 255 /* Create an integer for the return value */ 256 - /* Default return value is ACPI_INTEGER_MAX if no match found */ 256 + /* Default return value is ACPI_UINT64_MAX if no match found */ 257 257 258 - return_desc = acpi_ut_create_integer_object(ACPI_INTEGER_MAX); 258 + return_desc = acpi_ut_create_integer_object(ACPI_UINT64_MAX); 259 259 if (!return_desc) { 260 260 status = AE_NO_MEMORY; 261 261 goto cleanup; ··· 270 270 * 271 271 * Upon finding a match, the loop will terminate via "break" at 272 272 * the bottom. If it terminates "normally", match_value will be 273 - * ACPI_INTEGER_MAX (Ones) (its initial value) indicating that no 273 + * ACPI_UINT64_MAX (Ones) (its initial value) indicating that no 274 274 * match was found. 275 275 */ 276 276 for (; index < operand[0]->package.count; index++) {
+15 -18
drivers/acpi/acpica/exregion.c
··· 70 70 acpi_ex_system_memory_space_handler(u32 function, 71 71 acpi_physical_address address, 72 72 u32 bit_width, 73 - acpi_integer * value, 73 + u64 *value, 74 74 void *handler_context, void *region_context) 75 75 { 76 76 acpi_status status = AE_OK; ··· 115 115 * Hardware does not support non-aligned data transfers, we must verify 116 116 * the request. 117 117 */ 118 - (void)acpi_ut_short_divide((acpi_integer) address, length, NULL, 119 - &remainder); 118 + (void)acpi_ut_short_divide((u64) address, length, NULL, &remainder); 120 119 if (remainder != 0) { 121 120 return_ACPI_STATUS(AE_AML_ALIGNMENT); 122 121 } ··· 127 128 * 2) Address beyond the current mapping? 128 129 */ 129 130 if ((address < mem_info->mapped_physical_address) || 130 - (((acpi_integer) address + length) > ((acpi_integer) 131 - mem_info-> 132 - mapped_physical_address + 133 - mem_info->mapped_length))) { 131 + (((u64) address + length) > ((u64) 132 + mem_info->mapped_physical_address + 133 + mem_info->mapped_length))) { 134 134 /* 135 135 * The request cannot be resolved by the current memory mapping; 136 136 * Delete the existing mapping and create a new one. ··· 191 193 * access 192 194 */ 193 195 logical_addr_ptr = mem_info->mapped_logical_address + 194 - ((acpi_integer) address - 195 - (acpi_integer) mem_info->mapped_physical_address); 196 + ((u64) address - (u64) mem_info->mapped_physical_address); 196 197 197 198 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 198 199 "System-Memory (width %d) R/W %d Address=%8.8X%8.8X\n", ··· 212 215 *value = 0; 213 216 switch (bit_width) { 214 217 case 8: 215 - *value = (acpi_integer) ACPI_GET8(logical_addr_ptr); 218 + *value = (u64) ACPI_GET8(logical_addr_ptr); 216 219 break; 217 220 218 221 case 16: 219 - *value = (acpi_integer) ACPI_GET16(logical_addr_ptr); 222 + *value = (u64) ACPI_GET16(logical_addr_ptr); 220 223 break; 221 224 222 225 case 32: 223 - *value = (acpi_integer) ACPI_GET32(logical_addr_ptr); 226 + *value = (u64) ACPI_GET32(logical_addr_ptr); 224 227 break; 225 228 226 229 case 64: 227 - *value = (acpi_integer) ACPI_GET64(logical_addr_ptr); 230 + *value = (u64) ACPI_GET64(logical_addr_ptr); 228 231 break; 229 232 230 233 default: ··· 288 291 acpi_ex_system_io_space_handler(u32 function, 289 292 acpi_physical_address address, 290 293 u32 bit_width, 291 - acpi_integer * value, 294 + u64 *value, 292 295 void *handler_context, void *region_context) 293 296 { 294 297 acpi_status status = AE_OK; ··· 347 350 acpi_ex_pci_config_space_handler(u32 function, 348 351 acpi_physical_address address, 349 352 u32 bit_width, 350 - acpi_integer * value, 353 + u64 *value, 351 354 void *handler_context, void *region_context) 352 355 { 353 356 acpi_status status = AE_OK; ··· 422 425 acpi_ex_cmos_space_handler(u32 function, 423 426 acpi_physical_address address, 424 427 u32 bit_width, 425 - acpi_integer * value, 428 + u64 *value, 426 429 void *handler_context, void *region_context) 427 430 { 428 431 acpi_status status = AE_OK; ··· 454 457 acpi_ex_pci_bar_space_handler(u32 function, 455 458 acpi_physical_address address, 456 459 u32 bit_width, 457 - acpi_integer * value, 460 + u64 *value, 458 461 void *handler_context, void *region_context) 459 462 { 460 463 acpi_status status = AE_OK; ··· 486 489 acpi_ex_data_table_space_handler(u32 function, 487 490 acpi_physical_address address, 488 491 u32 bit_width, 489 - acpi_integer * value, 492 + u64 *value, 490 493 void *handler_context, void *region_context) 491 494 { 492 495 ACPI_FUNCTION_TRACE(ex_data_table_space_handler);
+1 -1
drivers/acpi/acpica/exsystem.c
··· 193 193 * 194 194 ******************************************************************************/ 195 195 196 - acpi_status acpi_ex_system_do_suspend(acpi_integer how_long) 196 + acpi_status acpi_ex_system_do_suspend(u64 how_long) 197 197 { 198 198 ACPI_FUNCTION_ENTRY(); 199 199
+11 -11
drivers/acpi/acpica/exutils.c
··· 67 67 ACPI_MODULE_NAME("exutils") 68 68 69 69 /* Local prototypes */ 70 - static u32 acpi_ex_digits_needed(acpi_integer value, u32 base); 70 + static u32 acpi_ex_digits_needed(u64 value, u32 base); 71 71 72 72 #ifndef ACPI_NO_METHOD_EXECUTION 73 73 /******************************************************************************* ··· 230 230 * We are running a method that exists in a 32-bit ACPI table. 231 231 * Truncate the value to 32 bits by zeroing out the upper 32-bit field 232 232 */ 233 - obj_desc->integer.value &= (acpi_integer) ACPI_UINT32_MAX; 233 + obj_desc->integer.value &= (u64) ACPI_UINT32_MAX; 234 234 } 235 235 } 236 236 ··· 327 327 * 328 328 ******************************************************************************/ 329 329 330 - static u32 acpi_ex_digits_needed(acpi_integer value, u32 base) 330 + static u32 acpi_ex_digits_needed(u64 value, u32 base) 331 331 { 332 332 u32 num_digits; 333 - acpi_integer current_value; 333 + u64 current_value; 334 334 335 335 ACPI_FUNCTION_TRACE(ex_digits_needed); 336 336 337 - /* acpi_integer is unsigned, so we don't worry about a '-' prefix */ 337 + /* u64 is unsigned, so we don't worry about a '-' prefix */ 338 338 339 339 if (value == 0) { 340 340 return_UINT32(1); ··· 370 370 * 371 371 ******************************************************************************/ 372 372 373 - void acpi_ex_eisa_id_to_string(char *out_string, acpi_integer compressed_id) 373 + void acpi_ex_eisa_id_to_string(char *out_string, u64 compressed_id) 374 374 { 375 375 u32 swapped_id; 376 376 ··· 394 394 (char)(0x40 + (((unsigned long)swapped_id >> 26) & 0x1F)); 395 395 out_string[1] = (char)(0x40 + ((swapped_id >> 21) & 0x1F)); 396 396 out_string[2] = (char)(0x40 + ((swapped_id >> 16) & 0x1F)); 397 - out_string[3] = acpi_ut_hex_to_ascii_char((acpi_integer)swapped_id, 12); 398 - out_string[4] = acpi_ut_hex_to_ascii_char((acpi_integer)swapped_id, 8); 399 - out_string[5] = acpi_ut_hex_to_ascii_char((acpi_integer)swapped_id, 4); 400 - out_string[6] = acpi_ut_hex_to_ascii_char((acpi_integer)swapped_id, 0); 397 + out_string[3] = acpi_ut_hex_to_ascii_char((u64) swapped_id, 12); 398 + out_string[4] = acpi_ut_hex_to_ascii_char((u64) swapped_id, 8); 399 + out_string[5] = acpi_ut_hex_to_ascii_char((u64) swapped_id, 4); 400 + out_string[6] = acpi_ut_hex_to_ascii_char((u64) swapped_id, 0); 401 401 out_string[7] = 0; 402 402 } 403 403 ··· 418 418 * 419 419 ******************************************************************************/ 420 420 421 - void acpi_ex_integer_to_string(char *out_string, acpi_integer value) 421 + void acpi_ex_integer_to_string(char *out_string, u64 value) 422 422 { 423 423 u32 count; 424 424 u32 digits_needed;
+1 -1
drivers/acpi/acpica/hwtimer.c
··· 140 140 { 141 141 acpi_status status; 142 142 u32 delta_ticks; 143 - acpi_integer quotient; 143 + u64 quotient; 144 144 145 145 ACPI_FUNCTION_TRACE(acpi_get_timer_duration); 146 146
+1 -1
drivers/acpi/acpica/psargs.c
··· 403 403 /* Get 1 byte from the AML stream */ 404 404 405 405 opcode = AML_BYTE_OP; 406 - arg->common.value.integer = (acpi_integer) * aml; 406 + arg->common.value.integer = (u64) *aml; 407 407 length = 1; 408 408 break; 409 409
+1 -1
drivers/acpi/acpica/rscreate.c
··· 182 182 183 183 /* 184 184 * Loop through the ACPI_INTERNAL_OBJECTS - Each object should be a 185 - * package that in turn contains an acpi_integer Address, a u8 Pin, 185 + * package that in turn contains an u64 Address, a u8 Pin, 186 186 * a Name, and a u8 source_index. 187 187 */ 188 188 top_object_list = package_object->package.elements;
+1 -2
drivers/acpi/acpica/utdebug.c
··· 460 460 void 461 461 acpi_ut_value_exit(u32 line_number, 462 462 const char *function_name, 463 - const char *module_name, 464 - u32 component_id, acpi_integer value) 463 + const char *module_name, u32 component_id, u64 value) 465 464 { 466 465 467 466 acpi_debug_print(ACPI_LV_FUNCTIONS,
+1 -1
drivers/acpi/acpica/uteval.c
··· 348 348 acpi_status 349 349 acpi_ut_evaluate_numeric_object(char *object_name, 350 350 struct acpi_namespace_node *device_node, 351 - acpi_integer *value) 351 + u64 *value) 352 352 { 353 353 union acpi_operand_object *obj_desc; 354 354 acpi_status status;
+1 -1
drivers/acpi/acpica/utglobal.c
··· 234 234 * 235 235 ******************************************************************************/ 236 236 237 - char acpi_ut_hex_to_ascii_char(acpi_integer integer, u32 position) 237 + char acpi_ut_hex_to_ascii_char(u64 integer, u32 position) 238 238 { 239 239 240 240 return (acpi_gbl_hex_to_ascii[(integer >> position) & 0xF]);
+10 -15
drivers/acpi/acpica/utmath.c
··· 70 70 * 71 71 ******************************************************************************/ 72 72 acpi_status 73 - acpi_ut_short_divide(acpi_integer dividend, 74 - u32 divisor, 75 - acpi_integer * out_quotient, u32 * out_remainder) 73 + acpi_ut_short_divide(u64 dividend, 74 + u32 divisor, u64 *out_quotient, u32 *out_remainder) 76 75 { 77 76 union uint64_overlay dividend_ovl; 78 77 union uint64_overlay quotient; ··· 125 126 ******************************************************************************/ 126 127 127 128 acpi_status 128 - acpi_ut_divide(acpi_integer in_dividend, 129 - acpi_integer in_divisor, 130 - acpi_integer * out_quotient, acpi_integer * out_remainder) 129 + acpi_ut_divide(u64 in_dividend, 130 + u64 in_divisor, u64 *out_quotient, u64 *out_remainder) 131 131 { 132 132 union uint64_overlay dividend; 133 133 union uint64_overlay divisor; ··· 197 199 * The 64-bit remainder must be generated. 198 200 */ 199 201 partial1 = quotient.part.lo * divisor.part.hi; 200 - partial2.full = 201 - (acpi_integer) quotient.part.lo * divisor.part.lo; 202 - partial3.full = (acpi_integer) partial2.part.hi + partial1; 202 + partial2.full = (u64) quotient.part.lo * divisor.part.lo; 203 + partial3.full = (u64) partial2.part.hi + partial1; 203 204 204 205 remainder.part.hi = partial3.part.lo; 205 206 remainder.part.lo = partial2.part.lo; ··· 254 257 * 255 258 ******************************************************************************/ 256 259 acpi_status 257 - acpi_ut_short_divide(acpi_integer in_dividend, 258 - u32 divisor, 259 - acpi_integer * out_quotient, u32 * out_remainder) 260 + acpi_ut_short_divide(u64 in_dividend, 261 + u32 divisor, u64 *out_quotient, u32 *out_remainder) 260 262 { 261 263 262 264 ACPI_FUNCTION_TRACE(ut_short_divide); ··· 280 284 } 281 285 282 286 acpi_status 283 - acpi_ut_divide(acpi_integer in_dividend, 284 - acpi_integer in_divisor, 285 - acpi_integer * out_quotient, acpi_integer * out_remainder) 287 + acpi_ut_divide(u64 in_dividend, 288 + u64 in_divisor, u64 *out_quotient, u64 *out_remainder) 286 289 { 287 290 ACPI_FUNCTION_TRACE(ut_divide); 288 291
+6 -8
drivers/acpi/acpica/utmisc.c
··· 724 724 * 725 725 ******************************************************************************/ 726 726 727 - acpi_status 728 - acpi_ut_strtoul64(char *string, u32 base, acpi_integer * ret_integer) 727 + acpi_status acpi_ut_strtoul64(char *string, u32 base, u64 * ret_integer) 729 728 { 730 729 u32 this_digit = 0; 731 - acpi_integer return_value = 0; 732 - acpi_integer quotient; 733 - acpi_integer dividend; 730 + u64 return_value = 0; 731 + u64 quotient; 732 + u64 dividend; 734 733 u32 to_integer_op = (base == ACPI_ANY_BASE); 735 734 u32 mode32 = (acpi_gbl_integer_byte_width == 4); 736 735 u8 valid_digits = 0; ··· 843 844 844 845 /* Divide the digit into the correct position */ 845 846 846 - (void) 847 - acpi_ut_short_divide((dividend - (acpi_integer) this_digit), 848 - base, &quotient, NULL); 847 + (void)acpi_ut_short_divide((dividend - (u64) this_digit), 848 + base, &quotient, NULL); 849 849 850 850 if (return_value > quotient) { 851 851 if (to_integer_op) {
+2 -2
include/acpi/acpiosxf.h
··· 196 196 197 197 void acpi_os_wait_events_complete(void *context); 198 198 199 - void acpi_os_sleep(acpi_integer milliseconds); 199 + void acpi_os_sleep(u64 milliseconds); 200 200 201 201 void acpi_os_stall(u32 microseconds); 202 202 ··· 227 227 228 228 acpi_status 229 229 acpi_os_write_pci_configuration(struct acpi_pci_id *pci_id, 230 - u32 reg, acpi_integer value, u32 width); 230 + u32 reg, u64 value, u32 width); 231 231 232 232 /* 233 233 * Interim function needed for PCI IRQ routing
+1 -1
include/acpi/acrestyp.h
··· 397 397 struct acpi_pci_routing_table { 398 398 u32 length; 399 399 u32 pin; 400 - acpi_integer address; /* here for 64-bit alignment */ 400 + u64 address; /* here for 64-bit alignment */ 401 401 u32 source_index; 402 402 char source[4]; /* pad to 64 bits so sizeof() works in all cases */ 403 403 };
+16 -11
include/acpi/actypes.h
··· 390 390 u32 hi; 391 391 }; 392 392 393 - /* 394 - * Acpi integer width. In ACPI version 1, integers are 32 bits. In ACPI 395 - * version 2, integers are 64 bits. Note that this pertains to the ACPI integer 396 - * type only, not other integers used in the implementation of the ACPI CA 397 - * subsystem. 398 - */ 399 - typedef unsigned long long acpi_integer; 400 - #define ACPI_INTEGER_MAX ACPI_UINT64_MAX 401 393 #define ACPI_INTEGER_BIT_SIZE 64 402 394 #define ACPI_MAX_DECIMAL_DIGITS 20 /* 2^64 = 18,446,744,073,709,551,616 */ 403 395 ··· 412 420 #define ACPI_ROOT_OBJECT ACPI_ADD_PTR (acpi_handle, NULL, ACPI_MAX_PTR) 413 421 #define ACPI_WAIT_FOREVER 0xFFFF /* u16, as per ACPI spec */ 414 422 #define ACPI_DO_NOT_WAIT 0 423 + 424 + /* 425 + * Obsolete: Acpi integer width. In ACPI version 1 (1996), integers are 32 bits. 426 + * In ACPI version 2 (2000) and later, integers are 64 bits. Note that this 427 + * pertains to the ACPI integer type only, not to other integers used in the 428 + * implementation of the ACPICA subsystem. 429 + * 430 + * 01/2010: This type is obsolete and has been removed from the entire ACPICA 431 + * code base. It remains here for compatibility with device drivers that use 432 + * the type. However, it will be removed in the future. 433 + */ 434 + typedef u64 acpi_integer; 435 + #define ACPI_INTEGER_MAX ACPI_UINT64_MAX 415 436 416 437 /******************************************************************************* 417 438 * ··· 806 801 acpi_object_type type; /* See definition of acpi_ns_type for values */ 807 802 struct { 808 803 acpi_object_type type; /* ACPI_TYPE_INTEGER */ 809 - acpi_integer value; /* The actual number */ 804 + u64 value; /* The actual number */ 810 805 } integer; 811 806 812 807 struct { ··· 950 945 acpi_status(*acpi_adr_space_handler) (u32 function, 951 946 acpi_physical_address address, 952 947 u32 bit_width, 953 - acpi_integer * value, 948 + u64 *value, 954 949 void *handler_context, 955 950 void *region_context); 956 951 ··· 1010 1005 u8 highest_dstates[4]; /* _sx_d values: 0xFF indicates not valid */ 1011 1006 u8 lowest_dstates[5]; /* _sx_w values: 0xFF indicates not valid */ 1012 1007 u32 current_status; /* _STA value */ 1013 - acpi_integer address; /* _ADR value */ 1008 + u64 address; /* _ADR value */ 1014 1009 struct acpica_device_id hardware_id; /* _HID value */ 1015 1010 struct acpica_device_id unique_id; /* _UID value */ 1016 1011 struct acpica_device_id_list compatible_id_list; /* _CID list <must be last> */