Skip to content

Commit

Permalink
ACPICA: Remove obsolete ACPI_INTEGER (acpi_integer) type
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bob Moore authored and Len Brown committed Jan 22, 2010
1 parent 091f4d7 commit 5df7e6c
Show file tree
Hide file tree
Showing 33 changed files with 169 additions and 196 deletions.
3 changes: 1 addition & 2 deletions drivers/acpi/acpica/acevents.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,7 @@ acpi_status acpi_ev_initialize_op_regions(void);
acpi_status
acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
u32 function,
u32 region_offset,
u32 bit_width, acpi_integer * value);
u32 region_offset, u32 bit_width, u64 *value);

acpi_status
acpi_ev_attach_region(union acpi_operand_object *handler_obj,
Expand Down
42 changes: 19 additions & 23 deletions drivers/acpi/acpica/acinterp.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,18 +129,17 @@ acpi_ex_common_buffer_setup(union acpi_operand_object *obj_desc,

acpi_status
acpi_ex_write_with_update_rule(union acpi_operand_object *obj_desc,
acpi_integer mask,
acpi_integer field_value,
u32 field_datum_byte_offset);
u64 mask,
u64 field_value, u32 field_datum_byte_offset);

void
acpi_ex_get_buffer_datum(acpi_integer * datum,
acpi_ex_get_buffer_datum(u64 *datum,
void *buffer,
u32 buffer_length,
u32 byte_granularity, u32 buffer_offset);

void
acpi_ex_set_buffer_datum(acpi_integer merged_datum,
acpi_ex_set_buffer_datum(u64 merged_datum,
void *buffer,
u32 buffer_length,
u32 byte_granularity, u32 buffer_offset);
Expand Down Expand Up @@ -168,8 +167,7 @@ acpi_ex_insert_into_field(union acpi_operand_object *obj_desc,

acpi_status
acpi_ex_access_region(union acpi_operand_object *obj_desc,
u32 field_datum_byte_offset,
acpi_integer * value, u32 read_write);
u32 field_datum_byte_offset, u64 *value, u32 read_write);

/*
* exmisc - misc support routines
Expand All @@ -193,16 +191,14 @@ acpi_ex_do_concatenate(union acpi_operand_object *obj_desc,

acpi_status
acpi_ex_do_logical_numeric_op(u16 opcode,
acpi_integer integer0,
acpi_integer integer1, u8 * logical_result);
u64 integer0, u64 integer1, u8 *logical_result);

acpi_status
acpi_ex_do_logical_op(u16 opcode,
union acpi_operand_object *operand0,
union acpi_operand_object *operand1, u8 * logical_result);
union acpi_operand_object *operand1, u8 *logical_result);

acpi_integer
acpi_ex_do_math_op(u16 opcode, acpi_integer operand0, acpi_integer operand1);
u64 acpi_ex_do_math_op(u16 opcode, u64 operand0, u64 operand1);

acpi_status acpi_ex_create_mutex(struct acpi_walk_state *walk_state);

Expand Down Expand Up @@ -278,7 +274,7 @@ acpi_status
acpi_ex_system_do_notify_op(union acpi_operand_object *value,
union acpi_operand_object *obj_desc);

acpi_status acpi_ex_system_do_suspend(acpi_integer time);
acpi_status acpi_ex_system_do_suspend(u64 time);

acpi_status acpi_ex_system_do_stall(u32 time);

Expand Down Expand Up @@ -461,9 +457,9 @@ void acpi_ex_acquire_global_lock(u32 rule);

void acpi_ex_release_global_lock(u32 rule);

void acpi_ex_eisa_id_to_string(char *dest, acpi_integer compressed_id);
void acpi_ex_eisa_id_to_string(char *dest, u64 compressed_id);

void acpi_ex_integer_to_string(char *dest, acpi_integer value);
void acpi_ex_integer_to_string(char *dest, u64 value);

/*
* exregion - default op_region handlers
Expand All @@ -472,58 +468,58 @@ acpi_status
acpi_ex_system_memory_space_handler(u32 function,
acpi_physical_address address,
u32 bit_width,
acpi_integer * value,
u64 *value,
void *handler_context,
void *region_context);

acpi_status
acpi_ex_system_io_space_handler(u32 function,
acpi_physical_address address,
u32 bit_width,
acpi_integer * value,
u64 *value,
void *handler_context, void *region_context);

acpi_status
acpi_ex_pci_config_space_handler(u32 function,
acpi_physical_address address,
u32 bit_width,
acpi_integer * value,
u64 *value,
void *handler_context, void *region_context);

acpi_status
acpi_ex_cmos_space_handler(u32 function,
acpi_physical_address address,
u32 bit_width,
acpi_integer * value,
u64 *value,
void *handler_context, void *region_context);

acpi_status
acpi_ex_pci_bar_space_handler(u32 function,
acpi_physical_address address,
u32 bit_width,
acpi_integer * value,
u64 *value,
void *handler_context, void *region_context);

acpi_status
acpi_ex_embedded_controller_space_handler(u32 function,
acpi_physical_address address,
u32 bit_width,
acpi_integer * value,
u64 *value,
void *handler_context,
void *region_context);

acpi_status
acpi_ex_sm_bus_space_handler(u32 function,
acpi_physical_address address,
u32 bit_width,
acpi_integer * value,
u64 *value,
void *handler_context, void *region_context);

acpi_status
acpi_ex_data_table_space_handler(u32 function,
acpi_physical_address address,
u32 bit_width,
acpi_integer * value,
u64 *value,
void *handler_context, void *region_context);

#endif /* __INTERP_H__ */
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/aclocal.h
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ struct acpi_opcode_info {
};

union acpi_parse_value {
acpi_integer integer; /* Integer constant (Up to 64 bits) */
u64 integer; /* Integer constant (Up to 64 bits) */
struct uint64_struct integer64; /* Structure overlay for 2 32-bit Dwords */
u32 size; /* bytelist or field size */
char *string; /* NULL terminated string */
Expand Down
12 changes: 6 additions & 6 deletions drivers/acpi/acpica/acmacros.h
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,8 @@
* MASK_BITS_ABOVE creates a mask starting AT the position and above
* MASK_BITS_BELOW creates a mask starting one bit BELOW the position
*/
#define ACPI_MASK_BITS_ABOVE(position) (~((ACPI_INTEGER_MAX) << ((u32) (position))))
#define ACPI_MASK_BITS_BELOW(position) ((ACPI_INTEGER_MAX) << ((u32) (position)))
#define ACPI_MASK_BITS_ABOVE(position) (~((ACPI_UINT64_MAX) << ((u32) (position))))
#define ACPI_MASK_BITS_BELOW(position) ((ACPI_UINT64_MAX) << ((u32) (position)))

/* Bitfields within ACPI registers */

Expand Down Expand Up @@ -414,16 +414,16 @@
acpi_ut_ptr_exit (ACPI_DEBUG_PARAMETERS, (u8 *) _s); \
return (_s); })
#define return_VALUE(s) ACPI_DO_WHILE0 ({ \
register acpi_integer _s = (s); \
register u64 _s = (s); \
acpi_ut_value_exit (ACPI_DEBUG_PARAMETERS, _s); \
return (_s); })
#define return_UINT8(s) ACPI_DO_WHILE0 ({ \
register u8 _s = (u8) (s); \
acpi_ut_value_exit (ACPI_DEBUG_PARAMETERS, (acpi_integer) _s); \
acpi_ut_value_exit (ACPI_DEBUG_PARAMETERS, (u64) _s); \
return (_s); })
#define return_UINT32(s) ACPI_DO_WHILE0 ({ \
register u32 _s = (u32) (s); \
acpi_ut_value_exit (ACPI_DEBUG_PARAMETERS, (acpi_integer) _s); \
acpi_ut_value_exit (ACPI_DEBUG_PARAMETERS, (u64) _s); \
return (_s); })
#else /* Use original less-safe macros */

Expand All @@ -434,7 +434,7 @@
acpi_ut_ptr_exit (ACPI_DEBUG_PARAMETERS, (u8 *) (s)); \
return((s)); })
#define return_VALUE(s) ACPI_DO_WHILE0 ({ \
acpi_ut_value_exit (ACPI_DEBUG_PARAMETERS, (acpi_integer) (s)); \
acpi_ut_value_exit (ACPI_DEBUG_PARAMETERS, (u64) (s)); \
return((s)); })
#define return_UINT8(s) return_VALUE(s)
#define return_UINT32(s) return_VALUE(s)
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/acobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ ACPI_OBJECT_COMMON_HEADER};

struct acpi_object_integer {
ACPI_OBJECT_COMMON_HEADER u8 fill[3]; /* Prevent warning on some compilers */
acpi_integer value;
u64 value;
};

/*
Expand Down
20 changes: 8 additions & 12 deletions drivers/acpi/acpica/acutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ char *acpi_ut_get_region_name(u8 space_id);

char *acpi_ut_get_event_name(u32 event_id);

char acpi_ut_hex_to_ascii_char(acpi_integer integer, u32 position);
char acpi_ut_hex_to_ascii_char(u64 integer, u32 position);

u8 acpi_ut_valid_object_type(acpi_object_type type);

Expand Down Expand Up @@ -279,8 +279,7 @@ acpi_ut_status_exit(u32 line_number,
void
acpi_ut_value_exit(u32 line_number,
const char *function_name,
const char *module_name,
u32 component_id, acpi_integer value);
const char *module_name, u32 component_id, u64 value);

void
acpi_ut_ptr_exit(u32 line_number,
Expand Down Expand Up @@ -324,7 +323,7 @@ acpi_ut_evaluate_object(struct acpi_namespace_node *prefix_node,
acpi_status
acpi_ut_evaluate_numeric_object(char *object_name,
struct acpi_namespace_node *device_node,
acpi_integer *value);
u64 *value);

acpi_status
acpi_ut_execute_STA(struct acpi_namespace_node *device_node, u32 *status_flags);
Expand Down Expand Up @@ -437,14 +436,12 @@ void acpi_ut_delete_generic_state(union acpi_generic_state *state);
* utmath
*/
acpi_status
acpi_ut_divide(acpi_integer in_dividend,
acpi_integer in_divisor,
acpi_integer * out_quotient, acpi_integer * out_remainder);
acpi_ut_divide(u64 in_dividend,
u64 in_divisor, u64 *out_quotient, u64 *out_remainder);

acpi_status
acpi_ut_short_divide(acpi_integer in_dividend,
u32 divisor,
acpi_integer * out_quotient, u32 * out_remainder);
acpi_ut_short_divide(u64 in_dividend,
u32 divisor, u64 *out_quotient, u32 *out_remainder);

/*
* utmisc
Expand Down Expand Up @@ -474,8 +471,7 @@ acpi_name acpi_ut_repair_name(char *name);

u8 acpi_ut_valid_acpi_char(char character, u32 position);

acpi_status
acpi_ut_strtoul64(char *string, u32 base, acpi_integer * ret_integer);
acpi_status acpi_ut_strtoul64(char *string, u32 base, u64 * ret_integer);

void ACPI_INTERNAL_VAR_XFACE
acpi_ut_predefined_warning(const char *module_name,
Expand Down
10 changes: 5 additions & 5 deletions drivers/acpi/acpica/dsfield.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info,
union acpi_parse_object *arg)
{
acpi_status status;
acpi_integer position;
u64 position;

ACPI_FUNCTION_TRACE_PTR(ds_get_field_names, info);

Expand All @@ -240,8 +240,8 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info,
switch (arg->common.aml_opcode) {
case AML_INT_RESERVEDFIELD_OP:

position = (acpi_integer) info->field_bit_position
+ (acpi_integer) arg->common.value.size;
position = (u64) info->field_bit_position
+ (u64) arg->common.value.size;

if (position > ACPI_UINT32_MAX) {
ACPI_ERROR((AE_INFO,
Expand Down Expand Up @@ -305,8 +305,8 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info,

/* Keep track of bit position for the next field */

position = (acpi_integer) info->field_bit_position
+ (acpi_integer) arg->common.value.size;
position = (u64) info->field_bit_position
+ (u64) arg->common.value.size;

if (position > ACPI_UINT32_MAX) {
ACPI_ERROR((AE_INFO,
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/dsobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ acpi_ds_init_object_from_op(struct acpi_walk_state *walk_state,

case AML_ONES_OP:

obj_desc->integer.value = ACPI_INTEGER_MAX;
obj_desc->integer.value = ACPI_UINT64_MAX;

/* Truncate value if we are executing from a 32-bit ACPI table */

Expand Down
5 changes: 2 additions & 3 deletions drivers/acpi/acpica/evregion.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ acpi_ev_execute_reg_method(union acpi_operand_object *region_obj, u32 function)
* region_offset - Where in the region to read or write
* bit_width - Field width in bits (8, 16, 32, or 64)
* Value - Pointer to in or out value, must be
* full 64-bit acpi_integer
* a full 64-bit integer
*
* RETURN: Status
*
Expand All @@ -341,8 +341,7 @@ acpi_ev_execute_reg_method(union acpi_operand_object *region_obj, u32 function)
acpi_status
acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
u32 function,
u32 region_offset,
u32 bit_width, acpi_integer * value)
u32 region_offset, u32 bit_width, u64 *value)
{
acpi_status status;
acpi_adr_space_handler handler;
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/evrgnini.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ acpi_ev_pci_config_region_setup(acpi_handle handle,
void *handler_context, void **region_context)
{
acpi_status status = AE_OK;
acpi_integer pci_value;
u64 pci_value;
struct acpi_pci_id *pci_id = *region_context;
union acpi_operand_object *handler_obj;
struct acpi_namespace_node *parent_node;
Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/exconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ static acpi_status
acpi_ex_region_read(union acpi_operand_object *obj_desc, u32 length, u8 *buffer)
{
acpi_status status;
acpi_integer value;
u64 value;
u32 region_offset = 0;
u32 i;

Expand Down
19 changes: 8 additions & 11 deletions drivers/acpi/acpica/exconvrt.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ ACPI_MODULE_NAME("exconvrt")

/* Local prototypes */
static u32
acpi_ex_convert_to_ascii(acpi_integer integer,
u16 base, u8 * string, u8 max_length);
acpi_ex_convert_to_ascii(u64 integer, u16 base, u8 *string, u8 max_length);

/*******************************************************************************
*
Expand All @@ -75,7 +74,7 @@ acpi_ex_convert_to_integer(union acpi_operand_object *obj_desc,
{
union acpi_operand_object *return_desc;
u8 *pointer;
acpi_integer result;
u64 result;
u32 i;
u32 count;
acpi_status status;
Expand Down Expand Up @@ -155,7 +154,7 @@ acpi_ex_convert_to_integer(union acpi_operand_object *obj_desc,
* Little endian is used, meaning that the first byte of the buffer
* is the LSB of the integer
*/
result |= (((acpi_integer) pointer[i]) << (i * 8));
result |= (((u64) pointer[i]) << (i * 8));
}
break;

Expand Down Expand Up @@ -285,10 +284,9 @@ acpi_ex_convert_to_buffer(union acpi_operand_object *obj_desc,
******************************************************************************/

static u32
acpi_ex_convert_to_ascii(acpi_integer integer,
u16 base, u8 * string, u8 data_width)
acpi_ex_convert_to_ascii(u64 integer, u16 base, u8 *string, u8 data_width)
{
acpi_integer digit;
u64 digit;
u32 i;
u32 j;
u32 k = 0;
Expand Down Expand Up @@ -531,10 +529,9 @@ acpi_ex_convert_to_string(union acpi_operand_object * obj_desc,
* (separated by commas or spaces)
*/
for (i = 0; i < obj_desc->buffer.length; i++) {
new_buf += acpi_ex_convert_to_ascii((acpi_integer)
obj_desc->buffer.
pointer[i], base,
new_buf, 1);
new_buf += acpi_ex_convert_to_ascii((u64) obj_desc->
buffer.pointer[i],
base, new_buf, 1);
*new_buf++ = separator; /* each separated by a comma or space */
}

Expand Down
Loading

0 comments on commit 5df7e6c

Please sign in to comment.