ACPICA branch contents
Subsystems (3)
Len Brown
reviewerHere are the patches on the acpica branch
bringing Linux up to the latest.latest
It is likely there will be some minor revisions on this branch before I include it in the acpi test branch.
Len Brown
reviewerPATCH 1/17 ACPICA: Add argument count checking to control method invocation via acpi_evaluate_object
From: Bob Moore <[email protected]>
Error if too few arguments, warning if too many. This applies only to external programmatic control method execution, not method-to-method calls within the AML.
--- drivers/acpi/namespace/nseval.c | 35 +++++++++++++++++++++++++++++++++++ include/acpi/acexcep.h | 6 ++++-- include/acpi/acstruct.h | 1 + 3 files changed, 40 insertions(+), 2 deletions(-)
drivers/acpi/namespace/nseval.c +35 -0
@@ -138,6 +138,41 @@ acpi_status acpi_ns_evaluate(struct acpi_evaluate_info * info)return_ACPI_STATUS (AE_NULL_OBJECT ); } +/* +* Calculate the number of arguments being passed to the method +*/ + + info->param_count =0 ; +if (info->parameters) { +while (info->parameters[info->param_count]) + info->param_count++; + } + +/* Error if too few arguments were passed in */ + +if (info->param_count < info->obj_desc->method.param_count) { +ACPI_ERROR ((AE_INFO , +"Insufficient arguments - " +"method [%4.4s] needs %d, found %d" , +acpi_ut_get_node_name (info->resolved_node), + info->obj_desc->method.param_count, + info->param_count)); +return_ACPI_STATUS (AE_MISSING_ARGUMENTS ); + } + +/* Just a warning if too many arguments */ + +else if (info->param_count > + info->obj_desc->method.param_count) { +ACPI_WARNING ((AE_INFO , +"Excess arguments - " +"method [%4.4s] needs %d, found %d" , +acpi_ut_get_node_name (info-> + resolved_node), + info->obj_desc->method.param_count, + info->param_count)); + } +ACPI_DUMP_PATHNAME (info->resolved_node,"Execute Method:" ,ACPI_LV_INFO , _COMPONENT);
include/acpi/acexcep.h +4 -2
@@ -108,8 +108,9 @@#define AE_BAD_HEX_CONSTANT (acpi_status) (0x0007 | AE_CODE_PROGRAMMER)#define AE_BAD_OCTAL_CONSTANT (acpi_status) (0x0008 | AE_CODE_PROGRAMMER)#define AE_BAD_DECIMAL_CONSTANT (acpi_status) (0x0009 | AE_CODE_PROGRAMMER) +#define AE_MISSING_ARGUMENTS (acpi_status) (0x000A | AE_CODE_PROGRAMMER) -#define AE_CODE_PGM_MAX 0x0009 +#define AE_CODE_PGM_MAX 0x000A/* * Acpi table exceptions
@@ -233,7 +234,8 @@ char const *acpi_gbl_exception_names_pgm[] = {"AE_ALIGNMENT" ,"AE_BAD_HEX_CONSTANT" ,"AE_BAD_OCTAL_CONSTANT" , -"AE_BAD_DECIMAL_CONSTANT" +"AE_BAD_DECIMAL_CONSTANT" , +"AE_MISSING_ARGUMENTS" }; char const *acpi_gbl_exception_names_tbl[] = {
include/acpi/acstruct.h +1 -0
@@ -189,6 +189,7 @@ struct acpi_evaluate_info {union acpi_operand_object **parameters;struct acpi_namespace_node *resolved_node;union acpi_operand_object *return_object; +u8 param_count;u8 pass_number;u8 parameter_type;u8 return_object_type;
Signature · 1 line
1.5.6.rc2.26.g8c37
Len Brown
reviewerPATCH 2/17 ACPICA: Fix for hang on GPE method invocation
In reply to Len BrownFrom: Bob Moore <[email protected]>
Fixes problem where the new method argument count validation mechanism will enter an infinite loop when a GPE method is dispatched. Problem fixed be removing the obsolete code that passes GPE block information to the notify handler via the control method parameter pointer.
--- drivers/acpi/dispatcher/dsmethod.c | 1 - drivers/acpi/dispatcher/dswstate.c | 10 ++-------- drivers/acpi/events/evgpe.c | 4 ---- drivers/acpi/events/evregion.c | 1 - drivers/acpi/namespace/nsinit.c | 1 - drivers/acpi/namespace/nsxfeval.c | 1 - drivers/acpi/parser/psxface.c | 2 +- drivers/acpi/resources/rsutils.c | 1 - drivers/acpi/utilities/uteval.c | 1 - include/acpi/acstruct.h | 7 ------- 10 files changed, 3 insertions(+), 26 deletions(-)
drivers/acpi/dispatcher/dsmethod.c +0 -1
@@ -377,7 +377,6 @@ acpi_ds_call_control_method(struct acpi_thread_state *thread, } info->parameters = &this_walk_state->operands[0 ]; - info->parameter_type =ACPI_PARAM_ARGS ; status = acpi_ds_init_aml_walk(next_walk_state, NULL, method_node, obj_desc->method.aml_start,
drivers/acpi/dispatcher/dswstate.c +2 -8
@@ -615,14 +615,8 @@ acpi_ds_init_aml_walk(struct acpi_walk_state *walk_state, walk_state->pass_number = pass_number;if (info) { -if (info->parameter_type ==ACPI_PARAM_GPE ) { - walk_state->gpe_event_info = - ACPI_CAST_PTR(struct acpi_gpe_event_info, - info->parameters); - }else { - walk_state->params = info->parameters; - walk_state->caller_return_desc = &info->return_object; - } + walk_state->params = info->parameters; + walk_state->caller_return_desc = &info->return_object; } status =acpi_ps_init_scope (&walk_state->parser_state, op);
drivers/acpi/events/evgpe.c +0 -4
@@ -555,10 +555,6 @@ static void ACPI_SYSTEM_XFACE acpi_ev_asynch_execute_gpe_method(void *context)*/ info->prefix_node = local_gpe_event_info.dispatch.method_node; - info->parameters = - ACPI_CAST_PTR(union acpi_operand_object *, - gpe_event_info); - info->parameter_type =ACPI_PARAM_GPE ; info->flags =ACPI_IGNORE_RETURN_VALUE ; status =acpi_ns_evaluate (info);
drivers/acpi/events/evregion.c +0 -1
@@ -219,7 +219,6 @@ acpi_ev_execute_reg_method(union acpi_operand_object *region_obj, u32 function) info->prefix_node = region_obj2->extra.method_REG; info->pathname =NULL ; info->parameters = args; - info->parameter_type =ACPI_PARAM_ARGS ; info->flags =ACPI_IGNORE_RETURN_VALUE ;/*
drivers/acpi/namespace/nsinit.c +0 -1
@@ -542,7 +542,6 @@ acpi_ns_init_one_device(acpi_handle obj_handle, info->prefix_node = device_node; info->pathname =METHOD_NAME__INI ; info->parameters =NULL ; - info->parameter_type =ACPI_PARAM_ARGS ; info->flags =ACPI_IGNORE_RETURN_VALUE ;/*
drivers/acpi/namespace/nsxfeval.c +0 -1
@@ -182,7 +182,6 @@ acpi_evaluate_object(acpi_handle handle, } info->pathname = pathname; - info->parameter_type =ACPI_PARAM_ARGS ;/* Convert and validate the device handle */
drivers/acpi/parser/psxface.c +1 -1
@@ -335,7 +335,7 @@ acpi_ps_update_parameter_list(struct acpi_evaluate_info *info, u16 action) {acpi_native_uint i; -if ((info->parameter_type ==ACPI_PARAM_ARGS ) && (info->parameters)) { +if (info->parameters) {/* Update reference count for each parameter */
drivers/acpi/resources/rsutils.c +0 -1
@@ -679,7 +679,6 @@ acpi_rs_set_srs_method_data(struct acpi_namespace_node *node, info->prefix_node = node; info->pathname =METHOD_NAME__SRS ; info->parameters = args; - info->parameter_type =ACPI_PARAM_ARGS ; info->flags =ACPI_IGNORE_RETURN_VALUE ;/*
drivers/acpi/utilities/uteval.c +0 -1
@@ -217,7 +217,6 @@ acpi_ut_evaluate_object(struct acpi_namespace_node *prefix_node, info->prefix_node = prefix_node; info->pathname = path; - info->parameter_type =ACPI_PARAM_ARGS ;/* Evaluate the object/method */
include/acpi/acstruct.h +0 -7
@@ -108,7 +108,6 @@ struct acpi_walk_state {union acpi_operand_object **caller_return_desc;union acpi_generic_state *control_state;/* List of control states (nested IFs) */ struct acpi_namespace_node *deferred_node;/* Used when executing deferred opcodes */ -struct acpi_gpe_event_info *gpe_event_info;/* Info for GPE (_Lxx/_Exx methods only */ union acpi_operand_object *implicit_return_obj;struct acpi_namespace_node *method_call_node;/* Called method Node */ union acpi_parse_object *method_call_op;/* method_call Op if running a method */
@@ -191,16 +190,10 @@ struct acpi_evaluate_info {union acpi_operand_object *return_object;u8 param_count;u8 pass_number; -u8 parameter_type;u8 return_object_type;u8 flags; }; -/* Types for parameter_type above */ - -#define ACPI_PARAM_ARGS 0 -#define ACPI_PARAM_GPE 1 -/* Values for Flags above */ #define ACPI_IGNORE_RETURN_VALUE 1
Signature · 1 line
1.5.6.rc2.26.g8c37
Len Brown
reviewerPATCH 3/17 ACPICA: Update tracking macros to reduce code/data size
In reply to Len BrownFrom: Jan Beulich <[email protected]>
Changed ACPI_MODULE_NAME and ACPI_FUNCTION_NAME to use arrays of strings instead of pointers to static strings. Jan Beulich and Bob Moore.
--- include/acpi/acmacros.h | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-)
include/acpi/acmacros.h +4 -6
@@ -414,7 +414,7 @@ struct acpi_integer_overlay {* error messages. The __FILE__ macro is not very useful for this, because it * often includes the entire pathname to the module */ -#define ACPI_MODULE_NAME (name) static char ACPI_UNUSED_VAR *_acpi_module_name = name; +#define ACPI_MODULE_NAME (name) static char ACPI_UNUSED_VAR _acpi_module_name[] = name;#else #define ACPI_MODULE_NAME (name)#endif
@@ -467,19 +467,17 @@ struct acpi_integer_overlay {/* * If ACPI_GET_FUNCTION_NAME was not defined in the compiler-dependent header, * define it now. This is the case where there the compiler does not support -* a __FUNCTION__ macro or equivalent. We save the function name on the -* local stack. +* a __FUNCTION__ macro or equivalent. */ #ifndef ACPI_GET_FUNCTION_NAME #define ACPI_GET_FUNCTION_NAME _acpi_function_name/* * The Name parameter should be the procedure name as a quoted string. -* This is declared as a local string ("MyFunctionName") so that it can -* be also used by the function exit macros below. +* The function name is also used by the function exit macros below. * Note: (const char) is used to be compatible with the debug interfaces * and macros such as __FUNCTION__. */ -#define ACPI_FUNCTION_NAME (name) const char *_acpi_function_name = #name; +#define ACPI_FUNCTION_NAME (name) static const char _acpi_function_name[] = #name;#else /* Compiler supports __FUNCTION__ (or equivalent) -- Ignore this macro */
Signature · 1 line
1.5.6.rc2.26.g8c37
Len Brown
reviewerPATCH 4/17 ACPICA: Fix possible negative array index in acpi_ut_validate_exception
In reply to Len BrownFrom: Bob Moore <[email protected]>
Added NULL fields to the exception string arrays to eliminate the -1 subtraction on the SubStatus field.
--- drivers/acpi/utilities/utmisc.c | 14 +++++--------- include/acpi/acexcep.h | 4 ++++ 2 files changed, 9 insertions(+), 9 deletions(-)
drivers/acpi/utilities/utmisc.c +5 -9
@@ -64,7 +64,7 @@ ACPI_MODULE_NAME("utmisc")******************************************************************************/ const char *acpi_ut_validate_exception (acpi_status status) { -acpi_status sub_status; +u32 sub_status;const char *exception =NULL ;ACPI_FUNCTION_ENTRY ();
@@ -85,32 +85,28 @@ const char *acpi_ut_validate_exception(acpi_status status)case AE_CODE_PROGRAMMER :if (sub_status <=AE_CODE_PGM_MAX ) { - exception = - acpi_gbl_exception_names_pgm[sub_status -1 ]; + exception = acpi_gbl_exception_names_pgm[sub_status]; }break ;case AE_CODE_ACPI_TABLES :if (sub_status <=AE_CODE_TBL_MAX ) { - exception = - acpi_gbl_exception_names_tbl[sub_status -1 ]; + exception = acpi_gbl_exception_names_tbl[sub_status]; }break ;case AE_CODE_AML :if (sub_status <=AE_CODE_AML_MAX ) { - exception = - acpi_gbl_exception_names_aml[sub_status -1 ]; + exception = acpi_gbl_exception_names_aml[sub_status]; }break ;case AE_CODE_CONTROL :if (sub_status <=AE_CODE_CTRL_MAX ) { - exception = - acpi_gbl_exception_names_ctrl[sub_status -1 ]; + exception = acpi_gbl_exception_names_ctrl[sub_status]; }break ;
include/acpi/acexcep.h +4 -0
@@ -226,6 +226,7 @@ char const *acpi_gbl_exception_names_env[] = { };char const *acpi_gbl_exception_names_pgm[] = { +NULL ,"AE_BAD_PARAMETER" ,"AE_BAD_CHARACTER" ,"AE_BAD_PATHNAME" ,
@@ -239,6 +240,7 @@ char const *acpi_gbl_exception_names_pgm[] = { };char const *acpi_gbl_exception_names_tbl[] = { +NULL ,"AE_BAD_SIGNATURE" ,"AE_BAD_HEADER" ,"AE_BAD_CHECKSUM" ,
@@ -248,6 +250,7 @@ char const *acpi_gbl_exception_names_tbl[] = { };char const *acpi_gbl_exception_names_aml[] = { +NULL ,"AE_AML_ERROR" ,"AE_AML_PARSE" ,"AE_AML_BAD_OPCODE" ,
@@ -285,6 +288,7 @@ char const *acpi_gbl_exception_names_aml[] = { };char const *acpi_gbl_exception_names_ctrl[] = { +NULL ,"AE_CTRL_RETURN_VALUE" ,"AE_CTRL_PENDING" ,"AE_CTRL_TERMINATE" ,
Signature · 1 line
1.5.6.rc2.26.g8c37
Len Brown
reviewerPATCH 5/17 ACPICA: Eliminate acpi_native_uint type
In reply to Len BrownFrom: Bob Moore <[email protected]>
No longer needed; replaced mostly with u32, but also acpi_size where a type that changes 32/64 bit on 32/64-bit platforms is required.
--- arch/x86/kernel/srat_32.c | 2 +- drivers/acpi/bus.c | 2 +- drivers/acpi/dispatcher/dsinit.c | 2 +- drivers/acpi/dispatcher/dsopcode.c | 2 +- drivers/acpi/dispatcher/dswstate.c | 10 +++++----- drivers/acpi/events/evevent.c | 6 +++--- drivers/acpi/events/evgpe.c | 14 ++++---------- drivers/acpi/events/evgpeblk.c | 18 ++++++++++-------- drivers/acpi/events/evmisc.c | 4 ++-- drivers/acpi/events/evregion.c | 4 ++-- drivers/acpi/events/evrgnini.c | 2 +- drivers/acpi/executer/exconfig.c | 14 +++++++------- drivers/acpi/executer/exconvrt.c | 12 ++++++------ drivers/acpi/executer/exdump.c | 2 +- drivers/acpi/executer/exfldio.c | 9 +++++---- drivers/acpi/executer/exmisc.c | 8 ++++---- drivers/acpi/executer/exregion.c | 2 +- drivers/acpi/namespace/nsdump.c | 2 +- drivers/acpi/namespace/nsload.c | 3 +-- drivers/acpi/namespace/nsparse.c | 15 +++++++-------- drivers/acpi/namespace/nsutils.c | 26 ++++++++++++-------------- drivers/acpi/namespace/nsxfeval.c | 2 +- drivers/acpi/parser/psargs.c | 4 ++-- drivers/acpi/parser/psxface.c | 2 +- drivers/acpi/resources/rscalc.c | 4 ++-- drivers/acpi/resources/rsmisc.c | 2 +- drivers/acpi/resources/rsutils.c | 12 ++++++------ drivers/acpi/tables/tbfadt.c | 6 +++--- drivers/acpi/tables/tbfind.c | 5 ++--- drivers/acpi/tables/tbinstal.c | 30 ++++++++++++++---------------- drivers/acpi/tables/tbutils.c | 15 +++++++-------- drivers/acpi/tables/tbxface.c | 28 +++++++++++++--------------- drivers/acpi/tables/tbxfroot.c | 4 ++-- drivers/acpi/utilities/utcopy.c | 4 ++-- drivers/acpi/utilities/utdebug.c | 28 +++++++++++++++++----------- drivers/acpi/utilities/utdelete.c | 2 +- drivers/acpi/utilities/uteval.c | 4 ++-- drivers/acpi/utilities/utmisc.c | 14 +++++++------- drivers/acpi/utilities/utobject.c | 4 ++-- include/acpi/acdispat.h | 2 +- include/acpi/acglobal.h | 2 +- include/acpi/acmacros.h | 24 ++++++++++++------------ include/acpi/acnamesp.h | 10 ++++------ include/acpi/acpiosxf.h | 2 +- include/acpi/acpixf.h | 8 ++++---- include/acpi/acstruct.h | 2 +- include/acpi/actables.h | 27 ++++++++++++--------------- include/acpi/actypes.h | 16 ++++++---------- include/acpi/acutils.h | 4 ++-- 49 files changed, 205 insertions(+), 221 deletions(-)
arch/x86/kernel/srat_32.c +1 -1
@@ -269,7 +269,7 @@ int __init get_memcfg_from_srat(void)struct acpi_table_header *header =NULL ;struct acpi_table_rsdp *rsdp =NULL ;struct acpi_table_rsdt *rsdt =NULL ; -acpi_native_uint rsdp_address =0 ; +u32 rsdp_address =0 ;struct acpi_static_rsdt saved_rsdt;int tables =0 ;int i =0 ;
drivers/acpi/bus.c +1 -1
@@ -612,7 +612,7 @@ static int __init acpi_bus_init_irq(void)return 0 ; } -acpi_native_uint acpi_gbl_permanent_mmap; +u8 acpi_gbl_permanent_mmap;void __init acpi_early_init (void )
drivers/acpi/dispatcher/dsinit.c +1 -1
@@ -151,7 +151,7 @@ acpi_ds_init_one_object(acpi_handle obj_handle,******************************************************************************/ acpi_status -acpi_ds_initialize_objects (acpi_native_uint table_index, +acpi_ds_initialize_objects (u32 table_index,struct acpi_namespace_node * start_node) {acpi_status status;
drivers/acpi/dispatcher/dsopcode.c +1 -1
@@ -848,7 +848,7 @@ acpi_ds_eval_table_region_operands(struct acpi_walk_state *walk_state,union acpi_operand_object **operand;struct acpi_namespace_node *node;union acpi_parse_object *next_op; -acpi_native_uint table_index; +u32 table_index;struct acpi_table_header *table;ACPI_FUNCTION_TRACE_PTR (ds_eval_table_region_operands, op);
drivers/acpi/dispatcher/dswstate.c +5 -5
@@ -70,7 +70,7 @@ acpi_status acpi_ds_result_pop(union acpi_operand_object **object, struct acpi_walk_state *walk_state) { - acpi_native_uint index; + u32 index;union acpi_generic_state *state;acpi_status status;
@@ -122,7 +122,7 @@ acpi_ds_result_pop(union acpi_operand_object **object,ACPI_DEBUG_PRINT ((ACPI_DB_EXEC ,"Obj=%p [%s] Index=%X State=%p Num=%X\n" , *object,acpi_ut_get_object_type_name (*object), - (u32 ) index, walk_state, walk_state->result_count)); + index, walk_state, walk_state->result_count));return (AE_OK ); }
@@ -146,7 +146,7 @@ acpi_ds_result_push(union acpi_operand_object * object, {union acpi_generic_state *state;acpi_status status; -acpi_native_uint index; +u32 index;ACPI_FUNCTION_NAME (ds_result_push);
@@ -400,7 +400,7 @@ void acpi_ds_obj_stack_pop_and_delete(u32 pop_count, struct acpi_walk_state *walk_state) { - acpi_native_int i; + s32 i;union acpi_operand_object *obj_desc;ACPI_FUNCTION_NAME (ds_obj_stack_pop_and_delete);
@@ -409,7 +409,7 @@ acpi_ds_obj_stack_pop_and_delete(u32 pop_count,return ; } -for (i = (acpi_native_int) (pop_count -1 ); i >=0 ; i--) { +for (i = (s32 ) pop_count -1 ; i >=0 ; i--) {if (walk_state->num_operands ==0 ) {return ; }
drivers/acpi/events/evevent.c +3 -3
@@ -188,7 +188,7 @@ acpi_status acpi_ev_install_xrupt_handlers(void)static acpi_status acpi_ev_fixed_event_initialize (void ) { -acpi_native_uint i; +u32 i;acpi_status status;/*
@@ -231,7 +231,7 @@ u32 acpi_ev_fixed_event_detect(void)u32 int_status =ACPI_INTERRUPT_NOT_HANDLED ;u32 fixed_status;u32 fixed_enable; -acpi_native_uint i; +u32 i;ACPI_FUNCTION_NAME (ev_fixed_event_detect);
@@ -260,7 +260,7 @@ u32 acpi_ev_fixed_event_detect(void)/* Found an active (signalled) event */ acpi_os_fixed_event_count (i); - int_status |=acpi_ev_fixed_event_dispatch ((u32 ) i); + int_status |=acpi_ev_fixed_event_dispatch (i); } }
drivers/acpi/events/evgpe.c +4 -10
@@ -305,7 +305,7 @@ struct acpi_gpe_event_info *acpi_ev_get_gpe_event_info(acpi_handle gpe_device, {union acpi_operand_object *obj_desc;struct acpi_gpe_block_info *gpe_block; -acpi_native_uint i; +u32 i;ACPI_FUNCTION_ENTRY ();
@@ -379,8 +379,8 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)u32 status_reg;u32 enable_reg;acpi_cpu_flags flags; -acpi_native_uint i; -acpi_native_uint j; +u32 i; +u32 j;ACPI_FUNCTION_NAME (ev_gpe_detect);
@@ -462,13 +462,7 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_xrupt_info * gpe_xrupt_list)*/ int_status |=acpi_ev_gpe_dispatch (&gpe_block-> - event_info[(i * -ACPI_GPE_REGISTER_WIDTH ) - + - j], - (u32 ) j + - gpe_register_info-> - base_gpe_number); + event_info[((acpi_size ) i *ACPI_GPE_REGISTER_WIDTH ) + j], j + gpe_register_info->base_gpe_number); } } }
drivers/acpi/events/evgpeblk.c +10 -8
@@ -189,8 +189,8 @@ acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info, struct acpi_gpe_block_info *gpe_block) {struct acpi_gpe_event_info *gpe_event_info; -acpi_native_uint i; -acpi_native_uint j; +u32 i; +u32 j;ACPI_FUNCTION_TRACE (ev_delete_gpe_handlers);
@@ -203,7 +203,8 @@ acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info,for (j =0 ; j <ACPI_GPE_REGISTER_WIDTH ; j++) { gpe_event_info = &gpe_block-> - event_info[(i *ACPI_GPE_REGISTER_WIDTH ) + j]; + event_info[((acpi_size ) i * +ACPI_GPE_REGISTER_WIDTH ) + j];if ((gpe_event_info->flags &ACPI_GPE_DISPATCH_MASK ) ==ACPI_GPE_DISPATCH_HANDLER ) {
@@ -744,8 +745,8 @@ acpi_ev_create_gpe_info_blocks(struct acpi_gpe_block_info *gpe_block)struct acpi_gpe_event_info *gpe_event_info =NULL ;struct acpi_gpe_event_info *this_event;struct acpi_gpe_register_info *this_register; -acpi_native_uint i; -acpi_native_uint j; +u32 i; +u32 j;acpi_status status;ACPI_FUNCTION_TRACE (ev_create_gpe_info_blocks);
@@ -983,8 +984,8 @@ acpi_ev_initialize_gpe_block(struct acpi_namespace_node *gpe_device,struct acpi_gpe_walk_info gpe_info;u32 wake_gpe_count;u32 gpe_enabled_count; -acpi_native_uint i; -acpi_native_uint j; +u32 i; +u32 j;ACPI_FUNCTION_TRACE (ev_initialize_gpe_block);
@@ -1033,7 +1034,8 @@ acpi_ev_initialize_gpe_block(struct acpi_namespace_node *gpe_device, gpe_event_info = &gpe_block-> - event_info[(i *ACPI_GPE_REGISTER_WIDTH ) + j]; + event_info[((acpi_size ) i * +ACPI_GPE_REGISTER_WIDTH ) + j];if (((gpe_event_info->flags &ACPI_GPE_DISPATCH_MASK ) == ACPI_GPE_DISPATCH_METHOD)
drivers/acpi/events/evmisc.c +2 -2
@@ -575,7 +575,7 @@ acpi_status acpi_ev_release_global_lock(void)void acpi_ev_terminate (void ) { -acpi_native_uint i; +u32 i;acpi_status status;ACPI_FUNCTION_TRACE (ev_terminate);
@@ -589,7 +589,7 @@ void acpi_ev_terminate(void)/* Disable all fixed events */ for (i =0 ; i <ACPI_NUM_FIXED_EVENTS ; i++) { - status =acpi_disable_event ((u32 ) i,0 ); + status =acpi_disable_event (i,0 );if (ACPI_FAILURE (status)) { ACPI_ERROR((AE_INFO, "Could not disable fixed event %d",
drivers/acpi/events/evregion.c +2 -2
@@ -81,7 +81,7 @@ acpi_ev_install_handler(acpi_handle obj_handle,acpi_status acpi_ev_install_region_handlers (void ) {acpi_status status; -acpi_native_uint i; +u32 i;ACPI_FUNCTION_TRACE (ev_install_region_handlers);
@@ -151,7 +151,7 @@ acpi_status acpi_ev_install_region_handlers(void)acpi_status acpi_ev_initialize_op_regions (void ) {acpi_status status; -acpi_native_uint i; +u32 i;ACPI_FUNCTION_TRACE (ev_initialize_op_regions);
drivers/acpi/events/evrgnini.c +1 -1
@@ -380,7 +380,7 @@ static u8 acpi_ev_is_pci_root_bridge(struct acpi_namespace_node *node)acpi_status status;struct acpica_device_id hid;struct acpi_compatible_id_list *cid; -acpi_native_uint i; +u32 i;/* * Get the _HID and check for a PCI Root Bridge
drivers/acpi/executer/exconfig.c +7 -7
@@ -53,7 +53,7 @@ ACPI_MODULE_NAME("exconfig")/* Local prototypes */ static acpi_status -acpi_ex_add_table (acpi_native_uint table_index, +acpi_ex_add_table (u32 table_index,struct acpi_namespace_node *parent_node,union acpi_operand_object **ddb_handle);
@@ -73,7 +73,7 @@ acpi_ex_add_table(acpi_native_uint table_index,******************************************************************************/ static acpi_status -acpi_ex_add_table (acpi_native_uint table_index, +acpi_ex_add_table (u32 table_index,struct acpi_namespace_node *parent_node,union acpi_operand_object **ddb_handle) {
@@ -128,12 +128,12 @@ acpi_ex_load_table_op(struct acpi_walk_state *walk_state, {acpi_status status;union acpi_operand_object **operand = &walk_state->operands[0 ]; -acpi_native_uint table_index;struct acpi_namespace_node *parent_node;struct acpi_namespace_node *start_node;struct acpi_namespace_node *parameter_node =NULL ;union acpi_operand_object *ddb_handle;struct acpi_table_header *table; +u32 table_index;ACPI_FUNCTION_TRACE (ex_load_table_op);
@@ -280,7 +280,7 @@ acpi_ex_load_op(union acpi_operand_object *obj_desc, {union acpi_operand_object *ddb_handle;struct acpi_table_desc table_desc; -acpi_native_uint table_index; +u32 table_index;acpi_status status;u32 length;
@@ -437,7 +437,7 @@ acpi_status acpi_ex_unload_table(union acpi_operand_object *ddb_handle) {acpi_status status =AE_OK ;union acpi_operand_object *table_desc = ddb_handle; -acpi_native_uint table_index; +u32 table_index;struct acpi_table_header *table;ACPI_FUNCTION_TRACE (ex_unload_table);
@@ -454,9 +454,9 @@ acpi_status acpi_ex_unload_table(union acpi_operand_object *ddb_handle)return_ACPI_STATUS (AE_BAD_PARAMETER ); } -/* Get the table index from the ddb_handle */ +/* Get the table index from the ddb_handle (acpi_size for 64-bit case) */ - table_index = (acpi_native_uint ) table_desc->reference.object; + table_index = (u32 ) (acpi_size ) table_desc->reference.object;/* Invoke table handler if present */
drivers/acpi/executer/exconvrt.c +6 -6
@@ -288,11 +288,11 @@ acpi_ex_convert_to_ascii(acpi_integer integer, u16 base, u8 * string, u8 data_width) { acpi_integer digit; -acpi_native_uint i; -acpi_native_uint j; -acpi_native_uint k =0 ; -acpi_native_uint hex_length; -acpi_native_uint decimal_length; +u32 i; +u32 j; +u32 k =0 ; +u32 hex_length; +u32 decimal_length;u32 remainder;u8 supress_zeros;
@@ -348,7 +348,7 @@ acpi_ex_convert_to_ascii(acpi_integer integer,/* hex_length: 2 ascii hex chars per data byte */ - hex_length = (acpi_native_uint )ACPI_MUL_2 (data_width); + hex_length =ACPI_MUL_2 (data_width);for (i =0 , j = (hex_length -1 ); i < hex_length; i++, j--) {/* Get one hex digit, most significant digits first */
drivers/acpi/executer/exdump.c +1 -1
@@ -775,7 +775,7 @@ acpi_ex_dump_operands(union acpi_operand_object **operands,u32 num_levels, char *note, char *module_name, u32 line_number) { - acpi_native_uint i; + u32 i;ACPI_FUNCTION_NAME (ex_dump_operands);
drivers/acpi/executer/exfldio.c +5 -4
@@ -153,14 +153,15 @@ acpi_ex_setup_region(union acpi_operand_object *obj_desc,/* * Slack mode only: We will go ahead and allow access to this * field if it is within the region length rounded up to the next -* access width boundary. +* access width boundary. acpi_size cast for 64-bit compile. */ if (ACPI_ROUND_UP (rgn_desc->region.length, obj_desc->common_field. access_byte_width) >= - (obj_desc->common_field.base_byte_offset + - (acpi_native_uint ) obj_desc->common_field. - access_byte_width + field_datum_byte_offset)) { + ((acpi_size ) obj_desc->common_field. + base_byte_offset + + obj_desc->common_field.access_byte_width + + field_datum_byte_offset)) {return_ACPI_STATUS (AE_OK ); } }
drivers/acpi/executer/exmisc.c +4 -4
@@ -329,8 +329,8 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0,/* Result of two Strings is a String */ - return_desc =acpi_ut_create_string_object ((acpi_size) - (operand0->string. + return_desc =acpi_ut_create_string_object (((acpi_size ) + operand0->string. length + local_operand1-> string.length));
@@ -352,8 +352,8 @@ acpi_ex_do_concatenate(union acpi_operand_object *operand0,/* Result of two Buffers is a Buffer */ - return_desc =acpi_ut_create_buffer_object ((acpi_size) - (operand0->buffer. + return_desc =acpi_ut_create_buffer_object (((acpi_size ) + operand0->buffer. length + local_operand1-> buffer.length));
drivers/acpi/executer/exregion.c +1 -1
@@ -156,7 +156,7 @@ acpi_ex_system_memory_space_handler(u32 function,/* Create a new mapping starting at the address given */ mem_info->mapped_logical_address = -acpi_os_map_memory ((acpi_native_uint ) address, window_size); +acpi_os_map_memory ((acpi_physical_address ) address, window_size);if (!mem_info->mapped_logical_address) { ACPI_ERROR((AE_INFO, "Could not map memory at %8.8X%8.8X, size %X",
drivers/acpi/namespace/nsdump.c +1 -1
@@ -73,7 +73,7 @@ acpi_ns_dump_one_device(acpi_handle obj_handle,void acpi_ns_print_pathname (u32 num_segments,char *pathname) { -acpi_native_uint i; +u32 i;ACPI_FUNCTION_NAME (ns_print_pathname);
drivers/acpi/namespace/nsload.c +1 -2
@@ -71,8 +71,7 @@ static acpi_status acpi_ns_delete_subtree(acpi_handle start_handle);******************************************************************************/ acpi_status -acpi_ns_load_table (acpi_native_uint table_index, -struct acpi_namespace_node *node) +acpi_ns_load_table (u32 table_index,struct acpi_namespace_node *node) {acpi_status status;
drivers/acpi/namespace/nsparse.c +7 -8
@@ -63,13 +63,13 @@ ACPI_MODULE_NAME("nsparse")* ******************************************************************************/ acpi_status -acpi_ns_one_complete_parse (acpi_native_uint pass_number, -acpi_native_uint table_index, -struct acpi_namespace_node * start_node) +acpi_ns_one_complete_parse (u32 pass_number, +u32 table_index, +struct acpi_namespace_node *start_node) {union acpi_parse_object *parse_root;acpi_status status; -acpi_native_uint aml_length; +u32 aml_length;u8 *aml_start;struct acpi_walk_state *walk_state;struct acpi_table_header *table;
@@ -112,8 +112,8 @@ acpi_ns_one_complete_parse(acpi_native_uint pass_number, aml_start = (u8 *) table +sizeof (struct acpi_table_header ); aml_length = table->length -sizeof (struct acpi_table_header ); status =acpi_ds_init_aml_walk (walk_state, parse_root,NULL , - aml_start, (u32 ) aml_length, -NULL , (u8 ) pass_number); + aml_start, aml_length,NULL , + (u8 ) pass_number); }if (ACPI_FAILURE (status)) {
@@ -158,8 +158,7 @@ acpi_ns_one_complete_parse(acpi_native_uint pass_number,******************************************************************************/ acpi_status -acpi_ns_parse_table (acpi_native_uint table_index, -struct acpi_namespace_node *start_node) +acpi_ns_parse_table (u32 table_index,struct acpi_namespace_node *start_node) {acpi_status status;
drivers/acpi/namespace/nsutils.c +12 -14
@@ -365,7 +365,7 @@ acpi_status acpi_ns_build_internal_name(struct acpi_namestring_info *info)char *internal_name = info->internal_name;char *external_name = info->next_external_char;char *result =NULL ; -acpi_native_uint i; +u32 i;ACPI_FUNCTION_TRACE (ns_build_internal_name);
@@ -400,12 +400,11 @@ acpi_status acpi_ns_build_internal_name(struct acpi_namestring_info *info) result = &internal_name[i]; }else if (num_segments ==2 ) { internal_name[i] =AML_DUAL_NAME_PREFIX ; - result = &internal_name[(acpi_native_uint) (i +1 )]; + result = &internal_name[(acpi_size ) i +1 ]; }else { internal_name[i] =AML_MULTI_NAME_PREFIX_OP ; - internal_name[(acpi_native_uint) (i +1 )] = - (char )num_segments; - result = &internal_name[(acpi_native_uint) (i +2 )]; + internal_name[(acpi_size ) i +1 ] = (char )num_segments; + result = &internal_name[(acpi_size ) i +2 ]; } }
@@ -531,12 +530,12 @@ acpi_ns_externalize_name(u32 internal_name_length,char *internal_name, u32 * converted_name_length, char **converted_name) { - acpi_native_uint names_index = 0; -acpi_native_uint num_segments =0 ; -acpi_native_uint required_length; -acpi_native_uint prefix_length =0 ; -acpi_native_uint i =0 ; -acpi_native_uint j =0 ; + u32 names_index = 0; +u32 num_segments =0 ; +u32 required_length; +u32 prefix_length =0 ; +u32 i =0 ; +u32 j =0 ;ACPI_FUNCTION_TRACE (ns_externalize_name);
@@ -582,9 +581,8 @@ acpi_ns_externalize_name(u32 internal_name_length,/* <count> 4-byte names */ names_index = prefix_length +2 ; - num_segments = (acpi_native_uint ) (u8 ) - internal_name[(acpi_native_uint) - (prefix_length +1 )]; + num_segments = (u8 ) + internal_name[(acpi_size ) prefix_length +1 ];break ;case AML_DUAL_NAME_PREFIX :
drivers/acpi/namespace/nsxfeval.c +1 -1
@@ -441,7 +441,7 @@ acpi_ns_get_device_callback(acpi_handle obj_handle,u32 flags;struct acpica_device_id hid;struct acpi_compatible_id_list *cid; -acpi_native_uint i; +u32 i;int found; status =acpi_ut_acquire_mutex (ACPI_MTX_NAMESPACE );
drivers/acpi/parser/psargs.c +2 -2
@@ -76,7 +76,7 @@ acpi_ps_get_next_package_length(struct acpi_parse_state *parser_state) {u8 *aml = parser_state->aml;u32 package_length =0 ; -acpi_native_uint byte_count; +u32 byte_count;u8 byte_zero_mask =0x3F ;/* Default [0:5] */ ACPI_FUNCTION_TRACE (ps_get_next_package_length);
@@ -86,7 +86,7 @@ acpi_ps_get_next_package_length(struct acpi_parse_state *parser_state)* used to encode the package length, either 0,1,2, or 3 */ byte_count = (aml[0 ] >>6 ); - parser_state->aml += (byte_count +1 ); + parser_state->aml += ((acpi_size ) byte_count +1 );/* Get bytes 3, 2, 1 as needed */
drivers/acpi/parser/psxface.c +1 -1
@@ -333,7 +333,7 @@ acpi_status acpi_ps_execute_method(struct acpi_evaluate_info *info)static void acpi_ps_update_parameter_list (struct acpi_evaluate_info *info,u16 action) { -acpi_native_uint i; +u32 i;if (info->parameters) {
drivers/acpi/resources/rscalc.c +2 -2
@@ -73,7 +73,7 @@ acpi_rs_stream_option_length(u32 resource_length, u32 minimum_total_length);static u8 acpi_rs_count_set_bits (u16 bit_field) { -acpi_native_uint bits_set; +u8 bits_set;ACPI_FUNCTION_ENTRY ();
@@ -84,7 +84,7 @@ static u8 acpi_rs_count_set_bits(u16 bit_field) bit_field &= (u16) (bit_field -1 ); } -return ((u8 ) bits_set); +return bits_set; }/*******************************************************************************
drivers/acpi/resources/rsmisc.c +1 -1
@@ -82,7 +82,7 @@ acpi_rs_convert_aml_to_resource(struct acpi_resource *resource,ACPI_FUNCTION_TRACE (rs_convert_aml_to_resource); -if (((acpi_native_uint ) resource) &0x3 ) { +if (((acpi_size ) resource) &0x3 ) {/* Each internal resource struct is expected to be 32-bit aligned */
drivers/acpi/resources/rsutils.c +6 -6
@@ -62,7 +62,7 @@ ACPI_MODULE_NAME("rsutils")******************************************************************************/ u8 acpi_rs_decode_bitmask (u16 mask,u8 * list) { -acpi_native_uint i; +u8 i;u8 bit_count;ACPI_FUNCTION_ENTRY ();
@@ -71,7 +71,7 @@ u8 acpi_rs_decode_bitmask(u16 mask, u8 * list)for (i =0 , bit_count =0 ; mask; i++) {if (mask &0x0001 ) { - list[bit_count] = (u8 ) i; + list[bit_count] = i; bit_count++; }
@@ -96,8 +96,8 @@ u8 acpi_rs_decode_bitmask(u16 mask, u8 * list)u16 acpi_rs_encode_bitmask (u8 * list,u8 count) { -acpi_native_uint i; -acpi_native_uint mask; +u32 i; +u16 mask;ACPI_FUNCTION_ENTRY ();
@@ -107,7 +107,7 @@ u16 acpi_rs_encode_bitmask(u8 * list, u8 count) mask |= (0x1 << list[i]); } -return ((u16 ) mask); +return mask; }/*******************************************************************************
@@ -130,7 +130,7 @@ u16 acpi_rs_encode_bitmask(u8 * list, u8 count)void acpi_rs_move_data (void *destination,void *source,u16 item_count,u8 move_type) { -acpi_native_uint i; +u32 i;ACPI_FUNCTION_ENTRY ();
drivers/acpi/tables/tbfadt.c +3 -3
@@ -155,7 +155,7 @@ acpi_tb_init_generic_address(struct acpi_generic_address *generic_address,* ******************************************************************************/ -void acpi_tb_parse_fadt (acpi_native_uint table_index,u8 flags) +void acpi_tb_parse_fadt (u32 table_index,u8 flags) {u32 length;struct acpi_table_header *table;
@@ -280,7 +280,7 @@ static void acpi_tb_convert_fadt(void) {u8 pm1_register_length;struct acpi_generic_address *target; -acpi_native_uint i; +u32 i;/* Update the local FADT table header length */
@@ -396,7 +396,7 @@ static void acpi_tb_validate_fadt(void)u32 *address32;struct acpi_generic_address *address64;u8 length; -acpi_native_uint i; +u32 i;/* Examine all of the 64-bit extended address fields (X fields) */
drivers/acpi/tables/tbfind.c +2 -3
@@ -65,10 +65,9 @@ ACPI_MODULE_NAME("tbfind")******************************************************************************/ acpi_status acpi_tb_find_table (char *signature, -char *oem_id, -char *oem_table_id,acpi_native_uint * table_index) +char *oem_id,char *oem_table_id,u32 *table_index) { -acpi_native_uint i; +u32 i;acpi_status status;struct acpi_table_header header;
drivers/acpi/tables/tbinstal.c +14 -16
@@ -107,11 +107,10 @@ acpi_status acpi_tb_verify_table(struct acpi_table_desc *table_desc)******************************************************************************/ acpi_status -acpi_tb_add_table (struct acpi_table_desc *table_desc, -acpi_native_uint * table_index) +acpi_tb_add_table (struct acpi_table_desc *table_desc,u32 *table_index) { -acpi_native_uint i; -acpi_native_uint length; +u32 i; +u32 length;acpi_status status =AE_OK ;ACPI_FUNCTION_TRACE (tb_add_table);
@@ -207,8 +206,8 @@ acpi_status acpi_tb_resize_root_table_list(void)/* Increase the Table Array size */ - tables =ACPI_ALLOCATE_ZEROED ((acpi_gbl_root_table_list.size + -ACPI_ROOT_TABLE_SIZE_INCREMENT ) + tables =ACPI_ALLOCATE_ZEROED (((acpi_size ) acpi_gbl_root_table_list. + size +ACPI_ROOT_TABLE_SIZE_INCREMENT ) *sizeof (struct acpi_table_desc ));if (!tables) { ACPI_ERROR((AE_INFO,
@@ -220,7 +219,7 @@ acpi_status acpi_tb_resize_root_table_list(void)if (acpi_gbl_root_table_list.tables) {ACPI_MEMCPY (tables, acpi_gbl_root_table_list.tables, - acpi_gbl_root_table_list.size * + (acpi_size ) acpi_gbl_root_table_list.size *sizeof (struct acpi_table_desc ));if (acpi_gbl_root_table_list.flags &ACPI_ROOT_ORIGIN_ALLOCATED ) {
@@ -253,7 +252,7 @@ acpi_status acpi_tb_resize_root_table_list(void)acpi_status acpi_tb_store_table (acpi_physical_address address,struct acpi_table_header *table, -u32 length,u8 flags,acpi_native_uint * table_index) +u32 length,u8 flags,u32 *table_index) {acpi_status status =AE_OK ;
@@ -334,7 +333,7 @@ void acpi_tb_delete_table(struct acpi_table_desc *table_desc)void acpi_tb_terminate (void ) { -acpi_native_uint i; +u32 i;ACPI_FUNCTION_TRACE (tb_terminate);
@@ -374,7 +373,7 @@ void acpi_tb_terminate(void)* ******************************************************************************/ -void acpi_tb_delete_namespace_by_owner (acpi_native_uint table_index) +void acpi_tb_delete_namespace_by_owner (u32 table_index) {acpi_owner_id owner_id;
@@ -403,7 +402,7 @@ void acpi_tb_delete_namespace_by_owner(acpi_native_uint table_index)* ******************************************************************************/ -acpi_status acpi_tb_allocate_owner_id (acpi_native_uint table_index) +acpi_status acpi_tb_allocate_owner_id (u32 table_index) {acpi_status status =AE_BAD_PARAMETER ;
@@ -431,7 +430,7 @@ acpi_status acpi_tb_allocate_owner_id(acpi_native_uint table_index)* ******************************************************************************/ -acpi_status acpi_tb_release_owner_id (acpi_native_uint table_index) +acpi_status acpi_tb_release_owner_id (u32 table_index) {acpi_status status =AE_BAD_PARAMETER ;
@@ -462,8 +461,7 @@ acpi_status acpi_tb_release_owner_id(acpi_native_uint table_index)* ******************************************************************************/ -acpi_status -acpi_tb_get_owner_id (acpi_native_uint table_index,acpi_owner_id * owner_id) +acpi_status acpi_tb_get_owner_id (u32 table_index,acpi_owner_id *owner_id) {acpi_status status =AE_BAD_PARAMETER ;
@@ -490,7 +488,7 @@ acpi_tb_get_owner_id(acpi_native_uint table_index, acpi_owner_id * owner_id)* ******************************************************************************/ -u8 acpi_tb_is_table_loaded (acpi_native_uint table_index) +u8 acpi_tb_is_table_loaded (u32 table_index) {u8 is_loaded = FALSE;
@@ -518,7 +516,7 @@ u8 acpi_tb_is_table_loaded(acpi_native_uint table_index)* ******************************************************************************/ -void acpi_tb_set_table_loaded_flag (acpi_native_uint table_index,u8 is_loaded) +void acpi_tb_set_table_loaded_flag (u32 table_index,u8 is_loaded) { (void )acpi_ut_acquire_mutex (ACPI_MTX_TABLES );
drivers/acpi/tables/tbutils.c +7 -8
@@ -49,8 +49,8 @@ ACPI_MODULE_NAME("tbutils")/* Local prototypes */ static acpi_physical_address -acpi_tb_get_root_table_entry (u8 * table_entry, -acpi_native_uint table_entry_size); +acpi_tb_get_root_table_entry (u8 *table_entry,u32 table_entry_size); +/******************************************************************************* * * FUNCTION: acpi_tb_check_xsdt
@@ -238,7 +238,7 @@ acpi_status acpi_tb_verify_checksum(struct acpi_table_header *table, u32 length)* ******************************************************************************/ -u8 acpi_tb_checksum (u8 * buffer,acpi_native_uint length) +u8 acpi_tb_checksum (u8 *buffer,u32 length) {u8 sum =0 ;u8 *end = buffer + length;
@@ -268,7 +268,7 @@ u8 acpi_tb_checksum(u8 * buffer, acpi_native_uint length)void acpi_tb_install_table (acpi_physical_address address, -u8 flags,char *signature,acpi_native_uint table_index) +u8 flags,char *signature,u32 table_index) {struct acpi_table_header *table;
@@ -336,8 +336,7 @@ acpi_tb_install_table(acpi_physical_address address,******************************************************************************/ static acpi_physical_address -acpi_tb_get_root_table_entry (u8 * table_entry, -acpi_native_uint table_entry_size) +acpi_tb_get_root_table_entry (u8 *table_entry,u32 table_entry_size) {u64 address64;
@@ -395,8 +394,8 @@ acpi_status __init acpi_tb_parse_root_table(acpi_physical_address rsdp_address, u8 flags) {struct acpi_table_rsdp *rsdp; -acpi_native_uint table_entry_size; -acpi_native_uint i; +u32 table_entry_size; +u32 i;u32 table_count;struct acpi_table_header *table;acpi_physical_address address;
drivers/acpi/tables/tbxface.c +13 -15
@@ -125,7 +125,7 @@ acpi_initialize_tables(struct acpi_table_desc * initial_table_array,/* Root Table Array has been statically allocated by the host */ ACPI_MEMSET (initial_table_array,0 , - initial_table_count * + (acpi_size ) initial_table_count *sizeof (struct acpi_table_desc )); acpi_gbl_root_table_list.tables = initial_table_array;
@@ -183,9 +183,9 @@ acpi_status acpi_reallocate_root_table(void)return_ACPI_STATUS (AE_SUPPORT ); } - new_size = - (acpi_gbl_root_table_list.count + -ACPI_ROOT_TABLE_SIZE_INCREMENT ) *sizeof (struct acpi_table_desc ); + new_size = ((acpi_size ) acpi_gbl_root_table_list.count + +ACPI_ROOT_TABLE_SIZE_INCREMENT ) * +sizeof (struct acpi_table_desc );/* Create new array and copy the old array */
@@ -222,7 +222,7 @@ acpi_status acpi_reallocate_root_table(void)acpi_status acpi_load_table (struct acpi_table_header *table_ptr) {acpi_status status; -acpi_native_uint table_index; +u32 table_index;struct acpi_table_desc table_desc;if (!table_ptr)
@@ -264,11 +264,10 @@ ACPI_EXPORT_SYMBOL(acpi_load_table)*****************************************************************************/ acpi_status acpi_get_table_header (char *signature, -acpi_native_uint instance, -struct acpi_table_header * out_table_header) +u32 instance,struct acpi_table_header *out_table_header) { -acpi_native_uint i; -acpi_native_uint j; +u32 i; +u32 j;struct acpi_table_header *header;/* Parameter validation */
@@ -378,10 +377,10 @@ ACPI_EXPORT_SYMBOL(acpi_unload_table_id)*****************************************************************************/ acpi_status acpi_get_table (char *signature, -acpi_native_uint instance,struct acpi_table_header **out_table) +u32 instance,struct acpi_table_header **out_table) { -acpi_native_uint i; -acpi_native_uint j; +u32 i; +u32 j;acpi_status status;/* Parameter validation */
@@ -435,8 +434,7 @@ ACPI_EXPORT_SYMBOL(acpi_get_table)* ******************************************************************************/ acpi_status -acpi_get_table_by_index (acpi_native_uint table_index, -struct acpi_table_header ** table) +acpi_get_table_by_index (u32 table_index,struct acpi_table_header **table) {acpi_status status;
@@ -493,7 +491,7 @@ static acpi_status acpi_tb_load_namespace(void) {acpi_status status;struct acpi_table_header *table; -acpi_native_uint i; +u32 i;ACPI_FUNCTION_TRACE (tb_load_namespace);
drivers/acpi/tables/tbxfroot.c +2 -2
@@ -118,7 +118,7 @@ static acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp *rsdp)* ******************************************************************************/ -acpi_status acpi_find_root_pointer (acpi_native_uint * table_address) +acpi_status acpi_find_root_pointer (acpi_size *table_address) {u8 *table_ptr;u8 *mem_rover;
@@ -153,7 +153,7 @@ acpi_status acpi_find_root_pointer(acpi_native_uint * table_address)* 1b) Search EBDA paragraphs (EBDA is required to be a * minimum of 1_k length) */ - table_ptr =acpi_os_map_memory ((acpi_native_uint ) + table_ptr =acpi_os_map_memory ((acpi_physical_address ) physical_address,ACPI_EBDA_WINDOW_SIZE );if (!table_ptr) {
drivers/acpi/utilities/utcopy.c +2 -2
@@ -572,7 +572,7 @@ acpi_ut_copy_epackage_to_ipackage(union acpi_object *external_object,acpi_status status =AE_OK ;union acpi_operand_object *package_object;union acpi_operand_object **package_elements; -acpi_native_uint i; +u32 i;ACPI_FUNCTION_TRACE (ut_copy_epackage_to_ipackage);
@@ -599,7 +599,7 @@ acpi_ut_copy_epackage_to_ipackage(union acpi_object *external_object,/* Truncate package and delete it */ - package_object->package.count = (u32 ) i; + package_object->package.count = i; package_elements[i] =NULL ;acpi_ut_remove_reference (package_object);return_ACPI_STATUS (status);
drivers/acpi/utilities/utdebug.c +17 -11
@@ -519,8 +519,8 @@ acpi_ut_ptr_exit(u32 line_number,void acpi_ut_dump_buffer2 (u8 * buffer,u32 count,u32 display) { -acpi_native_uint i =0 ; -acpi_native_uint j; +u32 i =0 ; +u32 j;u32 temp32;u8 buf_char;
@@ -539,7 +539,7 @@ void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display)/* Print current offset */ -acpi_os_printf ("%6.4X: " , (u32 ) i); +acpi_os_printf ("%6.4X: " , i);/* Print 16 hex chars */
@@ -549,7 +549,7 @@ void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display)/* Dump fill spaces */ acpi_os_printf ("%*s" , ((display *2 ) +1 )," " ); - j += (acpi_native_uint ) display; + j += display;continue ; }
@@ -557,32 +557,38 @@ void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display)case DB_BYTE_DISPLAY :default :/* Default is BYTE display */ -acpi_os_printf ("%02X " , buffer[i + j]); +acpi_os_printf ("%02X " , + buffer[(acpi_size ) i + j]);break ;case DB_WORD_DISPLAY : -ACPI_MOVE_16_TO_32 (&temp32, &buffer[i + j]); +ACPI_MOVE_16_TO_32 (&temp32, + &buffer[(acpi_size ) i + j]);acpi_os_printf ("%04X " , temp32);break ;case DB_DWORD_DISPLAY : -ACPI_MOVE_32_TO_32 (&temp32, &buffer[i + j]); +ACPI_MOVE_32_TO_32 (&temp32, + &buffer[(acpi_size ) i + j]);acpi_os_printf ("%08X " , temp32);break ;case DB_QWORD_DISPLAY : -ACPI_MOVE_32_TO_32 (&temp32, &buffer[i + j]); +ACPI_MOVE_32_TO_32 (&temp32, + &buffer[(acpi_size ) i + j]);acpi_os_printf ("%08X" , temp32); -ACPI_MOVE_32_TO_32 (&temp32, &buffer[i + j +4 ]); +ACPI_MOVE_32_TO_32 (&temp32, + &buffer[(acpi_size ) i + j + +4 ]);acpi_os_printf ("%08X " , temp32);break ; } - j += (acpi_native_uint ) display; + j += display; }/*
@@ -596,7 +602,7 @@ void acpi_ut_dump_buffer2(u8 * buffer, u32 count, u32 display)return ; } - buf_char = buffer[i + j]; + buf_char = buffer[(acpi_size ) i + j];if (ACPI_IS_PRINT (buf_char)) {acpi_os_printf ("%c" , buf_char); }else {
drivers/acpi/utilities/utdelete.c +1 -1
@@ -442,7 +442,7 @@ acpi_ut_update_object_reference(union acpi_operand_object *object, u16 action)union acpi_generic_state *state_list =NULL ;union acpi_operand_object *next_object =NULL ;union acpi_generic_state *state; -acpi_native_uint i; +u32 i;ACPI_FUNCTION_TRACE_PTR (ut_update_object_reference, object);
drivers/acpi/utilities/uteval.c +2 -2
@@ -97,7 +97,7 @@ acpi_status acpi_ut_osi_implementation(struct acpi_walk_state *walk_state)acpi_status status;union acpi_operand_object *string_desc;union acpi_operand_object *return_desc; -acpi_native_uint i; +u32 i;ACPI_FUNCTION_TRACE (ut_osi_implementation);
@@ -513,7 +513,7 @@ acpi_ut_execute_CID(struct acpi_namespace_node * device_node,u32 count;u32 size;struct acpi_compatible_id_list *cid_list; -acpi_native_uint i; +u32 i;ACPI_FUNCTION_TRACE (ut_execute_CID);
drivers/acpi/utilities/utmisc.c +7 -7
@@ -161,9 +161,9 @@ u8 acpi_ut_is_aml_table(struct acpi_table_header *table)acpi_status acpi_ut_allocate_owner_id (acpi_owner_id * owner_id) { -acpi_native_uint i; -acpi_native_uint j; -acpi_native_uint k; +u32 i; +u32 j; +u32 k;acpi_status status;ACPI_FUNCTION_TRACE (ut_allocate_owner_id);
@@ -269,7 +269,7 @@ void acpi_ut_release_owner_id(acpi_owner_id * owner_id_ptr) {acpi_owner_id owner_id = *owner_id_ptr;acpi_status status; -acpi_native_uint index; +u32 index;u32 bit;ACPI_FUNCTION_TRACE_U32 (ut_release_owner_id, owner_id);
@@ -589,7 +589,7 @@ acpi_ut_display_init_pathname(u8 type,* ******************************************************************************/ -u8 acpi_ut_valid_acpi_char (char character,acpi_native_uint position) +u8 acpi_ut_valid_acpi_char (char character,u32 position) { if (!((character >= 'A' && character <= 'Z') ||
@@ -624,7 +624,7 @@ u8 acpi_ut_valid_acpi_char(char character, acpi_native_uint position)u8 acpi_ut_valid_acpi_name (u32 name) { -acpi_native_uint i; +u32 i;ACPI_FUNCTION_ENTRY ();
@@ -653,7 +653,7 @@ u8 acpi_ut_valid_acpi_name(u32 name)acpi_name acpi_ut_repair_name (char *name) { -acpi_native_uint i; +u32 i;char new_name[ACPI_NAME_SIZE ];for (i =0 ; i <ACPI_NAME_SIZE ; i++) {
drivers/acpi/utilities/utobject.c +2 -2
@@ -175,8 +175,8 @@ union acpi_operand_object *acpi_ut_create_package_object(u32 count)* Create the element array. Count+1 allows the array to be null * terminated. */ - package_elements =ACPI_ALLOCATE_ZEROED ((acpi_size) - (count +1 ) *sizeof (void *)); + package_elements =ACPI_ALLOCATE_ZEROED (((acpi_size ) count + +1 ) *sizeof (void *));if (!package_elements) {acpi_ut_remove_reference (package_desc);return_PTR (NULL );
include/acpi/acdispat.h +1 -1
@@ -221,7 +221,7 @@ acpi_ds_method_error(acpi_status status, struct acpi_walk_state *walk_state);* dsinit */ acpi_status -acpi_ds_initialize_objects (acpi_native_uint table_index, +acpi_ds_initialize_objects (u32 table_index,struct acpi_namespace_node *start_node);/*
include/acpi/acglobal.h +1 -1
@@ -140,7 +140,7 @@ ACPI_EXTERN u32 acpi_gbl_trace_flags;*/ ACPI_EXTERN struct acpi_internal_rsdt acpi_gbl_root_table_list; ACPI_EXTERN struct acpi_table_fadt acpi_gbl_FADT; -extern acpi_native_uint acpi_gbl_permanent_mmap; +extern u8 acpi_gbl_permanent_mmap;/* These addresses are calculated from FADT address values */
include/acpi/acmacros.h +12 -12
@@ -80,12 +80,12 @@*/ #define ACPI_CAST_PTR (t, p) ((t *) (acpi_uintptr_t) (p))#define ACPI_CAST_INDIRECT_PTR (t, p) ((t **) (acpi_uintptr_t) (p)) -#define ACPI_ADD_PTR (t,a,b) ACPI_CAST_PTR (t, (ACPI_CAST_PTR (u8,(a)) + (acpi_native_uint)(b))) -#define ACPI_PTR_DIFF (a,b) (acpi_native_uint) (ACPI_CAST_PTR (u8,(a)) - ACPI_CAST_PTR (u8,(b))) +#define ACPI_ADD_PTR (t, a, b) ACPI_CAST_PTR (t, (ACPI_CAST_PTR (u8,(a)) + (acpi_size)(b))) +#define ACPI_PTR_DIFF (a, b) (acpi_size) (ACPI_CAST_PTR (u8,(a)) - ACPI_CAST_PTR (u8,(b)))/* Pointer/Integer type conversions */ -#define ACPI_TO_POINTER (i) ACPI_ADD_PTR (void,(void *) NULL,(acpi_native_uint) i) +#define ACPI_TO_POINTER (i) ACPI_ADD_PTR (void, (void *) NULL, (acpi_size) i)#define ACPI_TO_INTEGER (p) ACPI_PTR_DIFF (p,(void *) NULL)#define ACPI_OFFSET (d,f) (acpi_size) ACPI_PTR_DIFF (&(((d *)0)->f),(void *) NULL)#define ACPI_PHYSADDR_TO_PTR (i) ACPI_TO_POINTER(i)
@@ -296,22 +296,22 @@ struct acpi_integer_overlay {/* * Rounding macros (Power of two boundaries only) */ -#define ACPI_ROUND_DOWN (value,boundary) (((acpi_native_uint)(value)) & \ - (~(((acpi_native_uint) boundary)-1))) +#define ACPI_ROUND_DOWN (value, boundary) (((acpi_size)(value)) & \ + (~(((acpi_size) boundary)-1))) -#define ACPI_ROUND_UP (value,boundary) ((((acpi_native_uint)(value)) + \ - (((acpi_native_uint) boundary)-1)) & \ - (~(((acpi_native_uint) boundary)-1))) +#define ACPI_ROUND_UP (value, boundary) ((((acpi_size)(value)) + \ + (((acpi_size) boundary)-1)) & \ + (~(((acpi_size) boundary)-1))) -/* Note: sizeof(acpi_native_uint) evaluates to either 2, 4, or 8 */ +/* Note: sizeof(acpi_size) evaluates to either 4 or 8 (32- vs 64-bit mode) */ #define ACPI_ROUND_DOWN_TO_32BIT (a) ACPI_ROUND_DOWN(a,4)#define ACPI_ROUND_DOWN_TO_64BIT (a) ACPI_ROUND_DOWN(a,8) -#define ACPI_ROUND_DOWN_TO_NATIVE_WORD (a) ACPI_ROUND_DOWN(a,sizeof(acpi_native_uint)) +#define ACPI_ROUND_DOWN_TO_NATIVE_WORD (a) ACPI_ROUND_DOWN(a,sizeof(acpi_size))#define ACPI_ROUND_UP_TO_32BIT (a) ACPI_ROUND_UP(a,4)#define ACPI_ROUND_UP_TO_64BIT (a) ACPI_ROUND_UP(a,8) -#define ACPI_ROUND_UP_TO_NATIVE_WORD (a) ACPI_ROUND_UP(a,sizeof(acpi_native_uint)) +#define ACPI_ROUND_UP_TO_NATIVE_WORD (a) ACPI_ROUND_UP(a,sizeof(acpi_size))#define ACPI_ROUND_BITS_UP_TO_BYTES (a) ACPI_DIV_8((a) + 7)#define ACPI_ROUND_BITS_DOWN_TO_BYTES (a) ACPI_DIV_8((a))
@@ -322,7 +322,7 @@ struct acpi_integer_overlay {#define ACPI_ROUND_UP_TO (value,boundary) (((value) + ((boundary)-1)) / (boundary)) -#define ACPI_IS_MISALIGNED (value) (((acpi_native_uint)value) & (sizeof(acpi_native_uint)-1)) +#define ACPI_IS_MISALIGNED (value) (((acpi_size)value) & (sizeof(acpi_size)-1))/* * Bitmask creation
include/acpi/acnamesp.h +4 -6
@@ -86,8 +86,7 @@ acpi_status acpi_ns_initialize_devices(void);acpi_status acpi_ns_load_namespace (void );acpi_status -acpi_ns_load_table (acpi_native_uint table_index, -struct acpi_namespace_node *node); +acpi_ns_load_table (u32 table_index,struct acpi_namespace_node *node);/* * nswalk - walk the namespace
@@ -108,12 +107,11 @@ struct acpi_namespace_node *acpi_ns_get_next_node(acpi_object_type type, struct* nsparse - table parsing */ acpi_status -acpi_ns_parse_table (acpi_native_uint table_index, -struct acpi_namespace_node *start_node); +acpi_ns_parse_table (u32 table_index,struct acpi_namespace_node *start_node);acpi_status -acpi_ns_one_complete_parse (acpi_native_uint pass_number, -acpi_native_uint table_index, +acpi_ns_one_complete_parse (u32 pass_number, +u32 table_index,struct acpi_namespace_node *start_node);/*
include/acpi/acpiosxf.h +1 -1
@@ -144,7 +144,7 @@ void acpi_os_release_mutex(acpi_mutex handle);void *acpi_os_allocate (acpi_size size);void __iomem *acpi_os_map_memory (acpi_physical_address where, -acpi_native_uint length); +acpi_size length);void acpi_os_unmap_memory (void __iomem * logical_address,acpi_size size);
include/acpi/acpixf.h +4 -4
@@ -98,7 +98,7 @@ void acpi_free(void *address);*/ acpi_status acpi_reallocate_root_table (void ); -acpi_status acpi_find_root_pointer (acpi_native_uint * rsdp_address); +acpi_status acpi_find_root_pointer (acpi_size *rsdp_address);acpi_status acpi_load_tables (void );
@@ -108,15 +108,15 @@ acpi_status acpi_unload_table_id(acpi_owner_id id);acpi_status acpi_get_table_header (acpi_string signature, -acpi_native_uint instance, +u32 instance,struct acpi_table_header *out_table_header);acpi_status acpi_get_table (acpi_string signature, -acpi_native_uint instance,struct acpi_table_header **out_table); +u32 instance,struct acpi_table_header **out_table);acpi_status -acpi_get_table_by_index (acpi_native_uint table_index, +acpi_get_table_by_index (u32 table_index,struct acpi_table_header **out_table); acpi_status
include/acpi/acstruct.h +1 -1
@@ -142,7 +142,7 @@ struct acpi_init_walk_info {u16 package_init;u16 object_count;acpi_owner_id owner_id; -acpi_native_uint table_index; +u32 table_index; };struct acpi_get_devices_info {
include/acpi/actables.h +12 -15
@@ -49,7 +49,7 @@ acpi_status acpi_allocate_root_table(u32 initial_table_count);/* * tbfadt - FADT parse/convert/validate */ -void acpi_tb_parse_fadt (acpi_native_uint table_index,u8 flags); +void acpi_tb_parse_fadt (u32 table_index,u8 flags);void acpi_tb_create_local_fadt (struct acpi_table_header *table,u32 length);
@@ -58,8 +58,7 @@ void acpi_tb_create_local_fadt(struct acpi_table_header *table, u32 length);*/ acpi_status acpi_tb_find_table (char *signature, -char *oem_id, -char *oem_table_id,acpi_native_uint * table_index); +char *oem_id,char *oem_table_id,u32 *table_index);/* * tbinstal - Table removal and deletion
@@ -69,30 +68,28 @@ acpi_status acpi_tb_resize_root_table_list(void);acpi_status acpi_tb_verify_table (struct acpi_table_desc *table_desc);acpi_status -acpi_tb_add_table (struct acpi_table_desc *table_desc, -acpi_native_uint * table_index); +acpi_tb_add_table (struct acpi_table_desc *table_desc,u32 *table_index);acpi_status acpi_tb_store_table (acpi_physical_address address,struct acpi_table_header *table, -u32 length,u8 flags,acpi_native_uint * table_index); +u32 length,u8 flags,u32 *table_index);void acpi_tb_delete_table (struct acpi_table_desc *table_desc);void acpi_tb_terminate (void ); -void acpi_tb_delete_namespace_by_owner (acpi_native_uint table_index); +void acpi_tb_delete_namespace_by_owner (u32 table_index); -acpi_status acpi_tb_allocate_owner_id (acpi_native_uint table_index); +acpi_status acpi_tb_allocate_owner_id (u32 table_index); -acpi_status acpi_tb_release_owner_id (acpi_native_uint table_index); +acpi_status acpi_tb_release_owner_id (u32 table_index); -acpi_status -acpi_tb_get_owner_id (acpi_native_uint table_index,acpi_owner_id * owner_id); +acpi_status acpi_tb_get_owner_id (u32 table_index,acpi_owner_id *owner_id); -u8 acpi_tb_is_table_loaded (acpi_native_uint table_index); +u8 acpi_tb_is_table_loaded (u32 table_index); -void acpi_tb_set_table_loaded_flag (acpi_native_uint table_index,u8 is_loaded); +void acpi_tb_set_table_loaded_flag (u32 table_index,u8 is_loaded);/* * tbutils - table manager utilities
@@ -103,14 +100,14 @@ void acpi_tb_print_table_header(acpi_physical_address address, struct acpi_table_header *header); -u8 acpi_tb_checksum (u8 * buffer,acpi_native_uint length); +u8 acpi_tb_checksum (u8 *buffer,u32 length);acpi_status acpi_tb_verify_checksum (struct acpi_table_header *table,u32 length);void acpi_tb_install_table (acpi_physical_address address, -u8 flags,char *signature,acpi_native_uint table_index); +u8 flags,char *signature,u32 table_index);acpi_status acpi_tb_parse_root_table (acpi_physical_address rsdp_address,u8 flags);
include/acpi/actypes.h +6 -10
@@ -110,10 +110,10 @@* usually used for memory allocation, efficient loop counters, and array * indexes. The types are similar to the size_t type in the C library and are * required because there is no C type that consistently represents the native -* data width. +* data width. ACPI_SIZE is needed because there is no guarantee that a +* kernel-level C library is present. * * ACPI_SIZE 16/32/64-bit unsigned value -* ACPI_NATIVE_UINT 16/32/64-bit unsigned value * ACPI_NATIVE_INT 16/32/64-bit signed value * */
@@ -147,9 +147,9 @@ typedef int INT32;/*! [End] no source code translation !*/ -typedef u64 acpi_native_uint ;typedef s64 acpi_native_int ; +typedef u64 acpi_size ;typedef u64 acpi_io_address ;typedef u64 acpi_physical_address ;
@@ -186,9 +186,9 @@ typedef int INT32;/*! [End] no source code translation !*/ -typedef u32 acpi_native_uint ;typedef s32 acpi_native_int ; +typedef u32 acpi_size ;typedef u32 acpi_io_address ;typedef u32 acpi_physical_address ;
@@ -202,10 +202,6 @@ typedef u32 acpi_physical_address;#error unknown ACPI_MACHINE_WIDTH#endif -/* Variable-width type, used instead of clib size_t */ - -typedef acpi_native_uint acpi_size ; -/******************************************************************************* * * OS-dependent and compiler-dependent types
@@ -219,7 +215,7 @@ typedef acpi_native_uint acpi_size;/* Value returned by acpi_os_get_thread_id */ #ifndef acpi_thread_id -#define acpi_thread_id acpi_native_uint +#define acpi_thread_id acpi_size#endif /* Object returned from acpi_os_create_lock */
@@ -231,7 +227,7 @@ typedef acpi_native_uint acpi_size;/* Flags for acpi_os_acquire_lock/acpi_os_release_lock */ #ifndef acpi_cpu_flags -#define acpi_cpu_flags acpi_native_uint +#define acpi_cpu_flags acpi_size#endif /* Object returned from acpi_os_create_cache */
include/acpi/acutils.h +2 -2
@@ -172,7 +172,7 @@ char *acpi_ut_strstr(char *string1, char *string2);void *acpi_ut_memcpy (void *dest,const void *src,acpi_size count); -void *acpi_ut_memset (void *dest,acpi_native_uint value,acpi_size count); +void *acpi_ut_memset (void *dest,u8 value,acpi_size count);int acpi_ut_to_upper (int c);
@@ -476,7 +476,7 @@ u8 acpi_ut_valid_acpi_name(u32 name);acpi_name acpi_ut_repair_name (char *name); -u8 acpi_ut_valid_acpi_char (char character,acpi_native_uint position); +u8 acpi_ut_valid_acpi_char (char character,u32 position);acpi_status acpi_ut_strtoul64 (char *string,u32 base,acpi_integer * ret_integer);
Signature · 1 line
1.5.6.rc2.26.g8c37
Len Brown
reviewerPATCH 6/17 ACPICA: Removed unused include files from source files
In reply to Len BrownFrom: Bob Moore <[email protected]>
Quoted 1 line
From lint.
--- drivers/acpi/executer/excreate.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-)
drivers/acpi/executer/excreate.c +0 -2
@@ -45,8 +45,6 @@#include <acpi/acinterp.h> #include <acpi/amlcode.h> #include <acpi/acnamesp.h> -#include <acpi/acevents.h> -#include <acpi/actables.h> #define _COMPONENT ACPI_EXECUTERACPI_MODULE_NAME ("excreate" )
Signature · 1 line
1.5.6.rc2.26.g8c37
Len Brown
reviewerPATCH 7/17 ACPICA: Several lint changes, no functional changes
In reply to Len BrownFrom: Bob Moore <[email protected]>
Remove pointer cast warnings and fix for a debug printf.
--- drivers/acpi/executer/exprep.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
drivers/acpi/executer/exprep.c +4 -4
@@ -503,11 +503,11 @@ acpi_status acpi_ex_prep_field_value(struct acpi_create_field_info *info)*/ second_desc = obj_desc->common.next_object; second_desc->extra.aml_start = - ((union acpi_parse_object *)(info->data_register_node))-> - named.data; + ACPI_CAST_PTR(union acpi_parse_object, + info->data_register_node)->named.data; second_desc->extra.aml_length = - ((union acpi_parse_object *)(info->data_register_node))-> - named.length; + ACPI_CAST_PTR(union acpi_parse_object, + info->data_register_node)->named.length;break ;
Signature · 1 line
1.5.6.rc2.26.g8c37
Len Brown
reviewerPATCH 8/17 ACPICA: Add const qualifier for appropriate string constants
In reply to Len BrownFrom: Bob Moore <[email protected]>
Mostly MODULE_NAME and printf format strings.
--- drivers/acpi/executer/exdump.c | 5 ++- drivers/acpi/namespace/nsutils.c | 24 +++++++------ drivers/acpi/utilities/utalloc.c | 5 ++- drivers/acpi/utilities/utdebug.c | 26 +++++++++----- drivers/acpi/utilities/utmisc.c | 11 +++--- drivers/acpi/utilities/utobject.c | 5 ++- include/acpi/acinterp.h | 5 ++- include/acpi/aclocal.h | 4 +- include/acpi/acmacros.h | 2 +- include/acpi/acnamesp.h | 20 ++++++----- include/acpi/acutils.h | 66 +++++++++++++++++++++--------------- 11 files changed, 99 insertions(+), 74 deletions(-)
drivers/acpi/executer/exdump.c +3 -2
@@ -771,9 +771,10 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth)void acpi_ex_dump_operands (union acpi_operand_object **operands,acpi_interpreter_mode interpreter_mode, -char *ident, +const char *ident,u32 num_levels, -char *note,char *module_name,u32 line_number) +const char *note, +const char *module_name,u32 line_number) {u32 i;
drivers/acpi/namespace/nsutils.c +13 -11
@@ -73,9 +73,9 @@ acpi_name acpi_ns_find_parent_name(struct acpi_namespace_node *node_to_search);******************************************************************************/ void -acpi_ns_report_error (char *module_name, +acpi_ns_report_error (const char *module_name,u32 line_number, -char *internal_name,acpi_status lookup_status) +const char *internal_name,acpi_status lookup_status) {acpi_status status;u32 bad_name;
@@ -130,11 +130,11 @@ acpi_ns_report_error(char *module_name,******************************************************************************/ void -acpi_ns_report_method_error (char *module_name, +acpi_ns_report_method_error (const char *module_name,u32 line_number, -char *message, +const char *message,struct acpi_namespace_node *prefix_node, -char *path,acpi_status method_status) +const char *path,acpi_status method_status) {acpi_status status;struct acpi_namespace_node *node = prefix_node;
@@ -167,7 +167,8 @@ acpi_ns_report_method_error(char *module_name,******************************************************************************/ void -acpi_ns_print_node_pathname (struct acpi_namespace_node *node,char *message) +acpi_ns_print_node_pathname (struct acpi_namespace_node *node, +const char *message) {struct acpi_buffer buffer;acpi_status status;
@@ -296,7 +297,7 @@ u32 acpi_ns_local(acpi_object_type type)void acpi_ns_get_internal_name_length (struct acpi_namestring_info *info) { -char *next_external_char; +const char *next_external_char;u32 i;ACPI_FUNCTION_ENTRY ();
@@ -363,7 +364,7 @@ acpi_status acpi_ns_build_internal_name(struct acpi_namestring_info *info) {u32 num_segments = info->num_segments;char *internal_name = info->internal_name; -char *external_name = info->next_external_char; +const char *external_name = info->next_external_char;char *result =NULL ;u32 i;
@@ -471,7 +472,8 @@ acpi_status acpi_ns_build_internal_name(struct acpi_namestring_info *info)* *******************************************************************************/ -acpi_status acpi_ns_internalize_name (char *external_name,char **converted_name) +acpi_status +acpi_ns_internalize_name (const char *external_name,char **converted_name) {char *internal_name;struct acpi_namestring_info info;
@@ -527,7 +529,7 @@ acpi_status acpi_ns_internalize_name(char *external_name, char **converted_name)acpi_status acpi_ns_externalize_name (u32 internal_name_length, -char *internal_name, +const char *internal_name,u32 * converted_name_length,char **converted_name) {u32 names_index =0 ;
@@ -821,7 +823,7 @@ u32 acpi_ns_opens_scope(acpi_object_type type)acpi_status acpi_ns_get_node (struct acpi_namespace_node *prefix_node, -char *pathname, +const char *pathname,u32 flags,struct acpi_namespace_node **return_node) {union acpi_generic_state scope_info;
drivers/acpi/utilities/utalloc.c +3 -2
@@ -309,7 +309,8 @@ acpi_ut_initialize_buffer(struct acpi_buffer * buffer,* ******************************************************************************/ -void *acpi_ut_allocate (acpi_size size,u32 component,char *module,u32 line) +void *acpi_ut_allocate (acpi_size size, +u32 component,const char *module,u32 line) {void *allocation;
@@ -353,7 +354,7 @@ void *acpi_ut_allocate(acpi_size size, u32 component, char *module, u32 line)******************************************************************************/ void *acpi_ut_allocate_zeroed (acpi_size size, -u32 component,char *module,u32 line) +u32 component,const char *module,u32 line) {void *allocation;
drivers/acpi/utilities/utdebug.c +16 -10
@@ -157,7 +157,8 @@ void ACPI_INTERNAL_VAR_XFACE acpi_ut_debug_print(u32 requested_debug_level, u32 line_number, const char *function_name, - char *module_name, u32 component_id, char *format, ...) + const char *module_name, + u32 component_id, const char *format, ...) { acpi_thread_id thread_id;va_list args;
@@ -228,7 +229,8 @@ void ACPI_INTERNAL_VAR_XFACE acpi_ut_debug_print_raw(u32 requested_debug_level, u32 line_number, const char *function_name, - char *module_name, u32 component_id, char *format, ...) + const char *module_name, + u32 component_id, const char *format, ...) { va_list args;
@@ -261,7 +263,8 @@ ACPI_EXPORT_SYMBOL(acpi_ut_debug_print_raw)******************************************************************************/ void acpi_ut_trace (u32 line_number, -const char *function_name,char *module_name,u32 component_id) +const char *function_name, +const char *module_name,u32 component_id) { acpi_gbl_nesting_level++;
@@ -293,7 +296,7 @@ ACPI_EXPORT_SYMBOL(acpi_ut_trace)void acpi_ut_trace_ptr (u32 line_number,const char *function_name, -char *module_name,u32 component_id,void *pointer) +const char *module_name,u32 component_id,void *pointer) { acpi_gbl_nesting_level++;acpi_ut_track_stack_ptr ();
@@ -324,7 +327,7 @@ acpi_ut_trace_ptr(u32 line_number,void acpi_ut_trace_str (u32 line_number,const char *function_name, -char *module_name,u32 component_id,char *string) +const char *module_name,u32 component_id,char *string) { acpi_gbl_nesting_level++;
@@ -356,7 +359,7 @@ acpi_ut_trace_str(u32 line_number,void acpi_ut_trace_u32 (u32 line_number,const char *function_name, -char *module_name,u32 component_id,u32 integer) +const char *module_name,u32 component_id,u32 integer) { acpi_gbl_nesting_level++;
@@ -386,7 +389,8 @@ acpi_ut_trace_u32(u32 line_number,void acpi_ut_exit (u32 line_number, -const char *function_name,char *module_name,u32 component_id) +const char *function_name, +const char *module_name,u32 component_id) { acpi_ut_debug_print(ACPI_LV_FUNCTIONS,
@@ -417,7 +421,8 @@ ACPI_EXPORT_SYMBOL(acpi_ut_exit)void acpi_ut_status_exit (u32 line_number,const char *function_name, -char *module_name,u32 component_id,acpi_status status) +const char *module_name, +u32 component_id,acpi_status status) {if (ACPI_SUCCESS (status)) {
@@ -458,7 +463,8 @@ ACPI_EXPORT_SYMBOL(acpi_ut_status_exit)void acpi_ut_value_exit (u32 line_number,const char *function_name, -char *module_name,u32 component_id,acpi_integer value) +const char *module_name, +u32 component_id,acpi_integer value) { acpi_ut_debug_print(ACPI_LV_FUNCTIONS,
@@ -490,7 +496,7 @@ ACPI_EXPORT_SYMBOL(acpi_ut_value_exit)void acpi_ut_ptr_exit (u32 line_number,const char *function_name, -char *module_name,u32 component_id,u8 * ptr) +const char *module_name,u32 component_id,u8 *ptr) { acpi_ut_debug_print(ACPI_LV_FUNCTIONS,
drivers/acpi/utilities/utmisc.c +6 -5
@@ -1020,7 +1020,7 @@ acpi_ut_walk_package_tree(union acpi_operand_object * source_object,******************************************************************************/ void ACPI_INTERNAL_VAR_XFACE -acpi_ut_error (char *module_name,u32 line_number,char *format, ...) +acpi_ut_error (const char *module_name,u32 line_number,const char *format, ...) {va_list args;
@@ -1033,8 +1033,8 @@ acpi_ut_error(char *module_name, u32 line_number, char *format, ...) } void ACPI_INTERNAL_VAR_XFACE -acpi_ut_exception (char *module_name, -u32 line_number,acpi_status status,char *format, ...) +acpi_ut_exception (const char *module_name, +u32 line_number,acpi_status status,const char *format, ...) {va_list args;
@@ -1050,7 +1050,8 @@ acpi_ut_exception(char *module_name,EXPORT_SYMBOL (acpi_ut_exception); void ACPI_INTERNAL_VAR_XFACE -acpi_ut_warning (char *module_name,u32 line_number,char *format, ...) +acpi_ut_warning (const char *module_name, +u32 line_number,const char *format, ...) {va_list args;
@@ -1063,7 +1064,7 @@ acpi_ut_warning(char *module_name, u32 line_number, char *format, ...) } void ACPI_INTERNAL_VAR_XFACE -acpi_ut_info (char *module_name,u32 line_number,char *format, ...) +acpi_ut_info (const char *module_name,u32 line_number,const char *format, ...) {va_list args;
drivers/acpi/utilities/utobject.c +3 -2
@@ -83,7 +83,8 @@ acpi_ut_get_element_length(u8 object_type,* ******************************************************************************/ -union acpi_operand_object *acpi_ut_create_internal_object_dbg (char *module_name, +union acpi_operand_object *acpi_ut_create_internal_object_dbg (const char + *module_name,u32 line_number,u32 component_id, acpi_object_type
@@ -347,7 +348,7 @@ u8 acpi_ut_valid_internal_object(void *object)* ******************************************************************************/ -void *acpi_ut_allocate_object_desc_dbg (char *module_name, +void *acpi_ut_allocate_object_desc_dbg (const char *module_name,u32 line_number,u32 component_id) {union acpi_operand_object *object;
include/acpi/acinterp.h +3 -2
@@ -367,9 +367,10 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth);void acpi_ex_dump_operands (union acpi_operand_object **operands,acpi_interpreter_mode interpreter_mode, -char *ident, +const char *ident,u32 num_levels, -char *note,char *module_name,u32 line_number); +const char *note, +const char *module_name,u32 line_number);#ifdef ACPI_FUTURE_USAGE void
include/acpi/aclocal.h +2 -2
@@ -282,8 +282,8 @@ struct acpi_predefined_names {/* Info structure used to convert external<->internal namestrings */ struct acpi_namestring_info { -char *external_name; -char *next_external_char; +const char *external_name; +const char *next_external_char;char *internal_name;u32 length;u32 num_segments;
include/acpi/acmacros.h +1 -1
@@ -414,7 +414,7 @@ struct acpi_integer_overlay {* error messages. The __FILE__ macro is not very useful for this, because it * often includes the entire pathname to the module */ -#define ACPI_MODULE_NAME (name) static char ACPI_UNUSED_VAR _acpi_module_name[] = name; +#define ACPI_MODULE_NAME (name) static const char ACPI_UNUSED_VAR _acpi_module_name[] = name;#else #define ACPI_MODULE_NAME (name)#endif
include/acpi/acnamesp.h +11 -9
@@ -199,7 +199,7 @@ acpi_ns_pattern_match(struct acpi_namespace_node *obj_node, char *search_for);acpi_status acpi_ns_get_node (struct acpi_namespace_node *prefix_node, -char *external_pathname, +const char *external_pathname,u32 flags,struct acpi_namespace_node **out_node);acpi_size acpi_ns_get_pathname_length (struct acpi_namespace_node *node);
@@ -263,28 +263,30 @@ acpi_object_type acpi_ns_get_type(struct acpi_namespace_node *node);u32 acpi_ns_local (acpi_object_type type);void -acpi_ns_report_error (char *module_name, +acpi_ns_report_error (const char *module_name,u32 line_number, -char *internal_name,acpi_status lookup_status); +const char *internal_name,acpi_status lookup_status);void -acpi_ns_report_method_error (char *module_name, +acpi_ns_report_method_error (const char *module_name,u32 line_number, -char *message, +const char *message,struct acpi_namespace_node *node, -char *path,acpi_status lookup_status); +const char *path,acpi_status lookup_status); -void acpi_ns_print_node_pathname (struct acpi_namespace_node *node,char *msg); +void +acpi_ns_print_node_pathname (struct acpi_namespace_node *node,const char *msg);acpi_status acpi_ns_build_internal_name (struct acpi_namestring_info *info);void acpi_ns_get_internal_name_length (struct acpi_namestring_info *info); -acpi_status acpi_ns_internalize_name (char *dotted_name,char **converted_name); +acpi_status +acpi_ns_internalize_name (const char *dotted_name,char **converted_name);acpi_status acpi_ns_externalize_name (u32 internal_name_length, -char *internal_name, +const char *internal_name,u32 * converted_name_length,char **converted_name);struct acpi_namespace_node *acpi_ns_map_handle_to_node (acpi_handle handle);
include/acpi/acutils.h +38 -28
151 lines not on this page · raw message
Signature · 1 line
1.5.6.rc2.26.g8c37
Len Brown
reviewerPATCH 9/17 ACPICA: Update version to 20080514
In reply to Len BrownFrom: Bob Moore <[email protected]>
Update version to 20080514
--- include/acpi/acconfig.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
include/acpi/acconfig.h +1 -1
@@ -63,7 +63,7 @@/* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20080321 +#define ACPI_CA_VERSION 0x20080514/* * OS name, used for the _OS object. The _OS object is essentially obsolete,
Signature · 1 line
1.5.6.rc2.26.g8c37
Len Brown
reviewerPATCH 10/17 ACPICA: Workaround for reversed _PRT entries from BIOS
In reply to Len BrownFrom: Bob Moore <[email protected]>
Some BIOSs erroneously reverse the _PRT SourceName and the SourceIndex. Detect and repair this problem. MS ACPI also allows and repairs this problem, thus ACPICA must also.
--- drivers/acpi/resources/rscreate.c | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-)
drivers/acpi/resources/rscreate.c +17 -0
@@ -285,6 +285,23 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object, }/* +* If the BIOS has erroneously reversed the _PRT source_name (index 2) +* and the source_index (index 3), fix it. _PRT is important enough to +* workaround this BIOS error. This also provides compatibility with +* other ACPI implementations. +*/ + obj_desc = sub_object_list[3 ]; +if (!obj_desc + || (ACPI_GET_OBJECT_TYPE (obj_desc) !=ACPI_TYPE_INTEGER )) { + sub_object_list[3 ] = sub_object_list[2 ]; + sub_object_list[2 ] = obj_desc; + +ACPI_WARNING ((AE_INFO , +"(PRT[%X].Source) SourceName and SourceIndex are reversed, fixed" , + index)); + } + +/* * 3) Third subobject: Dereference the PRT.source_name * The name may be unresolved (slack mode), so allow a null object */
Signature · 1 line
1.5.6.rc2.26.g8c37
Len Brown
reviewerPATCH 11/17 ACPICA: Update DMAR and SRAT table definitions
In reply to Len BrownFrom: Bob Moore <[email protected]>
Synchronized tables with current specifications.
--- arch/x86/kernel/srat_32.c | 3 +-- drivers/acpi/numa.c | 4 ++-- include/acpi/actbl1.h | 19 +++++++++++++++++-- 3 files changed, 20 insertions(+), 6 deletions(-)
arch/x86/kernel/srat_32.c +1 -2
@@ -126,9 +126,8 @@ static void __init parse_memory_affinity_structure (char *sratp) num_memory_chunks++; -printk ("Memory range 0x%lX to 0x%lX (type 0x%X) in proximity domain 0x%02X %s\n" , +printk ("Memory range 0x%lX to 0x%lX in proximity domain 0x%02X %s\n" , start_pfn, end_pfn, - memory_affinity->memory_type, pxm, ((memory_affinity->flags &ACPI_SRAT_MEM_HOT_PLUGGABLE ) ?"enabled and removable" :"enabled" ) );
drivers/acpi/numa.c +2 -2
@@ -120,10 +120,10 @@ acpi_table_print_srat_entry(struct acpi_subtable_header *header)struct acpi_srat_mem_affinity *p = (struct acpi_srat_mem_affinity *)header; ACPI_DEBUG_PRINT((ACPI_DB_INFO, - "SRAT Memory (0x%lx length 0x%lx type 0x%x) in proximity domain %d %s%s\n", + "SRAT Memory (0x%lx length 0x%lx) in proximity domain %d %s%s\n", (unsigned long)p->base_address, (unsigned long)p->length, - p->memory_type, p->proximity_domain, + p->proximity_domain, (p->flags & ACPI_SRAT_MEM_ENABLED)? "enabled" : "disabled", (p->flags & ACPI_SRAT_MEM_HOT_PLUGGABLE)?
include/acpi/actbl1.h +17 -2
@@ -300,6 +300,7 @@ struct acpi_table_dbgp {/******************************************************************************* * * DMAR - DMA Remapping table +* From "Intel Virtualization Technology for Directed I/O", Sept. 2007 * ******************************************************************************/
@@ -382,6 +383,20 @@ struct acpi_dmar_reserved_memory {#define ACPI_DMAR_ALLOW_ALL (1) + +/* 2: Root Port ATS Capability Reporting Structure */ + +struct acpi_dmar_atsr { +struct acpi_dmar_header header; +u8 flags; +u8 reserved; +u16 segment; +}; + +/* Flags */ + +#define ACPI_DMAR_ALL_PORTS (1) +/******************************************************************************* * * ECDT - Embedded Controller Boot Resources Table
@@ -1156,9 +1171,9 @@ struct acpi_srat_mem_affinity {u16 reserved;/* Reserved, must be zero */ u64 base_address;u64 length; -u32 memory_type;/* See acpi_address_range_id */ +u32 reserved1;u32 flags; -u64 reserved1;/* Reserved, must be zero */ +u64 reserved2;/* Reserved, must be zero */ };/* Flags */
Signature · 1 line
1.5.6.rc2.26.g8c37
Len Brown
reviewerPATCH 12/17 ACPICA: Update disassembler for DMAR table changes
In reply to Len BrownFrom: Bob Moore <[email protected]>
Now supports the 2007 intel Virtualization Technology for Directed I/O specification.
--- include/acpi/acdisasm.h | 1 + include/acpi/actbl1.h | 4 ++++ 2 files changed, 5 insertions(+), 0 deletions(-)
include/acpi/acdisasm.h +1 -0
@@ -162,6 +162,7 @@ extern struct acpi_dmtable_info acpi_dm_table_info_dmar_hdr[];extern struct acpi_dmtable_info acpi_dm_table_info_dmar_scope[];extern struct acpi_dmtable_info acpi_dm_table_info_dmar0[];extern struct acpi_dmtable_info acpi_dm_table_info_dmar1[]; +extern struct acpi_dmtable_info acpi_dm_table_info_dmar2[];extern struct acpi_dmtable_info acpi_dm_table_info_ecdt[];extern struct acpi_dmtable_info acpi_dm_table_info_einj[];extern struct acpi_dmtable_info acpi_dm_table_info_einj0[];
include/acpi/actbl1.h +4 -0
@@ -311,6 +311,10 @@ struct acpi_table_dmar {u8 reserved[10 ]; }; +/* Flags */ + +#define ACPI_DMAR_INTR_REMAP (1) +/* DMAR subtable header */ struct acpi_dmar_header {
Signature · 1 line
1.5.6.rc2.26.g8c37
Len Brown
reviewerPATCH 13/17 ACPICA: Fix for invalid large array index on 64-bit systems
In reply to Len BrownFrom: Bob Moore <[email protected]>
This problem was introduced in 20080514 as a result of the elimination of the acpi_native_uint type. Code uses a negative array index, which should be eliminated.
--- drivers/acpi/executer/exdump.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/acpi/executer/exdump.c +1 -1
@@ -776,7 +776,7 @@ acpi_ex_dump_operands(union acpi_operand_object **operands,const char *note, const char *module_name, u32 line_number) { - u32 i; + s32 i;ACPI_FUNCTION_NAME (ex_dump_operands);
Signature · 1 line
1.5.6.rc2.26.g8c37
Len Brown
reviewerPATCH 14/17 ACPICA: Cleanup debug operand dump mechanism
In reply to Len BrownFrom: Bob Moore <[email protected]>
Eliminated unnecessary operands; eliminated use of negative index in loop. Operands now displayed in correct order, not backwards.
--- drivers/acpi/dispatcher/dsopcode.c | 20 +--------- drivers/acpi/dispatcher/dswexec.c | 8 ---- drivers/acpi/executer/exdump.c | 68 ++++++++++++++---------------------- drivers/acpi/executer/exresop.c | 4 ++ drivers/acpi/executer/exstore.c | 6 --- drivers/acpi/namespace/nsdump.c | 4 +- include/acpi/acinterp.h | 6 +--- include/acpi/acmacros.h | 4 +- 8 files changed, 37 insertions(+), 83 deletions(-)
drivers/acpi/dispatcher/dsopcode.c +2 -18
@@ -691,12 +691,6 @@ acpi_ds_eval_buffer_field_operands(struct acpi_walk_state *walk_state, status =acpi_ex_resolve_operands (op->common.aml_opcode,ACPI_WALK_OPERANDS , walk_state); - -ACPI_DUMP_OPERANDS (ACPI_WALK_OPERANDS ,ACPI_IMODE_EXECUTE , -acpi_ps_get_opcode_name (op->common.aml_opcode), - walk_state->num_operands, -"after AcpiExResolveOperands" ); -if (ACPI_FAILURE (status)) { ACPI_ERROR((AE_INFO, "(%s) bad operand(s) (%X)", acpi_ps_get_opcode_name(op->common.aml_opcode),
@@ -785,10 +779,6 @@ acpi_ds_eval_region_operands(struct acpi_walk_state *walk_state,return_ACPI_STATUS (status); } -ACPI_DUMP_OPERANDS (ACPI_WALK_OPERANDS ,ACPI_IMODE_EXECUTE , -acpi_ps_get_opcode_name (op->common.aml_opcode), -1 ,"after AcpiExResolveOperands" ); - obj_desc =acpi_ns_get_attached_object (node);if (!obj_desc) {return_ACPI_STATUS (AE_NOT_EXIST );
@@ -882,10 +872,6 @@ acpi_ds_eval_table_region_operands(struct acpi_walk_state *walk_state,return_ACPI_STATUS (status); } -ACPI_DUMP_OPERANDS (ACPI_WALK_OPERANDS ,ACPI_IMODE_EXECUTE , -acpi_ps_get_opcode_name (op->common.aml_opcode), -1 ,"after AcpiExResolveOperands" ); - operand = &walk_state->operands[0 ];/* Find the ACPI table */
@@ -1091,10 +1077,8 @@ acpi_ds_eval_bank_field_operands(struct acpi_walk_state *walk_state,return_ACPI_STATUS (status); } -ACPI_DUMP_OPERANDS (ACPI_WALK_OPERANDS ,ACPI_IMODE_EXECUTE , -acpi_ps_get_opcode_name (op->common.aml_opcode), -1 ,"after AcpiExResolveOperands" ); - +ACPI_DUMP_OPERANDS (ACPI_WALK_OPERANDS , +acpi_ps_get_opcode_name (op->common.aml_opcode),1 );/* * Get the bank_value operand and save it * (at Top of stack)
drivers/acpi/dispatcher/dswexec.c +0 -8
@@ -408,14 +408,6 @@ acpi_status acpi_ds_exec_end_op(struct acpi_walk_state *walk_state) [walk_state-> num_operands - 1]), walk_state); -if (ACPI_SUCCESS (status)) { -ACPI_DUMP_OPERANDS (ACPI_WALK_OPERANDS , -ACPI_IMODE_EXECUTE , -acpi_ps_get_opcode_name - (walk_state->opcode), - walk_state->num_operands, -"after ExResolveOperands" ); - } }if (ACPI_SUCCESS (status)) {
drivers/acpi/executer/exdump.c +26 -42
106 lines not on this page · raw message
drivers/acpi/executer/exresop.c +4 -0
@@ -698,5 +698,9 @@ acpi_ex_resolve_operands(u16 opcode, } } +ACPI_DUMP_OPERANDS (walk_state->operands, +acpi_ps_get_opcode_name (opcode), + walk_state->num_operands); +return_ACPI_STATUS (status); }
drivers/acpi/executer/exstore.c +0 -6
@@ -343,12 +343,6 @@ acpi_ex_store(union acpi_operand_object *source_desc,acpi_ut_get_object_type_name (dest_desc), dest_desc)); -ACPI_DUMP_STACK_ENTRY (source_desc); -ACPI_DUMP_STACK_ENTRY (dest_desc); -ACPI_DUMP_OPERANDS (&dest_desc,ACPI_IMODE_EXECUTE ,"ExStore" , -2 , -"Target is not a Reference or Constant object" ); -return_ACPI_STATUS (AE_AML_OPERAND_TYPE ); }
drivers/acpi/namespace/nsdump.c +2 -2
@@ -515,12 +515,12 @@ acpi_ns_dump_one_object(acpi_handle obj_handle,if (obj_type >ACPI_TYPE_LOCAL_MAX ) {acpi_os_printf - ("(Ptr to ACPI Object type %X [UNKNOWN])\n" , + ("(Pointer to ACPI Object type %.2X [UNKNOWN])\n" , obj_type); bytes_to_dump =32 ; }else {acpi_os_printf - ("(Ptr to ACPI Object type %X [%s])\n" , + ("(Pointer to ACPI Object type %.2X [%s])\n" , obj_type,acpi_ut_get_type_name (obj_type)); bytes_to_dump =sizeof (union acpi_operand_object );
include/acpi/acinterp.h +1 -5
@@ -366,11 +366,7 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth);void acpi_ex_dump_operands (union acpi_operand_object **operands, -acpi_interpreter_mode interpreter_mode, -const char *ident, -u32 num_levels, -const char *note, -const char *module_name,u32 line_number); +const char *opcode_name,u32 num_opcodes);#ifdef ACPI_FUTURE_USAGE void
include/acpi/acmacros.h +2 -2
@@ -597,7 +597,7 @@ struct acpi_integer_overlay {/* Stack and buffer dumping */ #define ACPI_DUMP_STACK_ENTRY (a) acpi_ex_dump_operand((a),0) -#define ACPI_DUMP_OPERANDS (a,b,c,d,e) acpi_ex_dump_operands(a,b,c,d,e,_acpi_module_name,__LINE__) +#define ACPI_DUMP_OPERANDS (a,b,c) acpi_ex_dump_operands(a,b,c)#define ACPI_DUMP_ENTRY (a,b) acpi_ns_dump_entry (a,b)#define ACPI_DUMP_PATHNAME (a,b,c,d) acpi_ns_dump_pathname(a,b,c,d)
@@ -633,7 +633,7 @@ struct acpi_integer_overlay {#define ACPI_FUNCTION_VALUE_EXIT (s) do { } while(0)#define ACPI_FUNCTION_ENTRY () do { } while(0)#define ACPI_DUMP_STACK_ENTRY (a) do { } while(0) -#define ACPI_DUMP_OPERANDS (a,b,c,d,e) do { } while(0) +#define ACPI_DUMP_OPERANDS (a,b,c) do { } while(0)#define ACPI_DUMP_ENTRY (a,b) do { } while(0)#define ACPI_DUMP_TABLES (a,b) do { } while(0)#define ACPI_DUMP_PATHNAME (a,b,c,d) do { } while(0)
Signature · 1 line
1.5.6.rc2.26.g8c37
Len Brown
reviewerPATCH 15/17 ACPICA: Cleanup of _PRT parsing code
In reply to Len BrownFrom: Bob Moore <[email protected]>
Removed extraneous else clauses, other general cleanup.
--- drivers/acpi/resources/rscreate.c | 24 ++++++++++++------------ 1 files changed, 12 insertions(+), 12 deletions(-)
drivers/acpi/resources/rscreate.c +12 -12
@@ -181,9 +181,9 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object, }/* -* Loop through the ACPI_INTERNAL_OBJECTS - Each object -* should be a package that in turn contains an -* acpi_integer Address, a u8 Pin, a Name and a u8 source_index. +* Loop through the ACPI_INTERNAL_OBJECTS - Each object should be a +* package that in turn contains an acpi_integer Address, a u8 Pin, +* a Name, and a u8 source_index. */ top_object_list = package_object->package.elements; number_of_elements = package_object->package.count;
@@ -240,9 +240,7 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,/* 1) First subobject: Dereference the PRT.Address */ obj_desc = sub_object_list[0 ]; -if (ACPI_GET_OBJECT_TYPE (obj_desc) ==ACPI_TYPE_INTEGER ) { - user_prt->address = obj_desc->integer.value; - }else { +if (ACPI_GET_OBJECT_TYPE (obj_desc) !=ACPI_TYPE_INTEGER ) { ACPI_ERROR((AE_INFO, "(PRT[%X].Address) Need Integer, found %s", index,
@@ -250,12 +248,12 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,return_ACPI_STATUS (AE_BAD_DATA ); } + user_prt->address = obj_desc->integer.value; +/* 2) Second subobject: Dereference the PRT.Pin */ obj_desc = sub_object_list[1 ]; -if (ACPI_GET_OBJECT_TYPE (obj_desc) ==ACPI_TYPE_INTEGER ) { - user_prt->pin = (u32 ) obj_desc->integer.value; - }else { +if (ACPI_GET_OBJECT_TYPE (obj_desc) !=ACPI_TYPE_INTEGER ) { ACPI_ERROR((AE_INFO, "(PRT[%X].Pin) Need Integer, found %s", index,
@@ -284,6 +282,8 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object, } } + user_prt->pin = (u32 ) obj_desc->integer.value; +/* * If the BIOS has erroneously reversed the _PRT source_name (index 2) * and the source_index (index 3), fix it. _PRT is important enough to
@@ -381,9 +381,7 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,/* 4) Fourth subobject: Dereference the PRT.source_index */ obj_desc = sub_object_list[source_index_index]; -if (ACPI_GET_OBJECT_TYPE (obj_desc) ==ACPI_TYPE_INTEGER ) { - user_prt->source_index = (u32 ) obj_desc->integer.value; - }else { +if (ACPI_GET_OBJECT_TYPE (obj_desc) !=ACPI_TYPE_INTEGER ) { ACPI_ERROR((AE_INFO, "(PRT[%X].SourceIndex) Need Integer, found %s", index,
@@ -391,6 +389,8 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,return_ACPI_STATUS (AE_BAD_DATA ); } + user_prt->source_index = (u32 ) obj_desc->integer.value; +/* Point to the next union acpi_operand_object in the top level package */ top_object_list++;
Signature · 1 line
1.5.6.rc2.26.g8c37
Len Brown
reviewerPATCH 16/17 ACPICA: Fix mutex debug code for wrong loop termination value
In reply to Len BrownFrom: Bob Moore <[email protected]>
Loop was terminating one iteration early, missing one of the debugger handshake mutexes. Linn Crosetto.
--- drivers/acpi/utilities/utmutex.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/acpi/utilities/utmutex.c +2 -2
@@ -218,7 +218,7 @@ acpi_status acpi_ut_acquire_mutex(acpi_mutex_handle mutex_id)* the mutex ordering rule. This indicates a coding error somewhere in * the ACPI subsystem code. */ -for (i = mutex_id; i <ACPI_MAX_MUTEX ; i++) { +for (i = mutex_id; i <ACPI_NUM_MUTEX ; i++) {if (acpi_gbl_mutex_info[i].thread_id == this_thread_id) {if (i == mutex_id) { ACPI_ERROR((AE_INFO,
@@ -315,7 +315,7 @@ acpi_status acpi_ut_release_mutex(acpi_mutex_handle mutex_id)* ordering rule. This indicates a coding error somewhere in * the ACPI subsystem code. */ -for (i = mutex_id; i <ACPI_MAX_MUTEX ; i++) { +for (i = mutex_id; i <ACPI_NUM_MUTEX ; i++) {if (acpi_gbl_mutex_info[i].thread_id == this_thread_id) {if (i == mutex_id) {continue ;
Signature · 1 line
1.5.6.rc2.26.g8c37
Len Brown
reviewerPATCH 17/17 ACPICA: Update version to 20080609
In reply to Len BrownFrom: Bob Moore <[email protected]>
Update version to 20080609.
--- include/acpi/acconfig.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
include/acpi/acconfig.h +1 -1
@@ -63,7 +63,7 @@/* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20080514 +#define ACPI_CA_VERSION 0x20080609/* * OS name, used for the _OS object. The _OS object is essentially obsolete,
Signature · 1 line
1.5.6.rc2.26.g8c37