Index: linux-acpi-2.6/drivers/acpi/dispatcher/dsmethod.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/dispatcher/dsmethod.c +++ linux-acpi-2.6/drivers/acpi/dispatcher/dsmethod.c @@ -80,7 +80,7 @@ acpi_ds_method_error(acpi_status status, /* Invoke the global exception handler */ - if (acpi_gbl_exception_handler) { + if (acpi_gbl_exceptionhandler) { /* Exit the interpreter, allow handler to execute methods */ @@ -90,13 +90,13 @@ acpi_ds_method_error(acpi_status status, * Handler can map the exception code to anything it wants, including * AE_OK, in which case the executing method will not be aborted. */ - status = acpi_gbl_exception_handler(status, - walk_state->method_node ? - walk_state->method_node-> - name.integer : 0, - walk_state->opcode, - walk_state->aml_offset, - NULL); + status = acpi_gbl_exceptionhandler(status, + walk_state->method_node ? + walk_state->method_node-> + name.integer : 0, + walk_state->opcode, + walk_state->aml_offset, + NULL); (void)acpi_ex_enter_interpreter(); } #ifdef ACPI_DISASSEMBLER Index: linux-acpi-2.6/drivers/acpi/dispatcher/dsmthdat.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/dispatcher/dsmthdat.c +++ linux-acpi-2.6/drivers/acpi/dispatcher/dsmthdat.c @@ -405,7 +405,7 @@ acpi_ds_method_data_get_value(u16 opcode /* If slack enabled, init the local_x/arg_x to an Integer of value zero */ - if (acpi_gbl_enable_interpreter_slack) { + if (acpi_gbl_enableinterpreterslack) { object = acpi_ut_create_internal_object(ACPI_TYPE_INTEGER); if (!object) { Index: linux-acpi-2.6/drivers/acpi/dispatcher/dsobject.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/dispatcher/dsobject.c +++ linux-acpi-2.6/drivers/acpi/dispatcher/dsobject.c @@ -107,7 +107,7 @@ acpi_ds_build_internal_object(struct acp /* Check if we are resolving a named reference within a package */ if ((status == AE_NOT_FOUND) - && (acpi_gbl_enable_interpreter_slack) + && (acpi_gbl_enableinterpreterslack) && ((op->common.parent->common.aml_opcode == AML_PACKAGE_OP) Index: linux-acpi-2.6/drivers/acpi/dispatcher/dsutils.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/dispatcher/dsutils.c +++ linux-acpi-2.6/drivers/acpi/dispatcher/dsutils.c @@ -73,7 +73,7 @@ void acpi_ds_clear_implicit_return(struc /* * Slack must be enabled for this feature */ - if (!acpi_gbl_enable_interpreter_slack) { + if (!acpi_gbl_enableinterpreterslack) { return; } @@ -121,7 +121,7 @@ acpi_ds_do_implicit_return(union acpi_op * Slack must be enabled for this feature, and we must * have a valid return object */ - if ((!acpi_gbl_enable_interpreter_slack) || (!return_desc)) { + if ((!acpi_gbl_enableinterpreterslack) || (!return_desc)) { return (FALSE); } @@ -559,7 +559,7 @@ acpi_ds_create_operand(struct acpi_walk_ obj_desc = ACPI_CAST_PTR(union acpi_operand_object, - acpi_gbl_root_node); + acpi_gbl_rootnode); status = AE_OK; } else { /* Index: linux-acpi-2.6/drivers/acpi/dispatcher/dswexec.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/dispatcher/dswexec.c +++ linux-acpi-2.6/drivers/acpi/dispatcher/dswexec.c @@ -57,7 +57,7 @@ ACPI_MODULE_NAME("dswexec") /* * Dispatch table for opcode classes */ -static ACPI_EXECUTE_OP acpi_gbl_op_type_dispatch[] = { +static ACPI_EXECUTE_OP acpi_gbl_optypedispatch[] = { acpi_ex_opcode_0A_0T_1R, acpi_ex_opcode_1A_0T_0R, acpi_ex_opcode_1A_0T_1R, @@ -434,8 +434,7 @@ acpi_status acpi_ds_exec_end_op(struct a * routine. There is one routine per opcode "type" based upon the * number of opcode arguments and return type. */ - status = - acpi_gbl_op_type_dispatch[op_type] (walk_state); + status = acpi_gbl_optypedispatch[op_type] (walk_state); } else { /* * Treat constructs of the form "Store(local_x,local_x)" as noops when the Index: linux-acpi-2.6/drivers/acpi/events/evevent.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/events/evevent.c +++ linux-acpi-2.6/drivers/acpi/events/evevent.c @@ -129,13 +129,13 @@ acpi_status acpi_ev_install_fadt_gpes(vo /* FADT GPE Block 0 */ - (void)acpi_ev_initialize_gpe_block(acpi_gbl_fadt_gpe_device, - acpi_gbl_gpe_fadt_blocks[0]); + (void)acpi_ev_initialize_gpe_block(acpi_gbl_fadtgpedevice, + acpi_gbl_gpefadtblocks[0]); /* FADT GPE Block 1 */ - (void)acpi_ev_initialize_gpe_block(acpi_gbl_fadt_gpe_device, - acpi_gbl_gpe_fadt_blocks[1]); + (void)acpi_ev_initialize_gpe_block(acpi_gbl_fadtgpedevice, + acpi_gbl_gpefadtblocks[1]); (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); return_ACPI_STATUS(AE_OK); @@ -177,7 +177,7 @@ acpi_status acpi_ev_install_xrupt_handle return_ACPI_STATUS(status); } - acpi_gbl_events_initialized = TRUE; + acpi_gbl_eventsinitialized = TRUE; return_ACPI_STATUS(status); } @@ -203,14 +203,14 @@ static acpi_status acpi_ev_fixed_event_i * and enable the fixed events. */ for (i = 0; i < ACPI_NUM_FIXED_EVENTS; i++) { - acpi_gbl_fixed_event_handlers[i].handler = NULL; - acpi_gbl_fixed_event_handlers[i].context = NULL; + acpi_gbl_fixedeventhandlers[i].handler = NULL; + acpi_gbl_fixedeventhandlers[i].context = NULL; /* Enable the fixed event */ - if (acpi_gbl_fixed_event_info[i].enable_register_id != 0xFF) { + if (acpi_gbl_fixedeventinfo[i].enable_register_id != 0xFF) { status = - acpi_set_register(acpi_gbl_fixed_event_info[i]. + acpi_set_register(acpi_gbl_fixedeventinfo[i]. enable_register_id, 0, ACPI_MTX_LOCK); if (ACPI_FAILURE(status)) { @@ -263,9 +263,8 @@ u32 acpi_ev_fixed_event_detect(void) /* Both the status and enable bits must be on for this event */ - if ((fixed_status & acpi_gbl_fixed_event_info[i]. - status_bit_mask) - && (fixed_enable & acpi_gbl_fixed_event_info[i]. + if ((fixed_status & acpi_gbl_fixedeventinfo[i].status_bit_mask) + && (fixed_enable & acpi_gbl_fixedeventinfo[i]. enable_bit_mask)) { /* Found an active (signalled) event */ @@ -297,15 +296,15 @@ static u32 acpi_ev_fixed_event_dispatch( /* Clear the status bit */ - (void)acpi_set_register(acpi_gbl_fixed_event_info[event]. + (void)acpi_set_register(acpi_gbl_fixedeventinfo[event]. status_register_id, 1, ACPI_MTX_DO_NOT_LOCK); /* * Make sure we've got a handler. If not, report an error. * The event is disabled to prevent further interrupts. */ - if (NULL == acpi_gbl_fixed_event_handlers[event].handler) { - (void)acpi_set_register(acpi_gbl_fixed_event_info[event]. + if (NULL == acpi_gbl_fixedeventhandlers[event].handler) { + (void)acpi_set_register(acpi_gbl_fixedeventinfo[event]. enable_register_id, 0, ACPI_MTX_DO_NOT_LOCK); @@ -318,6 +317,6 @@ static u32 acpi_ev_fixed_event_dispatch( /* Invoke the Fixed Event handler */ - return ((acpi_gbl_fixed_event_handlers[event]. - handler) (acpi_gbl_fixed_event_handlers[event].context)); + return ((acpi_gbl_fixedeventhandlers[event]. + handler) (acpi_gbl_fixedeventhandlers[event].context)); } Index: linux-acpi-2.6/drivers/acpi/events/evgpeblk.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/events/evgpeblk.c +++ linux-acpi-2.6/drivers/acpi/events/evgpeblk.c @@ -95,7 +95,7 @@ u8 acpi_ev_valid_gpe_event(struct acpi_g /* Walk the GPE interrupt levels */ - gpe_xrupt_block = acpi_gbl_gpe_xrupt_list_head; + gpe_xrupt_block = acpi_gbl_gpexruptlisthead; while (gpe_xrupt_block) { gpe_block = gpe_xrupt_block->gpe_block_list_head; @@ -140,11 +140,11 @@ acpi_status acpi_ev_walk_gpe_list(ACPI_G ACPI_FUNCTION_TRACE("ev_walk_gpe_list"); - flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock); + flags = acpi_os_acquire_lock(acpi_gbl_gpelock); /* Walk the interrupt level descriptor list */ - gpe_xrupt_info = acpi_gbl_gpe_xrupt_list_head; + gpe_xrupt_info = acpi_gbl_gpexruptlisthead; while (gpe_xrupt_info) { /* Walk all Gpe Blocks attached to this interrupt level */ @@ -166,7 +166,7 @@ acpi_status acpi_ev_walk_gpe_list(ACPI_G } unlock_and_exit: - acpi_os_release_lock(acpi_gbl_gpe_lock, flags); + acpi_os_release_lock(acpi_gbl_gpelock, flags); return_ACPI_STATUS(status); } @@ -402,7 +402,7 @@ acpi_ev_match_prw_and_gpe(acpi_handle ob /* Use FADT-defined GPE device (from definition of _PRW) */ - target_gpe_device = acpi_gbl_fadt_gpe_device; + target_gpe_device = acpi_gbl_fadtgpedevice; /* Integer is the GPE number in the FADT described GPE blocks */ @@ -493,7 +493,7 @@ static struct acpi_gpe_xrupt_info *acpi_ /* No need for lock since we are not changing any list elements here */ - next_gpe_xrupt = acpi_gbl_gpe_xrupt_list_head; + next_gpe_xrupt = acpi_gbl_gpexruptlisthead; while (next_gpe_xrupt) { if (next_gpe_xrupt->interrupt_number == interrupt_number) { return_PTR(next_gpe_xrupt); @@ -513,9 +513,9 @@ static struct acpi_gpe_xrupt_info *acpi_ /* Install new interrupt descriptor with spin lock */ - flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock); - if (acpi_gbl_gpe_xrupt_list_head) { - next_gpe_xrupt = acpi_gbl_gpe_xrupt_list_head; + flags = acpi_os_acquire_lock(acpi_gbl_gpelock); + if (acpi_gbl_gpexruptlisthead) { + next_gpe_xrupt = acpi_gbl_gpexruptlisthead; while (next_gpe_xrupt->next) { next_gpe_xrupt = next_gpe_xrupt->next; } @@ -523,9 +523,9 @@ static struct acpi_gpe_xrupt_info *acpi_ next_gpe_xrupt->next = gpe_xrupt; gpe_xrupt->previous = next_gpe_xrupt; } else { - acpi_gbl_gpe_xrupt_list_head = gpe_xrupt; + acpi_gbl_gpexruptlisthead = gpe_xrupt; } - acpi_os_release_lock(acpi_gbl_gpe_lock, flags); + acpi_os_release_lock(acpi_gbl_gpelock, flags); /* Install new interrupt handler if not SCI_INT */ @@ -583,7 +583,7 @@ acpi_ev_delete_gpe_xrupt(struct acpi_gpe /* Unlink the interrupt block with lock */ - flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock); + flags = acpi_os_acquire_lock(acpi_gbl_gpelock); if (gpe_xrupt->previous) { gpe_xrupt->previous->next = gpe_xrupt->next; } @@ -591,7 +591,7 @@ acpi_ev_delete_gpe_xrupt(struct acpi_gpe if (gpe_xrupt->next) { gpe_xrupt->next->previous = gpe_xrupt->previous; } - acpi_os_release_lock(acpi_gbl_gpe_lock, flags); + acpi_os_release_lock(acpi_gbl_gpelock, flags); /* Free the block */ @@ -636,7 +636,7 @@ acpi_ev_install_gpe_block(struct acpi_gp /* Install the new block at the end of the list with lock */ - flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock); + flags = acpi_os_acquire_lock(acpi_gbl_gpelock); if (gpe_xrupt_block->gpe_block_list_head) { next_gpe_block = gpe_xrupt_block->gpe_block_list_head; while (next_gpe_block->next) { @@ -650,7 +650,7 @@ acpi_ev_install_gpe_block(struct acpi_gp } gpe_block->xrupt_block = gpe_xrupt_block; - acpi_os_release_lock(acpi_gbl_gpe_lock, flags); + acpi_os_release_lock(acpi_gbl_gpelock, flags); unlock_and_exit: status = acpi_ut_release_mutex(ACPI_MTX_EVENTS); @@ -696,7 +696,7 @@ acpi_status acpi_ev_delete_gpe_block(str } else { /* Remove the block on this interrupt with lock */ - flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock); + flags = acpi_os_acquire_lock(acpi_gbl_gpelock); if (gpe_block->previous) { gpe_block->previous->next = gpe_block->next; } else { @@ -707,7 +707,7 @@ acpi_status acpi_ev_delete_gpe_block(str if (gpe_block->next) { gpe_block->next->previous = gpe_block->previous; } - acpi_os_release_lock(acpi_gbl_gpe_lock, flags); + acpi_os_release_lock(acpi_gbl_gpelock, flags); } /* Free the gpe_block */ @@ -818,7 +818,7 @@ acpi_ev_create_gpe_info_blocks(struct ac /* Init the event_info for each GPE within this register */ for (j = 0; j < ACPI_GPE_REGISTER_WIDTH; j++) { - this_event->register_bit = acpi_gbl_decode_to8bit[j]; + this_event->register_bit = acpi_gbl_decodeto8bit[j]; this_event->register_info = this_register; this_event++; } @@ -992,7 +992,7 @@ acpi_ev_initialize_gpe_block(struct acpi * Runtime option: Should wake GPEs be enabled at runtime? The default * is no, they should only be enabled just as the machine goes to sleep. */ - if (acpi_gbl_leave_wake_gpes_disabled) { + if (acpi_gbl_leavewakegpesdisabled) { /* * Differentiate runtime vs wake GPEs, via the _PRW control methods. * Each GPE that has one or more _PRWs that reference it is by @@ -1119,11 +1119,11 @@ acpi_status acpi_ev_gpe_initialize(void) /* Install GPE Block 0 */ - status = acpi_ev_create_gpe_block(acpi_gbl_fadt_gpe_device, + status = acpi_ev_create_gpe_block(acpi_gbl_fadtgpedevice, &acpi_gbl_FADT->xgpe0_blk, register_count0, 0, acpi_gbl_FADT->sci_int, - &acpi_gbl_gpe_fadt_blocks[0]); + &acpi_gbl_gpefadtblocks[0]); if (ACPI_FAILURE(status)) { ACPI_EXCEPTION((AE_INFO, status, @@ -1155,12 +1155,12 @@ acpi_status acpi_ev_gpe_initialize(void) /* Install GPE Block 1 */ status = - acpi_ev_create_gpe_block(acpi_gbl_fadt_gpe_device, + acpi_ev_create_gpe_block(acpi_gbl_fadtgpedevice, &acpi_gbl_FADT->xgpe1_blk, register_count1, acpi_gbl_FADT->gpe1_base, acpi_gbl_FADT->sci_int, - &acpi_gbl_gpe_fadt_blocks + &acpi_gbl_gpefadtblocks [1]); if (ACPI_FAILURE(status)) { Index: linux-acpi-2.6/drivers/acpi/events/evgpe.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/events/evgpe.c +++ linux-acpi-2.6/drivers/acpi/events/evgpe.c @@ -318,7 +318,7 @@ struct acpi_gpe_event_info *acpi_ev_get_ /* Examine GPE Block 0 and 1 (These blocks are permanent) */ for (i = 0; i < ACPI_MAX_GPE_BLOCKS; i++) { - gpe_block = acpi_gbl_gpe_fadt_blocks[i]; + gpe_block = acpi_gbl_gpefadtblocks[i]; if (gpe_block) { if ((gpe_number >= gpe_block->block_base_number) && (gpe_number < @@ -395,7 +395,7 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_x /* Examine all GPE blocks attached to this interrupt level */ - flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock); + flags = acpi_os_acquire_lock(acpi_gbl_gpelock); gpe_block = gpe_xrupt_list->gpe_block_list_head; while (gpe_block) { /* @@ -453,7 +453,7 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_x /* Examine one GPE bit */ if (enabled_status_byte & - acpi_gbl_decode_to8bit[j]) { + acpi_gbl_decodeto8bit[j]) { /* * Found an active GPE. Dispatch the event to a handler * or method. @@ -476,7 +476,7 @@ u32 acpi_ev_gpe_detect(struct acpi_gpe_x unlock_and_exit: - acpi_os_release_lock(acpi_gbl_gpe_lock, flags); + acpi_os_release_lock(acpi_gbl_gpelock, flags); return (int_status); } @@ -617,7 +617,7 @@ acpi_ev_gpe_dispatch(struct acpi_gpe_eve /* Save current system state */ - if (acpi_gbl_system_awake_and_running) { + if (acpi_gbl_systemawakeandrunning) { ACPI_SET_BIT(gpe_event_info->flags, ACPI_GPE_SYSTEM_RUNNING); } else { ACPI_CLEAR_BIT(gpe_event_info->flags, ACPI_GPE_SYSTEM_RUNNING); Index: linux-acpi-2.6/drivers/acpi/events/evmisc.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/events/evmisc.c +++ linux-acpi-2.6/drivers/acpi/events/evmisc.c @@ -176,9 +176,9 @@ acpi_ev_queue_notify_request(struct acpi /* If there is any handler to run, schedule the dispatcher */ - if ((acpi_gbl_system_notify.handler + if ((acpi_gbl_systemnotify.handler && (notify_value <= ACPI_MAX_SYS_NOTIFY)) - || (acpi_gbl_device_notify.handler + || (acpi_gbl_devicenotify.handler && (notify_value > ACPI_MAX_SYS_NOTIFY)) || handler_obj) { notify_info = acpi_ut_create_generic_state(); if (!notify_info) { @@ -244,16 +244,16 @@ static void ACPI_SYSTEM_XFACE acpi_ev_no /* Global system notification handler */ - if (acpi_gbl_system_notify.handler) { - global_handler = acpi_gbl_system_notify.handler; - global_context = acpi_gbl_system_notify.context; + if (acpi_gbl_systemnotify.handler) { + global_handler = acpi_gbl_systemnotify.handler; + global_context = acpi_gbl_systemnotify.context; } } else { /* Global driver notification handler */ - if (acpi_gbl_device_notify.handler) { - global_handler = acpi_gbl_device_notify.handler; - global_context = acpi_gbl_device_notify.context; + if (acpi_gbl_devicenotify.handler) { + global_handler = acpi_gbl_devicenotify.handler; + global_context = acpi_gbl_devicenotify.context; } } @@ -298,13 +298,12 @@ static void ACPI_SYSTEM_XFACE acpi_ev_gl /* Signal threads that are waiting for the lock */ - if (acpi_gbl_global_lock_thread_count) { + if (acpi_gbl_globallockthreadcount) { /* Send sufficient units to the semaphore */ - status = - acpi_os_signal_semaphore(acpi_gbl_global_lock_semaphore, - acpi_gbl_global_lock_thread_count); + status = acpi_os_signal_semaphore(acpi_gbl_globallocksemaphore, + acpi_gbl_globallockthreadcount); if (ACPI_FAILURE(status)) { ACPI_ERROR((AE_INFO, "Could not signal Global Lock semaphore")); @@ -336,12 +335,12 @@ static u32 acpi_ev_global_lock_handler(v * If we don't get it now, it will be marked pending and we will * take another interrupt when it becomes free. */ - ACPI_ACQUIRE_GLOBAL_LOCK(acpi_gbl_common_fACS.global_lock, acquired); + ACPI_ACQUIRE_GLOBAL_LOCK(acpi_gbl_commonFACS.global_lock, acquired); if (acquired) { /* Got the lock, now wake all threads waiting for it */ - acpi_gbl_global_lock_acquired = TRUE; + acpi_gbl_globallockacquired = TRUE; /* Run the Global Lock thread which will signal all waiting threads */ @@ -377,7 +376,7 @@ acpi_status acpi_ev_init_global_lock_han ACPI_FUNCTION_TRACE("ev_init_global_lock_handler"); - acpi_gbl_global_lock_present = TRUE; + acpi_gbl_globallockpresent = TRUE; status = acpi_install_fixed_event_handler(ACPI_EVENT_GLOBAL, acpi_ev_global_lock_handler, NULL); @@ -393,7 +392,7 @@ acpi_status acpi_ev_init_global_lock_han ACPI_ERROR((AE_INFO, "No response from Global Lock hardware, disabling lock")); - acpi_gbl_global_lock_present = FALSE; + acpi_gbl_globallockpresent = FALSE; status = AE_OK; } @@ -422,26 +421,26 @@ acpi_status acpi_ev_acquire_global_lock( #ifndef ACPI_APPLICATION /* Make sure that we actually have a global lock */ - if (!acpi_gbl_global_lock_present) { + if (!acpi_gbl_globallockpresent) { return_ACPI_STATUS(AE_NO_GLOBAL_LOCK); } #endif /* One more thread wants the global lock */ - acpi_gbl_global_lock_thread_count++; + acpi_gbl_globallockthreadcount++; /* * If we (OS side vs. BIOS side) have the hardware lock already, * we are done */ - if (acpi_gbl_global_lock_acquired) { + if (acpi_gbl_globallockacquired) { return_ACPI_STATUS(AE_OK); } /* We must acquire the actual hardware lock */ - ACPI_ACQUIRE_GLOBAL_LOCK(acpi_gbl_common_fACS.global_lock, acquired); + ACPI_ACQUIRE_GLOBAL_LOCK(acpi_gbl_commonFACS.global_lock, acquired); if (acquired) { /* We got the lock */ @@ -449,7 +448,7 @@ acpi_status acpi_ev_acquire_global_lock( ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Acquired the HW Global Lock\n")); - acpi_gbl_global_lock_acquired = TRUE; + acpi_gbl_globallockacquired = TRUE; return_ACPI_STATUS(AE_OK); } @@ -463,7 +462,7 @@ acpi_status acpi_ev_acquire_global_lock( * Acquire the global lock semaphore first. * Since this wait will block, we must release the interpreter */ - status = acpi_ex_system_wait_semaphore(acpi_gbl_global_lock_semaphore, + status = acpi_ex_system_wait_semaphore(acpi_gbl_globallocksemaphore, timeout); return_ACPI_STATUS(status); } @@ -487,7 +486,7 @@ acpi_status acpi_ev_release_global_lock( ACPI_FUNCTION_TRACE("ev_release_global_lock"); - if (!acpi_gbl_global_lock_thread_count) { + if (!acpi_gbl_globallockthreadcount) { ACPI_WARNING((AE_INFO, "Cannot release HW Global Lock, it has not been acquired")); return_ACPI_STATUS(AE_NOT_ACQUIRED); @@ -495,8 +494,8 @@ acpi_status acpi_ev_release_global_lock( /* One fewer thread has the global lock */ - acpi_gbl_global_lock_thread_count--; - if (acpi_gbl_global_lock_thread_count) { + acpi_gbl_globallockthreadcount--; + if (acpi_gbl_globallockthreadcount) { /* There are still some threads holding the lock, cannot release */ @@ -507,8 +506,8 @@ acpi_status acpi_ev_release_global_lock( * No more threads holding lock, we can do the actual hardware * release */ - ACPI_RELEASE_GLOBAL_LOCK(acpi_gbl_common_fACS.global_lock, pending); - acpi_gbl_global_lock_acquired = FALSE; + ACPI_RELEASE_GLOBAL_LOCK(acpi_gbl_commonFACS.global_lock, pending); + acpi_gbl_globallockacquired = FALSE; /* * If the pending bit was set, we must write GBL_RLS to the control @@ -541,7 +540,7 @@ void acpi_ev_terminate(void) ACPI_FUNCTION_TRACE("ev_terminate"); - if (acpi_gbl_events_initialized) { + if (acpi_gbl_eventsinitialized) { /* * Disable all event-related functionality. * In all cases, on error, print a message but obviously we don't abort. @@ -576,7 +575,7 @@ void acpi_ev_terminate(void) /* Return to original mode if necessary */ - if (acpi_gbl_original_mode == ACPI_SYS_MODE_LEGACY) { + if (acpi_gbl_originalmode == ACPI_SYS_MODE_LEGACY) { status = acpi_disable(); if (ACPI_FAILURE(status)) { ACPI_WARNING((AE_INFO, "acpi_disable failed")); Index: linux-acpi-2.6/drivers/acpi/events/evregion.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/events/evregion.c +++ linux-acpi-2.6/drivers/acpi/events/evregion.c @@ -49,7 +49,7 @@ #define _COMPONENT ACPI_EVENTS ACPI_MODULE_NAME("evregion") #define ACPI_NUM_DEFAULT_SPACES 4 -static u8 acpi_gbl_default_address_spaces[ACPI_NUM_DEFAULT_SPACES] = { +static u8 acpi_gbl_defaultaddressspaces[ACPI_NUM_DEFAULT_SPACES] = { ACPI_ADR_SPACE_SYSTEM_MEMORY, ACPI_ADR_SPACE_SYSTEM_IO, ACPI_ADR_SPACE_PCI_CONFIG, @@ -109,8 +109,8 @@ acpi_status acpi_ev_install_region_handl * Similar for AE_SAME_HANDLER. */ for (i = 0; i < ACPI_NUM_DEFAULT_SPACES; i++) { - status = acpi_ev_install_space_handler(acpi_gbl_root_node, - acpi_gbl_default_address_spaces + status = acpi_ev_install_space_handler(acpi_gbl_rootnode, + acpi_gbl_defaultaddressspaces [i], ACPI_DEFAULT_HANDLER, NULL, NULL); @@ -168,8 +168,8 @@ acpi_status acpi_ev_initialize_op_region /* TBD: Make sure handler is the DEFAULT handler, otherwise * _REG will have already been run. */ - status = acpi_ev_execute_reg_methods(acpi_gbl_root_node, - acpi_gbl_default_address_spaces + status = acpi_ev_execute_reg_methods(acpi_gbl_rootnode, + acpi_gbl_defaultaddressspaces [i]); } @@ -663,7 +663,7 @@ acpi_ev_install_handler(acpi_handle obj_ * that are allowed to have address space handlers */ if ((node->type != ACPI_TYPE_DEVICE) && - (node->type != ACPI_TYPE_REGION) && (node != acpi_gbl_root_node)) { + (node->type != ACPI_TYPE_REGION) && (node != acpi_gbl_rootnode)) { return (AE_OK); } @@ -783,7 +783,7 @@ acpi_ev_install_space_handler(struct acp */ if ((node->type != ACPI_TYPE_DEVICE) && (node->type != ACPI_TYPE_PROCESSOR) && - (node->type != ACPI_TYPE_THERMAL) && (node != acpi_gbl_root_node)) { + (node->type != ACPI_TYPE_THERMAL) && (node != acpi_gbl_rootnode)) { status = AE_BAD_PARAMETER; goto unlock_and_exit; } @@ -1010,7 +1010,7 @@ acpi_ev_execute_reg_methods(struct acpi_ * * PARAMETERS: walk_namespace callback * - * DESCRIPTION: Run _REg method for region objects of the requested space_iD + * DESCRIPTION: run _REG method for region objects of the requested space_iD * ******************************************************************************/ @@ -1036,7 +1036,7 @@ acpi_ev_reg_run(acpi_handle obj_handle, * We only care about regions.and objects * that are allowed to have address space handlers */ - if ((node->type != ACPI_TYPE_REGION) && (node != acpi_gbl_root_node)) { + if ((node->type != ACPI_TYPE_REGION) && (node != acpi_gbl_rootnode)) { return (AE_OK); } Index: linux-acpi-2.6/drivers/acpi/events/evrgnini.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/events/evrgnini.c +++ linux-acpi-2.6/drivers/acpi/events/evrgnini.c @@ -198,12 +198,12 @@ acpi_ev_pci_config_region_setup(acpi_han * to scan upward for a PCI Root bridge and re-associate the op_region * handlers with that device. */ - if (handler_obj->address_space.node == acpi_gbl_root_node) { + if (handler_obj->address_space.node == acpi_gbl_rootnode) { /* Start search from the parent object */ pci_root_node = parent_node; - while (pci_root_node != acpi_gbl_root_node) { + while (pci_root_node != acpi_gbl_rootnode) { status = acpi_ut_execute_HID(pci_root_node, &object_hID); if (ACPI_SUCCESS(status)) { @@ -477,7 +477,7 @@ acpi_ev_initialize_region(union acpi_ope /* * The following loop depends upon the root Node having no parent - * ie: acpi_gbl_root_node->parent_entry being set to NULL + * ie: acpi_gbl_RootNode->parent_entry being set to NULL */ while (node) { Index: linux-acpi-2.6/drivers/acpi/events/evsci.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/events/evsci.c +++ linux-acpi-2.6/drivers/acpi/events/evsci.c @@ -144,7 +144,7 @@ u32 acpi_ev_install_sci_handler(void) status = acpi_os_install_interrupt_handler((u32) acpi_gbl_FADT->sci_int, acpi_ev_sci_xrupt_handler, - acpi_gbl_gpe_xrupt_list_head); + acpi_gbl_gpexruptlisthead); return_ACPI_STATUS(status); } Index: linux-acpi-2.6/drivers/acpi/events/evxface.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/events/evxface.c +++ linux-acpi-2.6/drivers/acpi/events/evxface.c @@ -77,14 +77,14 @@ acpi_status acpi_install_exception_handl /* Don't allow two handlers. */ - if (acpi_gbl_exception_handler) { + if (acpi_gbl_exceptionhandler) { status = AE_ALREADY_EXISTS; goto cleanup; } /* Install the handler */ - acpi_gbl_exception_handler = handler; + acpi_gbl_exceptionhandler = handler; cleanup: (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS); @@ -129,15 +129,15 @@ acpi_install_fixed_event_handler(u32 eve /* Don't allow two handlers. */ - if (NULL != acpi_gbl_fixed_event_handlers[event].handler) { + if (NULL != acpi_gbl_fixedeventhandlers[event].handler) { status = AE_ALREADY_EXISTS; goto cleanup; } /* Install the handler before enabling the event */ - acpi_gbl_fixed_event_handlers[event].handler = handler; - acpi_gbl_fixed_event_handlers[event].context = context; + acpi_gbl_fixedeventhandlers[event].handler = handler; + acpi_gbl_fixedeventhandlers[event].context = context; status = acpi_clear_event(event); if (ACPI_SUCCESS(status)) @@ -148,8 +148,8 @@ acpi_install_fixed_event_handler(u32 eve /* Remove the handler */ - acpi_gbl_fixed_event_handlers[event].handler = NULL; - acpi_gbl_fixed_event_handlers[event].context = NULL; + acpi_gbl_fixedeventhandlers[event].handler = NULL; + acpi_gbl_fixedeventhandlers[event].context = NULL; } else { ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Enabled fixed event %X, Handler=%p\n", event, @@ -200,8 +200,8 @@ acpi_remove_fixed_event_handler(u32 even /* Always Remove the handler */ - acpi_gbl_fixed_event_handlers[event].handler = NULL; - acpi_gbl_fixed_event_handlers[event].context = NULL; + acpi_gbl_fixedeventhandlers[event].handler = NULL; + acpi_gbl_fixedeventhandlers[event].context = NULL; if (ACPI_FAILURE(status)) { ACPI_WARNING((AE_INFO, @@ -279,23 +279,23 @@ acpi_install_notify_handler(acpi_handle /* Make sure the handler is not already installed */ if (((handler_type & ACPI_SYSTEM_NOTIFY) && - acpi_gbl_system_notify.handler) || + acpi_gbl_systemnotify.handler) || ((handler_type & ACPI_DEVICE_NOTIFY) && - acpi_gbl_device_notify.handler)) { + acpi_gbl_devicenotify.handler)) { status = AE_ALREADY_EXISTS; goto unlock_and_exit; } if (handler_type & ACPI_SYSTEM_NOTIFY) { - acpi_gbl_system_notify.node = node; - acpi_gbl_system_notify.handler = handler; - acpi_gbl_system_notify.context = context; + acpi_gbl_systemnotify.node = node; + acpi_gbl_systemnotify.handler = handler; + acpi_gbl_systemnotify.context = context; } if (handler_type & ACPI_DEVICE_NOTIFY) { - acpi_gbl_device_notify.node = node; - acpi_gbl_device_notify.handler = handler; - acpi_gbl_device_notify.context = context; + acpi_gbl_devicenotify.node = node; + acpi_gbl_devicenotify.handler = handler; + acpi_gbl_devicenotify.context = context; } /* Global notify handler installed */ @@ -441,9 +441,9 @@ acpi_remove_notify_handler(acpi_handle d "Removing notify handler for namespace root object\n")); if (((handler_type & ACPI_SYSTEM_NOTIFY) && - !acpi_gbl_system_notify.handler) || + !acpi_gbl_systemnotify.handler) || ((handler_type & ACPI_DEVICE_NOTIFY) && - !acpi_gbl_device_notify.handler)) { + !acpi_gbl_devicenotify.handler)) { status = AE_NOT_EXIST; goto unlock_and_exit; } @@ -458,15 +458,15 @@ acpi_remove_notify_handler(acpi_handle d } if (handler_type & ACPI_SYSTEM_NOTIFY) { - acpi_gbl_system_notify.node = NULL; - acpi_gbl_system_notify.handler = NULL; - acpi_gbl_system_notify.context = NULL; + acpi_gbl_systemnotify.node = NULL; + acpi_gbl_systemnotify.handler = NULL; + acpi_gbl_systemnotify.context = NULL; } if (handler_type & ACPI_DEVICE_NOTIFY) { - acpi_gbl_device_notify.node = NULL; - acpi_gbl_device_notify.handler = NULL; - acpi_gbl_device_notify.context = NULL; + acpi_gbl_devicenotify.node = NULL; + acpi_gbl_devicenotify.handler = NULL; + acpi_gbl_devicenotify.context = NULL; } } @@ -618,7 +618,7 @@ acpi_install_gpe_handler(acpi_handle gpe /* Install the handler */ - flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock); + flags = acpi_os_acquire_lock(acpi_gbl_gpelock); gpe_event_info->dispatch.handler = handler; /* Setup up dispatch flags to indicate handler (vs. method) */ @@ -626,7 +626,7 @@ acpi_install_gpe_handler(acpi_handle gpe gpe_event_info->flags &= ~(ACPI_GPE_XRUPT_TYPE_MASK | ACPI_GPE_DISPATCH_MASK); /* Clear bits */ gpe_event_info->flags |= (u8) (type | ACPI_GPE_DISPATCH_HANDLER); - acpi_os_release_lock(acpi_gbl_gpe_lock, flags); + acpi_os_release_lock(acpi_gbl_gpelock, flags); unlock_and_exit: (void)acpi_ut_release_mutex(ACPI_MTX_EVENTS); @@ -713,7 +713,7 @@ acpi_remove_gpe_handler(acpi_handle gpe_ /* Remove the handler */ - flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock); + flags = acpi_os_acquire_lock(acpi_gbl_gpelock); handler = gpe_event_info->dispatch.handler; /* Restore Method node (if any), set dispatch flags */ @@ -723,7 +723,7 @@ acpi_remove_gpe_handler(acpi_handle gpe_ if (handler->method_node) { gpe_event_info->flags |= ACPI_GPE_DISPATCH_METHOD; } - acpi_os_release_lock(acpi_gbl_gpe_lock, flags); + acpi_os_release_lock(acpi_gbl_gpelock, flags); /* Now we can free the handler object */ @@ -767,8 +767,8 @@ acpi_status acpi_acquire_global_lock(u16 acpi_ex_exit_interpreter(); if (ACPI_SUCCESS(status)) { - acpi_gbl_global_lock_handle++; - *handle = acpi_gbl_global_lock_handle; + acpi_gbl_globallockhandle++; + *handle = acpi_gbl_globallockhandle; } return (status); @@ -792,7 +792,7 @@ acpi_status acpi_release_global_lock(u32 { acpi_status status; - if (handle != acpi_gbl_global_lock_handle) { + if (handle != acpi_gbl_globallockhandle) { return (AE_NOT_ACQUIRED); } Index: linux-acpi-2.6/drivers/acpi/events/evxfevnt.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/events/evxfevnt.c +++ linux-acpi-2.6/drivers/acpi/events/evxfevnt.c @@ -168,8 +168,8 @@ acpi_status acpi_enable_event(u32 event, * enable register bit) */ status = - acpi_set_register(acpi_gbl_fixed_event_info[event]. - enable_register_id, 1, ACPI_MTX_LOCK); + acpi_set_register(acpi_gbl_fixedeventinfo[event].enable_register_id, + 1, ACPI_MTX_LOCK); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } @@ -177,8 +177,8 @@ acpi_status acpi_enable_event(u32 event, /* Make sure that the hardware responded */ status = - acpi_get_register(acpi_gbl_fixed_event_info[event]. - enable_register_id, &value, ACPI_MTX_LOCK); + acpi_get_register(acpi_gbl_fixedeventinfo[event].enable_register_id, + &value, ACPI_MTX_LOCK); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } @@ -369,15 +369,15 @@ acpi_status acpi_disable_event(u32 event * enable register bit) */ status = - acpi_set_register(acpi_gbl_fixed_event_info[event]. - enable_register_id, 0, ACPI_MTX_LOCK); + acpi_set_register(acpi_gbl_fixedeventinfo[event].enable_register_id, + 0, ACPI_MTX_LOCK); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } status = - acpi_get_register(acpi_gbl_fixed_event_info[event]. - enable_register_id, &value, ACPI_MTX_LOCK); + acpi_get_register(acpi_gbl_fixedeventinfo[event].enable_register_id, + &value, ACPI_MTX_LOCK); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } @@ -423,8 +423,8 @@ acpi_status acpi_clear_event(u32 event) * status register bit) */ status = - acpi_set_register(acpi_gbl_fixed_event_info[event]. - status_register_id, 1, ACPI_MTX_LOCK); + acpi_set_register(acpi_gbl_fixedeventinfo[event].status_register_id, + 1, ACPI_MTX_LOCK); return_ACPI_STATUS(status); } @@ -512,8 +512,8 @@ acpi_status acpi_get_event_status(u32 ev /* Get the status of the requested fixed event */ status = - acpi_get_register(acpi_gbl_fixed_event_info[event]. - status_register_id, event_status, ACPI_MTX_LOCK); + acpi_get_register(acpi_gbl_fixedeventinfo[event].status_register_id, + event_status, ACPI_MTX_LOCK); return_ACPI_STATUS(status); } Index: linux-acpi-2.6/drivers/acpi/executer/exconfig.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/executer/exconfig.c +++ linux-acpi-2.6/drivers/acpi/executer/exconfig.c @@ -204,7 +204,7 @@ acpi_ex_load_table_op(struct acpi_walk_s /* Default nodes */ start_node = walk_state->scope_info->scope.node; - parent_node = acpi_gbl_root_node; + parent_node = acpi_gbl_rootnode; /* root_path (optional parameter) */ @@ -412,11 +412,11 @@ acpi_ex_load_op(union acpi_operand_objec /* The table must be either an SSDT or a PSDT */ if ((!ACPI_STRNCMP(table_ptr->signature, - acpi_gbl_table_data[ACPI_TABLE_PSDT].signature, - acpi_gbl_table_data[ACPI_TABLE_PSDT].sig_length)) && + acpi_gbl_tabledata[ACPI_TABLE_PSDT].signature, + acpi_gbl_tabledata[ACPI_TABLE_PSDT].sig_length)) && (!ACPI_STRNCMP(table_ptr->signature, - acpi_gbl_table_data[ACPI_TABLE_SSDT].signature, - acpi_gbl_table_data[ACPI_TABLE_SSDT].sig_length))) { + acpi_gbl_tabledata[ACPI_TABLE_SSDT].signature, + acpi_gbl_tabledata[ACPI_TABLE_SSDT].sig_length))) { ACPI_ERROR((AE_INFO, "Table has invalid signature [%4.4s], must be SSDT or PSDT", table_ptr->signature)); @@ -426,7 +426,7 @@ acpi_ex_load_op(union acpi_operand_objec /* Install the new table into the local data structures */ - status = acpi_ex_add_table(table_ptr, acpi_gbl_root_node, &ddb_handle); + status = acpi_ex_add_table(table_ptr, acpi_gbl_rootnode, &ddb_handle); if (ACPI_FAILURE(status)) { /* On error, table_ptr was deallocated above */ Index: linux-acpi-2.6/drivers/acpi/executer/exconvrt.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/executer/exconvrt.c +++ linux-acpi-2.6/drivers/acpi/executer/exconvrt.c @@ -140,8 +140,8 @@ acpi_ex_convert_to_integer(union acpi_op /* Transfer no more than an integer's worth of data */ - if (count > acpi_gbl_integer_byte_width) { - count = acpi_gbl_integer_byte_width; + if (count > acpi_gbl_integerbytewidth) { + count = acpi_gbl_integerbytewidth; } /* @@ -216,7 +216,7 @@ acpi_ex_convert_to_buffer(union acpi_ope * Need enough space for one integer */ return_desc = - acpi_ut_create_buffer_object(acpi_gbl_integer_byte_width); + acpi_ut_create_buffer_object(acpi_gbl_integerbytewidth); if (!return_desc) { return_ACPI_STATUS(AE_NO_MEMORY); } @@ -226,7 +226,7 @@ acpi_ex_convert_to_buffer(union acpi_ope new_buf = return_desc->buffer.pointer; ACPI_MEMCPY(new_buf, &obj_desc->integer.value, - acpi_gbl_integer_byte_width); + acpi_gbl_integerbytewidth); break; case ACPI_TYPE_STRING: @@ -427,7 +427,7 @@ acpi_ex_convert_to_string(union acpi_ope /* Two hex string characters for each integer byte */ - string_length = ACPI_MUL_2(acpi_gbl_integer_byte_width); + string_length = ACPI_MUL_2(acpi_gbl_integerbytewidth); break; } @@ -448,7 +448,7 @@ acpi_ex_convert_to_string(union acpi_ope string_length = acpi_ex_convert_to_ascii(obj_desc->integer.value, base, new_buf, - acpi_gbl_integer_byte_width); + acpi_gbl_integerbytewidth); /* Null terminate at the correct place */ Index: linux-acpi-2.6/drivers/acpi/executer/excreate.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/executer/excreate.c +++ linux-acpi-2.6/drivers/acpi/executer/excreate.c @@ -578,7 +578,7 @@ acpi_ex_create_method(u8 * aml_start, * Get the concurrency count. If required, a semaphore will be * created for this method when it is parsed. */ - if (acpi_gbl_all_methods_serialized) { + if (acpi_gbl_allmethodsserialized) { obj_desc->method.concurrency = 1; obj_desc->method.method_flags |= AML_METHOD_SERIALIZED; } else if (method_flags & AML_METHOD_SERIALIZED) { Index: linux-acpi-2.6/drivers/acpi/executer/exfield.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/executer/exfield.c +++ linux-acpi-2.6/drivers/acpi/executer/exfield.c @@ -141,7 +141,7 @@ acpi_ex_read_data_from_field(struct acpi */ length = (acpi_size) ACPI_ROUND_BITS_UP_TO_BYTES(obj_desc->field.bit_length); - if (length > acpi_gbl_integer_byte_width) { + if (length > acpi_gbl_integerbytewidth) { /* Field is too large for an Integer, create a Buffer instead */ @@ -158,7 +158,7 @@ acpi_ex_read_data_from_field(struct acpi return_ACPI_STATUS(AE_NO_MEMORY); } - length = acpi_gbl_integer_byte_width; + length = acpi_gbl_integerbytewidth; buffer_desc->integer.value = 0; buffer = &buffer_desc->integer.value; } Index: linux-acpi-2.6/drivers/acpi/executer/exfldio.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/executer/exfldio.c +++ linux-acpi-2.6/drivers/acpi/executer/exfldio.c @@ -139,7 +139,7 @@ acpi_ex_setup_region(union acpi_operand_ field_datum_byte_offset + obj_desc->common_field. access_byte_width)) { - if (acpi_gbl_enable_interpreter_slack) { + if (acpi_gbl_enableinterpreterslack) { /* * 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 Index: linux-acpi-2.6/drivers/acpi/executer/exmisc.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/executer/exmisc.c +++ linux-acpi-2.6/drivers/acpi/executer/exmisc.c @@ -305,7 +305,7 @@ acpi_ex_do_concatenate(union acpi_operan return_desc = acpi_ut_create_buffer_object((acpi_size) ACPI_MUL_2 - (acpi_gbl_integer_byte_width)); + (acpi_gbl_integerbytewidth)); if (!return_desc) { status = AE_NO_MEMORY; goto cleanup; @@ -316,13 +316,13 @@ acpi_ex_do_concatenate(union acpi_operan /* Copy the first integer, LSB first */ ACPI_MEMCPY(new_buf, &operand0->integer.value, - acpi_gbl_integer_byte_width); + acpi_gbl_integerbytewidth); /* Copy the second integer (LSB first) after the first */ - ACPI_MEMCPY(new_buf + acpi_gbl_integer_byte_width, + ACPI_MEMCPY(new_buf + acpi_gbl_integerbytewidth, &local_operand1->integer.value, - acpi_gbl_integer_byte_width); + acpi_gbl_integerbytewidth); break; case ACPI_TYPE_STRING: Index: linux-acpi-2.6/drivers/acpi/executer/exmutex.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/executer/exmutex.c +++ linux-acpi-2.6/drivers/acpi/executer/exmutex.c @@ -179,7 +179,7 @@ acpi_ex_acquire_mutex(union acpi_operand if ((obj_desc->mutex.owner_thread->thread_id == walk_state->thread->thread_id) || (obj_desc->mutex.semaphore == - acpi_gbl_global_lock_semaphore)) { + acpi_gbl_globallocksemaphore)) { /* * The mutex is already owned by this thread, * just increment the acquisition depth @@ -264,7 +264,7 @@ acpi_ex_release_mutex(union acpi_operand */ if ((obj_desc->mutex.owner_thread->thread_id != walk_state->thread->thread_id) - && (obj_desc->mutex.semaphore != acpi_gbl_global_lock_semaphore)) { + && (obj_desc->mutex.semaphore != acpi_gbl_globallocksemaphore)) { ACPI_ERROR((AE_INFO, "Thread %X cannot release Mutex [%4.4s] acquired by thread %X", walk_state->thread->thread_id, Index: linux-acpi-2.6/drivers/acpi/executer/exoparg1.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/executer/exoparg1.c +++ linux-acpi-2.6/drivers/acpi/executer/exoparg1.c @@ -340,7 +340,7 @@ acpi_status acpi_ex_opcode_1A_1T_1R(stru /* Convert each BCD digit (each is one nybble wide) */ for (i = 0; - (i < acpi_gbl_integer_nybble_width) && (digit > 0); + (i < acpi_gbl_integernybblewidth) && (digit > 0); i++) { /* Get the least significant 4-bit BCD digit */ @@ -381,7 +381,7 @@ acpi_status acpi_ex_opcode_1A_1T_1R(stru /* Each BCD digit is one nybble wide */ for (i = 0; - (i < acpi_gbl_integer_nybble_width) && (digit > 0); + (i < acpi_gbl_integernybblewidth) && (digit > 0); i++) { (void)acpi_ut_short_divide(digit, 10, &digit, &temp32); @@ -414,7 +414,7 @@ acpi_status acpi_ex_opcode_1A_1T_1R(stru * (There are really two return values) */ if ((struct acpi_namespace_node *)operand[0] == - acpi_gbl_root_node) { + acpi_gbl_rootnode) { /* * This means that the object does not exist in the namespace, * return FALSE @@ -734,7 +734,7 @@ acpi_status acpi_ex_opcode_1A_0T_1R(stru */ switch (type) { case ACPI_TYPE_INTEGER: - value = acpi_gbl_integer_byte_width; + value = acpi_gbl_integerbytewidth; break; case ACPI_TYPE_BUFFER: Index: linux-acpi-2.6/drivers/acpi/executer/exprep.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/executer/exprep.c +++ linux-acpi-2.6/drivers/acpi/executer/exprep.c @@ -519,13 +519,20 @@ acpi_status acpi_ex_prep_field_value(str acpi_ut_add_reference(obj_desc->index_field.index_obj); /* + * February 2006: Changed to match MS behavior + * * The value written to the Index register is the byte offset of the - * target field - * Note: may change code to: ACPI_DIV_8 (Info->field_bit_position) + * target field. + * + * Previously, the value was calculated as an index in terms of the + * width of the Data register, as below: + * + * obj_desc->index_field.Value = (u32) + * (Info->field_bit_position / ACPI_MUL_8 ( + * obj_desc->Field.access_byte_width)); */ - obj_desc->index_field.value = (u32) - (info->field_bit_position / - ACPI_MUL_8(obj_desc->field.access_byte_width)); + obj_desc->index_field.value = + (u32) ACPI_DIV_8(info->field_bit_position); ACPI_DEBUG_PRINT((ACPI_DB_BFIELD, "index_field: bit_off %X, Off %X, Value %X, Gran %X, Index %p, Data %p\n", Index: linux-acpi-2.6/drivers/acpi/executer/exresop.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/executer/exresop.c +++ linux-acpi-2.6/drivers/acpi/executer/exresop.c @@ -655,7 +655,7 @@ acpi_ex_resolve_operands(u16 opcode, default: - if (acpi_gbl_enable_interpreter_slack) { + if (acpi_gbl_enableinterpreterslack) { /* * Enable original behavior of Store(), allowing any and all * objects as the source operand. The ACPI spec does not Index: linux-acpi-2.6/drivers/acpi/executer/exstore.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/executer/exstore.c +++ linux-acpi-2.6/drivers/acpi/executer/exstore.c @@ -128,7 +128,7 @@ acpi_ex_do_debug_object(union acpi_opera /* Output correct integer width */ - if (acpi_gbl_integer_byte_width == 4) { + if (acpi_gbl_integerbytewidth == 4) { ACPI_DEBUG_PRINT_RAW((ACPI_DB_DEBUG_OBJECT, "0x%8.8X\n", (u32) source_desc->integer. value)); Index: linux-acpi-2.6/drivers/acpi/executer/exsystem.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/executer/exsystem.c +++ linux-acpi-2.6/drivers/acpi/executer/exsystem.c @@ -201,7 +201,7 @@ acpi_ex_system_acquire_mutex(union acpi_ /* Support for the _GL_ Mutex object -- go get the global lock */ - if (obj_desc->mutex.semaphore == acpi_gbl_global_lock_semaphore) { + if (obj_desc->mutex.semaphore == acpi_gbl_globallocksemaphore) { status = acpi_ev_acquire_global_lock((u16) time_desc->integer.value); return_ACPI_STATUS(status); @@ -239,7 +239,7 @@ acpi_status acpi_ex_system_release_mutex /* Support for the _GL_ Mutex object -- release the global lock */ - if (obj_desc->mutex.semaphore == acpi_gbl_global_lock_semaphore) { + if (obj_desc->mutex.semaphore == acpi_gbl_globallocksemaphore) { status = acpi_ev_release_global_lock(); return_ACPI_STATUS(status); } Index: linux-acpi-2.6/drivers/acpi/executer/exutils.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/executer/exutils.c +++ linux-acpi-2.6/drivers/acpi/executer/exutils.c @@ -160,7 +160,7 @@ void acpi_ex_truncate_for32bit_table(uni return; } - if (acpi_gbl_integer_byte_width == 4) { + if (acpi_gbl_integerbytewidth == 4) { /* * We are running a method that exists in a 32-bit ACPI table. * Truncate the value to 32 bits by zeroing out the upper 32-bit field Index: linux-acpi-2.6/drivers/acpi/hardware/hwregs.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/hardware/hwregs.c +++ linux-acpi-2.6/drivers/acpi/hardware/hwregs.c @@ -145,7 +145,7 @@ acpi_get_sleep_type_data(u8 sleep_state, info.parameters = NULL; info.return_object = NULL; sleep_state_name = - ACPI_CAST_PTR(char, acpi_gbl_sleep_state_names[sleep_state]); + ACPI_CAST_PTR(char, acpi_gbl_sleepstatenames[sleep_state]); status = acpi_ns_evaluate_by_name(sleep_state_name, &info); if (ACPI_FAILURE(status)) { @@ -244,7 +244,7 @@ struct acpi_bit_register_info *acpi_hw_g return (NULL); } - return (&acpi_gbl_bit_register_info[register_id]); + return (&acpi_gbl_bitregisterinfo[register_id]); } /******************************************************************************* @@ -529,7 +529,7 @@ acpi_hw_register_read(u8 use_lock, u32 r case ACPI_REGISTER_PM1_ENABLE: /* 16-bit access */ status = - acpi_hw_low_level_read(16, &value1, &acpi_gbl_xpm1a_enable); + acpi_hw_low_level_read(16, &value1, &acpi_gbl_Xpm1aenable); if (ACPI_FAILURE(status)) { goto unlock_and_exit; } @@ -537,7 +537,7 @@ acpi_hw_register_read(u8 use_lock, u32 r /* PM1B is optional */ status = - acpi_hw_low_level_read(16, &value2, &acpi_gbl_xpm1b_enable); + acpi_hw_low_level_read(16, &value2, &acpi_gbl_Xpm1benable); value1 |= value2; break; @@ -641,7 +641,7 @@ acpi_status acpi_hw_register_write(u8 us case ACPI_REGISTER_PM1_ENABLE: /* 16-bit access */ status = - acpi_hw_low_level_write(16, value, &acpi_gbl_xpm1a_enable); + acpi_hw_low_level_write(16, value, &acpi_gbl_Xpm1aenable); if (ACPI_FAILURE(status)) { goto unlock_and_exit; } @@ -649,7 +649,7 @@ acpi_status acpi_hw_register_write(u8 us /* PM1B is optional */ status = - acpi_hw_low_level_write(16, value, &acpi_gbl_xpm1b_enable); + acpi_hw_low_level_write(16, value, &acpi_gbl_Xpm1benable); break; case ACPI_REGISTER_PM1_CONTROL: /* 16-bit access */ Index: linux-acpi-2.6/drivers/acpi/hardware/hwsleep.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/hardware/hwsleep.c +++ linux-acpi-2.6/drivers/acpi/hardware/hwsleep.c @@ -68,12 +68,12 @@ acpi_set_firmware_waking_vector(acpi_phy /* Set the vector */ - if (acpi_gbl_common_fACS.vector_width == 32) { + if (acpi_gbl_commonFACS.vector_width == 32) { *(ACPI_CAST_PTR - (u32, acpi_gbl_common_fACS.firmware_waking_vector)) + (u32, acpi_gbl_commonFACS.firmware_waking_vector)) = (u32) physical_address; } else { - *acpi_gbl_common_fACS.firmware_waking_vector = physical_address; + *acpi_gbl_commonFACS.firmware_waking_vector = physical_address; } return_ACPI_STATUS(AE_OK); @@ -106,14 +106,13 @@ acpi_get_firmware_waking_vector(acpi_phy /* Get the vector */ - if (acpi_gbl_common_fACS.vector_width == 32) { + if (acpi_gbl_commonFACS.vector_width == 32) { *physical_address = (acpi_physical_address) * (ACPI_CAST_PTR - (u32, acpi_gbl_common_fACS.firmware_waking_vector)); + (u32, acpi_gbl_commonFACS.firmware_waking_vector)); } else { - *physical_address = - *acpi_gbl_common_fACS.firmware_waking_vector; + *physical_address = *acpi_gbl_commonFACS.firmware_waking_vector; } return_ACPI_STATUS(AE_OK); @@ -147,8 +146,8 @@ acpi_status acpi_enter_sleep_state_prep( * _PSW methods could be run here to enable wake-on keyboard, LAN, etc. */ status = acpi_get_sleep_type_data(sleep_state, - &acpi_gbl_sleep_type_a, - &acpi_gbl_sleep_type_b); + &acpi_gbl_sleeptypeA, + &acpi_gbl_sleeptypeB); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } @@ -230,10 +229,10 @@ acpi_status asmlinkage acpi_enter_sleep_ ACPI_FUNCTION_TRACE("acpi_enter_sleep_state"); - if ((acpi_gbl_sleep_type_a > ACPI_SLEEP_TYPE_MAX) || - (acpi_gbl_sleep_type_b > ACPI_SLEEP_TYPE_MAX)) { + if ((acpi_gbl_sleeptypeA > ACPI_SLEEP_TYPE_MAX) || + (acpi_gbl_sleeptypeB > ACPI_SLEEP_TYPE_MAX)) { ACPI_ERROR((AE_INFO, "Sleep values out of range: A=%X B=%X", - acpi_gbl_sleep_type_a, acpi_gbl_sleep_type_b)); + acpi_gbl_sleeptypeA, acpi_gbl_sleeptypeB)); return_ACPI_STATUS(AE_AML_OPERAND_VALUE); } @@ -265,7 +264,7 @@ acpi_status asmlinkage acpi_enter_sleep_ if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } - acpi_gbl_system_awake_and_running = FALSE; + acpi_gbl_systemawakeandrunning = FALSE; status = acpi_hw_enable_all_wakeup_gpes(); if (ACPI_FAILURE(status)) { @@ -291,9 +290,9 @@ acpi_status asmlinkage acpi_enter_sleep_ /* Insert SLP_TYP bits */ PM1Acontrol |= - (acpi_gbl_sleep_type_a << sleep_type_reg_info->bit_position); + (acpi_gbl_sleeptypeA << sleep_type_reg_info->bit_position); PM1Bcontrol |= - (acpi_gbl_sleep_type_b << sleep_type_reg_info->bit_position); + (acpi_gbl_sleeptypeB << sleep_type_reg_info->bit_position); /* * We split the writes of SLP_TYP and SLP_EN to workaround @@ -419,7 +418,7 @@ acpi_status asmlinkage acpi_enter_sleep_ if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } - acpi_gbl_system_awake_and_running = FALSE; + acpi_gbl_systemawakeandrunning = FALSE; status = acpi_hw_enable_all_wakeup_gpes(); if (ACPI_FAILURE(status)) { @@ -476,8 +475,8 @@ acpi_status acpi_leave_sleep_state(u8 sl * by some machines. */ status = acpi_get_sleep_type_data(ACPI_STATE_S0, - &acpi_gbl_sleep_type_a, - &acpi_gbl_sleep_type_b); + &acpi_gbl_sleeptypeA, + &acpi_gbl_sleeptypeB); if (ACPI_SUCCESS(status)) { sleep_type_reg_info = acpi_hw_get_bit_register_info(ACPI_BITREG_SLEEP_TYPE_A); @@ -501,10 +500,10 @@ acpi_status acpi_leave_sleep_state(u8 sl /* Insert SLP_TYP bits */ PM1Acontrol |= - (acpi_gbl_sleep_type_a << sleep_type_reg_info-> + (acpi_gbl_sleeptypeA << sleep_type_reg_info-> bit_position); PM1Bcontrol |= - (acpi_gbl_sleep_type_b << sleep_type_reg_info-> + (acpi_gbl_sleeptypeB << sleep_type_reg_info-> bit_position); /* Just ignore any errors */ @@ -520,7 +519,7 @@ acpi_status acpi_leave_sleep_state(u8 sl /* Ensure enter_sleep_state_prep -> enter_sleep_state ordering */ - acpi_gbl_sleep_type_a = ACPI_SLEEP_TYPE_INVALID; + acpi_gbl_sleeptypeA = ACPI_SLEEP_TYPE_INVALID; /* Setup parameter object */ @@ -557,7 +556,7 @@ acpi_status acpi_leave_sleep_state(u8 sl if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); } - acpi_gbl_system_awake_and_running = TRUE; + acpi_gbl_systemawakeandrunning = TRUE; status = acpi_hw_enable_all_runtime_gpes(); if (ACPI_FAILURE(status)) { @@ -567,14 +566,12 @@ acpi_status acpi_leave_sleep_state(u8 sl /* Enable power button */ (void) - acpi_set_register(acpi_gbl_fixed_event_info - [ACPI_EVENT_POWER_BUTTON].enable_register_id, 1, - ACPI_MTX_DO_NOT_LOCK); + acpi_set_register(acpi_gbl_fixedeventinfo[ACPI_EVENT_POWER_BUTTON]. + enable_register_id, 1, ACPI_MTX_DO_NOT_LOCK); (void) - acpi_set_register(acpi_gbl_fixed_event_info - [ACPI_EVENT_POWER_BUTTON].status_register_id, 1, - ACPI_MTX_DO_NOT_LOCK); + acpi_set_register(acpi_gbl_fixedeventinfo[ACPI_EVENT_POWER_BUTTON]. + status_register_id, 1, ACPI_MTX_DO_NOT_LOCK); arg.integer.value = ACPI_SST_WORKING; status = acpi_evaluate_object(NULL, METHOD_NAME__SST, &arg_list, NULL); Index: linux-acpi-2.6/drivers/acpi/namespace/nsaccess.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/namespace/nsaccess.c +++ linux-acpi-2.6/drivers/acpi/namespace/nsaccess.c @@ -81,7 +81,7 @@ acpi_status acpi_ns_root_initialize(void * The global root ptr is initially NULL, so a non-NULL value indicates * that acpi_ns_root_initialize() has already been called; just return. */ - if (acpi_gbl_root_node) { + if (acpi_gbl_rootnode) { status = AE_OK; goto unlock_and_exit; } @@ -90,19 +90,19 @@ acpi_status acpi_ns_root_initialize(void * Tell the rest of the subsystem that the root is initialized * (This is OK because the namespace is locked) */ - acpi_gbl_root_node = &acpi_gbl_root_node_struct; + acpi_gbl_rootnode = &acpi_gbl_rootnodestruct; /* Enter the pre-defined names in the name table */ ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Entering predefined entries into namespace\n")); - for (init_val = acpi_gbl_pre_defined_names; init_val->name; init_val++) { + for (init_val = acpi_gbl_predefinednames; init_val->name; init_val++) { /* _OSI is optional for now, will be permanent later */ if (!ACPI_STRCMP(init_val->name, "_OSI") - && !acpi_gbl_create_osi_method) { + && !acpi_gbl_createosimethod) { continue; } @@ -214,7 +214,7 @@ acpi_status acpi_ns_root_initialize(void * We just created the mutex for the * global lock, save it */ - acpi_gbl_global_lock_semaphore = + acpi_gbl_globallocksemaphore = obj_desc->mutex.semaphore; } else { /* Create a mutex */ @@ -262,7 +262,7 @@ acpi_status acpi_ns_root_initialize(void status = acpi_ns_get_node_by_path("\\_GPE", NULL, ACPI_NS_NO_UPSEARCH, - &acpi_gbl_fadt_gpe_device); + &acpi_gbl_fadtgpedevice); } return_ACPI_STATUS(status); @@ -320,10 +320,10 @@ acpi_ns_lookup(union acpi_generic_state return_ACPI_STATUS(AE_BAD_PARAMETER); } - acpi_gbl_ns_lookup_count++; + acpi_gbl_nslookupcount++; *return_node = ACPI_ENTRY_NOT_FOUND; - if (!acpi_gbl_root_node) { + if (!acpi_gbl_rootnode) { return_ACPI_STATUS(AE_NO_NAMESPACE); } @@ -334,9 +334,9 @@ acpi_ns_lookup(union acpi_generic_state if ((!scope_info) || (!scope_info->scope.node)) { ACPI_DEBUG_PRINT((ACPI_DB_NAMES, "Null scope prefix, using root node (%p)\n", - acpi_gbl_root_node)); + acpi_gbl_rootnode)); - prefix_node = acpi_gbl_root_node; + prefix_node = acpi_gbl_rootnode; } else { prefix_node = scope_info->scope.node; if (ACPI_GET_DESCRIPTOR_TYPE(prefix_node) != @@ -370,7 +370,7 @@ acpi_ns_lookup(union acpi_generic_state /* A Null name_path is allowed and refers to the root */ num_segments = 0; - this_node = acpi_gbl_root_node; + this_node = acpi_gbl_rootnode; path = ""; ACPI_DEBUG_PRINT((ACPI_DB_NAMES, @@ -394,7 +394,7 @@ acpi_ns_lookup(union acpi_generic_state /* Pathname is fully qualified, start from the root */ - this_node = acpi_gbl_root_node; + this_node = acpi_gbl_rootnode; search_parent_flag = ACPI_NS_NO_UPSEARCH; /* Point to name segment part */ Index: linux-acpi-2.6/drivers/acpi/namespace/nsalloc.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/namespace/nsalloc.c +++ linux-acpi-2.6/drivers/acpi/namespace/nsalloc.c @@ -73,7 +73,7 @@ struct acpi_namespace_node *acpi_ns_crea return_PTR(NULL); } - ACPI_MEM_TRACKING(acpi_gbl_ns_node_list->total_allocated++); + ACPI_MEM_TRACKING(acpi_gbl_nsnodelist->total_allocated++); node->name.integer = name; node->reference_count = 1; @@ -136,7 +136,7 @@ void acpi_ns_delete_node(struct acpi_nam } } - ACPI_MEM_TRACKING(acpi_gbl_ns_node_list->total_freed++); + ACPI_MEM_TRACKING(acpi_gbl_nsnodelist->total_freed++); /* * Detach an object if there is one then delete the node @@ -281,11 +281,11 @@ void acpi_ns_delete_children(struct acpi /* Now we can free this child object */ - ACPI_MEM_TRACKING(acpi_gbl_ns_node_list->total_freed++); + ACPI_MEM_TRACKING(acpi_gbl_nsnodelist->total_freed++); ACPI_DEBUG_PRINT((ACPI_DB_ALLOCATIONS, "Object %p, Remaining %X\n", child_node, - acpi_gbl_current_node_count)); + acpi_gbl_currentnodecount)); /* * Detach an object if there is one, then free the child node @@ -482,7 +482,7 @@ void acpi_ns_delete_namespace_by_owner(a return_VOID; } - parent_node = acpi_gbl_root_node; + parent_node = acpi_gbl_rootnode; child_node = NULL; deletion_node = NULL; level = 1; Index: linux-acpi-2.6/drivers/acpi/namespace/nsdump.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/namespace/nsdump.c +++ linux-acpi-2.6/drivers/acpi/namespace/nsdump.c @@ -674,7 +674,7 @@ void acpi_ns_dump_tables(acpi_handle sea ACPI_FUNCTION_TRACE("ns_dump_tables"); - if (!acpi_gbl_root_node) { + if (!acpi_gbl_rootnode) { /* * If the name space has not been initialized, * there is nothing to dump. @@ -688,7 +688,7 @@ void acpi_ns_dump_tables(acpi_handle sea /* Entire namespace */ - search_handle = acpi_gbl_root_node; + search_handle = acpi_gbl_rootnode; ACPI_DEBUG_PRINT((ACPI_DB_TABLES, "\\\n")); } Index: linux-acpi-2.6/drivers/acpi/namespace/nseval.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/namespace/nseval.c +++ linux-acpi-2.6/drivers/acpi/namespace/nseval.c @@ -266,7 +266,7 @@ acpi_status acpi_ns_evaluate_by_handle(s /* Check if namespace has been initialized */ - if (!acpi_gbl_root_node) { + if (!acpi_gbl_rootnode) { return_ACPI_STATUS(AE_NO_NAMESPACE); } Index: linux-acpi-2.6/drivers/acpi/namespace/nsinit.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/namespace/nsinit.c +++ linux-acpi-2.6/drivers/acpi/namespace/nsinit.c @@ -438,12 +438,11 @@ acpi_ns_init_one_device(acpi_handle obj_ info->num_INI++; } - if (acpi_gbl_init_handler) { + if (acpi_gbl_inithandler) { /* External initialization handler is present, call it */ - status = - acpi_gbl_init_handler(pinfo.node, ACPI_INIT_DEVICE_INI); + status = acpi_gbl_inithandler(pinfo.node, ACPI_INIT_DEVICE_INI); } return_ACPI_STATUS(AE_OK); Index: linux-acpi-2.6/drivers/acpi/namespace/nsload.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/namespace/nsload.c +++ linux-acpi-2.6/drivers/acpi/namespace/nsload.c @@ -82,7 +82,7 @@ acpi_ns_load_table(struct acpi_table_des /* Check if table contains valid AML (must be DSDT, PSDT, SSDT, etc.) */ if (! - (acpi_gbl_table_data[table_desc->type]. + (acpi_gbl_tabledata[table_desc->type]. flags & ACPI_TABLE_EXECUTABLE)) { /* Just ignore this table */ @@ -185,7 +185,7 @@ static acpi_status acpi_ns_load_table_by ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Namespace load: DSDT\n")); - table_desc = acpi_gbl_table_lists[ACPI_TABLE_DSDT].next; + table_desc = acpi_gbl_tablelists[ACPI_TABLE_DSDT].next; /* If table already loaded into namespace, just return */ @@ -195,7 +195,7 @@ static acpi_status acpi_ns_load_table_by /* Now load the single DSDT */ - status = acpi_ns_load_table(table_desc, acpi_gbl_root_node); + status = acpi_ns_load_table(table_desc, acpi_gbl_rootnode); if (ACPI_SUCCESS(status)) { table_desc->loaded_into_namespace = TRUE; } @@ -206,13 +206,13 @@ static acpi_status acpi_ns_load_table_by ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Namespace load: %d SSDT or PSDTs\n", - acpi_gbl_table_lists[table_type].count)); + acpi_gbl_tablelists[table_type].count)); /* * Traverse list of SSDT or PSDT tables */ - table_desc = acpi_gbl_table_lists[table_type].next; - for (i = 0; i < acpi_gbl_table_lists[table_type].count; i++) { + table_desc = acpi_gbl_tablelists[table_type].next; + for (i = 0; i < acpi_gbl_tablelists[table_type].count; i++) { /* * Only attempt to load table into namespace if it is not * already loaded! @@ -220,7 +220,7 @@ static acpi_status acpi_ns_load_table_by if (!table_desc->loaded_into_namespace) { status = acpi_ns_load_table(table_desc, - acpi_gbl_root_node); + acpi_gbl_rootnode); if (ACPI_FAILURE(status)) { break; } @@ -284,7 +284,7 @@ acpi_status acpi_ns_load_namespace(void) ACPI_DEBUG_PRINT_RAW((ACPI_DB_INIT, "ACPI Namespace successfully loaded at root %p\n", - acpi_gbl_root_node)); + acpi_gbl_rootnode)); return_ACPI_STATUS(status); } @@ -399,7 +399,7 @@ acpi_status acpi_ns_unload_namespace(acp /* Parameter validation */ - if (!acpi_gbl_root_node) { + if (!acpi_gbl_rootnode) { return_ACPI_STATUS(AE_NO_NAMESPACE); } Index: linux-acpi-2.6/drivers/acpi/namespace/nsnames.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/namespace/nsnames.c +++ linux-acpi-2.6/drivers/acpi/namespace/nsnames.c @@ -91,7 +91,7 @@ acpi_ns_build_external_path(struct acpi_ parent_node = node; name_buffer[index] = 0; - while ((index > ACPI_NAME_SIZE) && (parent_node != acpi_gbl_root_node)) { + while ((index > ACPI_NAME_SIZE) && (parent_node != acpi_gbl_rootnode)) { index -= ACPI_NAME_SIZE; /* Put the name into the buffer */ @@ -185,7 +185,7 @@ acpi_size acpi_ns_get_pathname_length(st size = 0; next_node = node; - while (next_node && (next_node != acpi_gbl_root_node)) { + while (next_node && (next_node != acpi_gbl_rootnode)) { size += ACPI_PATH_SEGMENT_LENGTH; next_node = acpi_ns_get_parent_node(next_node); } Index: linux-acpi-2.6/drivers/acpi/namespace/nsutils.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/namespace/nsutils.c +++ linux-acpi-2.6/drivers/acpi/namespace/nsutils.c @@ -78,6 +78,7 @@ acpi_ns_report_error(char *module_name, char *internal_name, acpi_status lookup_status) { acpi_status status; + u32 bad_name; char *name = NULL; acpi_ut_report_error(module_name, line_number); @@ -86,8 +87,8 @@ acpi_ns_report_error(char *module_name, /* There is a non-ascii character in the name */ - acpi_os_printf("[0x%4.4X] (NON-ASCII)", - *(ACPI_CAST_PTR(u32, internal_name))); + ACPI_MOVE_32_TO_32(&bad_name, internal_name); + acpi_os_printf("[0x%4.4X] (NON-ASCII)", bad_name); } else { /* Convert path to external format */ @@ -275,7 +276,7 @@ u32 acpi_ns_local(acpi_object_type type) return_UINT32(ACPI_NS_NORMAL); } - return_UINT32((u32) acpi_gbl_ns_properties[type] & ACPI_NS_LOCAL); + return_UINT32((u32) acpi_gbl_nsproperties[type] & ACPI_NS_LOCAL); } /******************************************************************************* @@ -691,7 +692,7 @@ struct acpi_namespace_node *acpi_ns_map_ } if (handle == ACPI_ROOT_OBJECT) { - return (acpi_gbl_root_node); + return (acpi_gbl_rootnode); } /* We can at least attempt to verify the handle */ @@ -730,7 +731,7 @@ acpi_handle acpi_ns_convert_entry_to_han return (NULL); } - if (Node == acpi_gbl_root_node) + if (Node == acpi_gbl_RootNode) { return (ACPI_ROOT_OBJECT); } @@ -762,13 +763,13 @@ void acpi_ns_terminate(void) * * Delete all object descriptors attached to namepsace nodes */ - acpi_ns_delete_namespace_subtree(acpi_gbl_root_node); + acpi_ns_delete_namespace_subtree(acpi_gbl_rootnode); /* Detach any objects attached to the root */ - obj_desc = acpi_ns_get_attached_object(acpi_gbl_root_node); + obj_desc = acpi_ns_get_attached_object(acpi_gbl_rootnode); if (obj_desc) { - acpi_ns_detach_object(acpi_gbl_root_node); + acpi_ns_detach_object(acpi_gbl_rootnode); } ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Namespace freed\n")); @@ -805,7 +806,7 @@ u32 acpi_ns_opens_scope(acpi_object_type return_UINT32(ACPI_NS_NORMAL); } - return_UINT32(((u32) acpi_gbl_ns_properties[type]) & ACPI_NS_NEWSCOPE); + return_UINT32(((u32) acpi_gbl_nsproperties[type]) & ACPI_NS_NEWSCOPE); } /******************************************************************************* Index: linux-acpi-2.6/drivers/acpi/namespace/nswalk.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/namespace/nswalk.c +++ linux-acpi-2.6/drivers/acpi/namespace/nswalk.c @@ -169,7 +169,7 @@ acpi_ns_walk_namespace(acpi_object_type /* Special case for the namespace Root Node */ if (start_node == ACPI_ROOT_OBJECT) { - start_node = acpi_gbl_root_node; + start_node = acpi_gbl_rootnode; } /* Null child means "get first node" */ Index: linux-acpi-2.6/drivers/acpi/namespace/nsxfname.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/namespace/nsxfname.c +++ linux-acpi-2.6/drivers/acpi/namespace/nsxfname.c @@ -107,7 +107,7 @@ acpi_get_handle(acpi_handle parent, if (ACPI_STRCMP(pathname, ACPI_NS_ROOT_PATH) == 0) { *ret_handle = - acpi_ns_convert_entry_to_handle(acpi_gbl_root_node); + acpi_ns_convert_entry_to_handle(acpi_gbl_rootnode); return (AE_OK); } @@ -276,7 +276,7 @@ acpi_get_object_info(acpi_handle handle, if (info->type == ACPI_TYPE_DEVICE) { /* * Get extra info for ACPI Devices objects only: - * Run the Device _HID, _UID, _CID, _STA, _ADR and _sx_d methods. + * Run the Device _HID, _UID, _CID, _STA, _ADR and _SxD methods. * * Note: none of these methods are required, so they may or may * not be present for this device. The Info->Valid bitfield is used @@ -320,7 +320,7 @@ acpi_get_object_info(acpi_handle handle, info->valid |= ACPI_VALID_ADR; } - /* Execute the Device._sx_d methods */ + /* Execute the Device._SxD methods */ status = acpi_ut_execute_sxds(node, info->highest_dstates); if (ACPI_SUCCESS(status)) { Index: linux-acpi-2.6/drivers/acpi/parser/psloop.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/parser/psloop.c +++ linux-acpi-2.6/drivers/acpi/parser/psloop.c @@ -747,7 +747,19 @@ acpi_status acpi_ps_parse_loop(struct ac if (ACPI_FAILURE(status2)) { return_ACPI_STATUS(status2); } + + status2 = + acpi_ds_result_stack_pop + (walk_state); + if (ACPI_FAILURE(status2)) { + return_ACPI_STATUS(status2); + } + + acpi_ut_delete_generic_state + (acpi_ut_pop_generic_state + (&walk_state->control_state)); } + acpi_ps_pop_scope(parser_state, &op, &walk_state->arg_types, &walk_state->arg_count); @@ -767,6 +779,7 @@ acpi_status acpi_ps_parse_loop(struct ac return_ACPI_STATUS(status2); } } + acpi_ps_pop_scope(parser_state, &op, &walk_state->arg_types, &walk_state->arg_count); Index: linux-acpi-2.6/drivers/acpi/parser/psopcode.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/parser/psopcode.c +++ linux-acpi-2.6/drivers/acpi/parser/psopcode.c @@ -51,7 +51,7 @@ ACPI_MODULE_NAME("psopcode") /******************************************************************************* * - * NAME: acpi_gbl_aml_op_info + * NAME: acpi_gbl_AmlOpInfo * * DESCRIPTION: Opcode table. Each entry contains * The name is a simple ascii string, the operand specifier is an @@ -180,7 +180,7 @@ ACPI_MODULE_NAME("psopcode") * Master Opcode information table. A summary of everything we know about each * opcode, all in one place. */ -const struct acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES] = { +const struct acpi_opcode_info acpi_gbl_amlopinfo[AML_NUM_OPCODES] = { /*! [Begin] no source code translation */ /* Index Name Parser Args Interpreter Args ObjectType Class Type Flags */ @@ -646,7 +646,7 @@ const struct acpi_opcode_info acpi_gbl_a * This table is directly indexed by the opcodes, and returns an * index into the table above */ -static const u8 acpi_gbl_short_op_index[256] = { +static const u8 acpi_gbl_shortopindex[256] = { /* 0 1 2 3 4 5 6 7 */ /* 8 9 A B C D E F */ /* 0x00 */ 0x00, 0x01, _UNK, _UNK, _UNK, _UNK, 0x02, _UNK, @@ -685,9 +685,9 @@ static const u8 acpi_gbl_short_op_index[ /* * This table is indexed by the second opcode of the extended opcode - * pair. It returns an index into the opcode table (acpi_gbl_aml_op_info) + * pair. It returns an index into the opcode table (acpi_gbl_AmlOpInfo) */ -static const u8 acpi_gbl_long_op_index[NUM_EXTENDED_OPCODE] = { +static const u8 acpi_gbl_longopindex[NUM_EXTENDED_OPCODE] = { /* 0 1 2 3 4 5 6 7 */ /* 8 9 A B C D E F */ /* 0x00 */ _UNK, 0x46, 0x47, _UNK, _UNK, _UNK, _UNK, _UNK, @@ -734,8 +734,8 @@ const struct acpi_opcode_info *acpi_ps_g /* Simple (8-bit) opcode: 0-255, can't index beyond table */ - return (&acpi_gbl_aml_op_info - [acpi_gbl_short_op_index[(u8) opcode]]); + return (&acpi_gbl_amlopinfo + [acpi_gbl_shortopindex[(u8) opcode]]); } if (((opcode & 0xFF00) == AML_EXTENDED_OPCODE) && @@ -743,8 +743,7 @@ const struct acpi_opcode_info *acpi_ps_g /* Valid extended (16-bit) opcode */ - return (&acpi_gbl_aml_op_info - [acpi_gbl_long_op_index[(u8) opcode]]); + return (&acpi_gbl_amlopinfo[acpi_gbl_longopindex[(u8) opcode]]); } /* Unknown AML opcode */ @@ -752,7 +751,7 @@ const struct acpi_opcode_info *acpi_ps_g ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Unknown AML opcode [%4.4X]\n", opcode)); - return (&acpi_gbl_aml_op_info[_UNK]); + return (&acpi_gbl_amlopinfo[_UNK]); } /******************************************************************************* Index: linux-acpi-2.6/drivers/acpi/parser/psparse.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/parser/psparse.c +++ linux-acpi-2.6/drivers/acpi/parser/psparse.c @@ -450,7 +450,7 @@ acpi_status acpi_ps_parse_aml(struct acp { acpi_status status; struct acpi_thread_state *thread; - struct acpi_thread_state *prev_walk_list = acpi_gbl_current_walk_list; + struct acpi_thread_state *prev_walk_list = acpi_gbl_currentwalklist; struct acpi_walk_state *previous_walk_state; ACPI_FUNCTION_TRACE("ps_parse_aml"); @@ -474,7 +474,7 @@ acpi_status acpi_ps_parse_aml(struct acp * This global allows the AML debugger to get a handle to the currently * executing control method. */ - acpi_gbl_current_walk_list = thread; + acpi_gbl_currentwalklist = thread; /* * Execute the walk loop as long as there is a valid Walk State. This @@ -662,6 +662,6 @@ acpi_status acpi_ps_parse_aml(struct acp acpi_ex_release_all_mutexes(thread); acpi_ut_delete_generic_state(ACPI_CAST_PTR (union acpi_generic_state, thread)); - acpi_gbl_current_walk_list = prev_walk_list; + acpi_gbl_currentwalklist = prev_walk_list; return_ACPI_STATUS(status); } Index: linux-acpi-2.6/drivers/acpi/parser/psutils.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/parser/psutils.c +++ linux-acpi-2.6/drivers/acpi/parser/psutils.c @@ -138,12 +138,12 @@ union acpi_parse_object *acpi_ps_alloc_o /* The generic op (default) is by far the most common (16 to 1) */ - op = acpi_os_acquire_object(acpi_gbl_ps_node_cache); + op = acpi_os_acquire_object(acpi_gbl_psnodecache); memset(op, 0, sizeof(struct acpi_parse_obj_common)); } else { /* Extended parseop */ - op = acpi_os_acquire_object(acpi_gbl_ps_node_ext_cache); + op = acpi_os_acquire_object(acpi_gbl_psnodeextcache); memset(op, 0, sizeof(struct acpi_parse_obj_named)); } @@ -180,9 +180,9 @@ void acpi_ps_free_op(union acpi_parse_ob } if (op->common.flags & ACPI_PARSEOP_GENERIC) { - (void)acpi_os_release_object(acpi_gbl_ps_node_cache, op); + (void)acpi_os_release_object(acpi_gbl_psnodecache, op); } else { - (void)acpi_os_release_object(acpi_gbl_ps_node_ext_cache, op); + (void)acpi_os_release_object(acpi_gbl_psnodeextcache, op); } } Index: linux-acpi-2.6/drivers/acpi/parser/psxface.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/parser/psxface.c +++ linux-acpi-2.6/drivers/acpi/parser/psxface.c @@ -87,14 +87,14 @@ acpi_debug_trace(char *name, u32 debug_l /* TBDs: Validate name, allow full path or just nameseg */ - acpi_gbl_trace_method_name = *ACPI_CAST_PTR(u32, name); - acpi_gbl_trace_flags = flags; + acpi_gbl_tracemethodname = *ACPI_CAST_PTR(u32, name); + acpi_gbl_traceflags = flags; if (debug_level) { - acpi_gbl_trace_dbg_level = debug_level; + acpi_gbl_tracedbglevel = debug_level; } if (debug_layer) { - acpi_gbl_trace_dbg_layer = debug_layer; + acpi_gbl_tracedbglayer = debug_layer; } (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); @@ -124,22 +124,22 @@ static void acpi_ps_start_trace(struct a return; } - if ((!acpi_gbl_trace_method_name) || - (acpi_gbl_trace_method_name != info->node->name.integer)) { + if ((!acpi_gbl_tracemethodname) || + (acpi_gbl_tracemethodname != info->node->name.integer)) { goto exit; } - acpi_gbl_original_dbg_level = acpi_dbg_level; - acpi_gbl_original_dbg_layer = acpi_dbg_layer; + acpi_gbl_originaldbglevel = acpi_dbg_level; + acpi_gbl_originaldbglayer = acpi_dbg_layer; acpi_dbg_level = 0x00FFFFFF; acpi_dbg_layer = ACPI_UINT32_MAX; - if (acpi_gbl_trace_dbg_level) { - acpi_dbg_level = acpi_gbl_trace_dbg_level; + if (acpi_gbl_tracedbglevel) { + acpi_dbg_level = acpi_gbl_tracedbglevel; } - if (acpi_gbl_trace_dbg_layer) { - acpi_dbg_layer = acpi_gbl_trace_dbg_layer; + if (acpi_gbl_tracedbglayer) { + acpi_dbg_layer = acpi_gbl_tracedbglayer; } exit: @@ -169,21 +169,21 @@ static void acpi_ps_stop_trace(struct ac return; } - if ((!acpi_gbl_trace_method_name) || - (acpi_gbl_trace_method_name != info->node->name.integer)) { + if ((!acpi_gbl_tracemethodname) || + (acpi_gbl_tracemethodname != info->node->name.integer)) { goto exit; } /* Disable further tracing if type is one-shot */ - if (acpi_gbl_trace_flags & 1) { - acpi_gbl_trace_method_name = 0; - acpi_gbl_trace_dbg_level = 0; - acpi_gbl_trace_dbg_layer = 0; + if (acpi_gbl_traceflags & 1) { + acpi_gbl_tracemethodname = 0; + acpi_gbl_tracedbglevel = 0; + acpi_gbl_tracedbglayer = 0; } - acpi_dbg_level = acpi_gbl_original_dbg_level; - acpi_dbg_layer = acpi_gbl_original_dbg_layer; + acpi_dbg_level = acpi_gbl_originaldbglevel; + acpi_dbg_layer = acpi_gbl_originaldbglayer; exit: (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); Index: linux-acpi-2.6/drivers/acpi/resources/rscalc.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/resources/rscalc.c +++ linux-acpi-2.6/drivers/acpi/resources/rscalc.c @@ -162,9 +162,11 @@ acpi_rs_stream_option_length(u32 resourc resource_length - minimum_aml_resource_length - 1; } - /* Round up length to 32 bits for internal structure alignment */ - - return ((u32) ACPI_ROUND_UP_to_32_bITS(string_length)); + /* + * Round the length up to a multiple of the native word in order to + * guarantee that the entire resource descriptor is native word aligned + */ + return ((u32) ACPI_ROUND_UP_TO_NATIVE_WORD(string_length)); } /******************************************************************************* @@ -202,7 +204,7 @@ acpi_rs_get_aml_length(struct acpi_resou /* Get the base size of the (external stream) resource descriptor */ - total_size = acpi_gbl_aml_resource_sizes[resource->type]; + total_size = acpi_gbl_amlresourcesizes[resource->type]; /* * Augment the base size for descriptors with optional and/or @@ -336,7 +338,7 @@ acpi_rs_get_list_length(u8 * aml_buffer, acpi_status status; u8 *end_aml; u8 *buffer; - u32 buffer_size = 0; + u32 buffer_size; u16 temp16; u16 resource_length; u32 extra_struct_bytes; @@ -345,6 +347,7 @@ acpi_rs_get_list_length(u8 * aml_buffer, ACPI_FUNCTION_TRACE("rs_get_list_length"); + *size_needed = 0; end_aml = aml_buffer + aml_buffer_length; /* Walk the list of AML resource descriptors */ @@ -362,7 +365,7 @@ acpi_rs_get_list_length(u8 * aml_buffer, resource_length = acpi_ut_get_resource_length(aml_buffer); minimum_aml_resource_length = - acpi_gbl_resource_aml_sizes[resource_index]; + acpi_gbl_resourceamlsizes[resource_index]; /* * Augment the size for descriptors with optional @@ -391,37 +394,28 @@ acpi_rs_get_list_length(u8 * aml_buffer, break; case ACPI_RESOURCE_NAME_VENDOR_SMALL: + case ACPI_RESOURCE_NAME_VENDOR_LARGE: /* * Vendor Resource: - * Ensure a 32-bit boundary for the structure + * Get the number of vendor data bytes */ - extra_struct_bytes = (u32) - ACPI_ROUND_UP_to_32_bITS(resource_length) - - resource_length; + extra_struct_bytes = resource_length; break; case ACPI_RESOURCE_NAME_END_TAG: /* - * End Tag: This is the normal exit, add size of end_tag + * End Tag: + * This is the normal exit, add size of end_tag */ - *size_needed = buffer_size + ACPI_RS_SIZE_MIN; + *size_needed += ACPI_RS_SIZE_MIN; return_ACPI_STATUS(AE_OK); - case ACPI_RESOURCE_NAME_VENDOR_LARGE: - /* - * Vendor Resource: - * Add vendor data and ensure a 32-bit boundary for the structure - */ - extra_struct_bytes = (u32) - ACPI_ROUND_UP_to_32_bITS(resource_length) - - resource_length; - break; - case ACPI_RESOURCE_NAME_ADDRESS32: case ACPI_RESOURCE_NAME_ADDRESS16: + case ACPI_RESOURCE_NAME_ADDRESS64: /* - * 32-Bit or 16-bit Address Resource: - * Add the size of any optional data (resource_source) + * Address Resource: + * Add the size of the optional resource_source */ extra_struct_bytes = acpi_rs_stream_option_length(resource_length, @@ -430,50 +424,46 @@ acpi_rs_get_list_length(u8 * aml_buffer, case ACPI_RESOURCE_NAME_EXTENDED_IRQ: /* - * Extended IRQ: - * Point past the interrupt_vector_flags to get the - * interrupt_table_length. - */ - buffer++; - - extra_struct_bytes = (u32) - /* - * Add 4 bytes for each additional interrupt. Note: at - * least one interrupt is required and is included in - * the minimum descriptor size - */ - ((*buffer - 1) * sizeof(u32)) + - /* Add the size of any optional data (resource_source) */ + * Extended IRQ Resource: + * Using the interrupt_table_length, add 4 bytes for each additional + * interrupt. Note: at least one interrupt is required and is + * included in the minimum descriptor size (reason for the -1) + */ + extra_struct_bytes = (buffer[1] - 1) * sizeof(u32); + + /* Add the size of the optional resource_source */ + + extra_struct_bytes += acpi_rs_stream_option_length(resource_length - extra_struct_bytes, minimum_aml_resource_length); break; - case ACPI_RESOURCE_NAME_ADDRESS64: - /* - * 64-Bit Address Resource: - * Add the size of any optional data (resource_source) - * Ensure a 64-bit boundary for the structure - */ - extra_struct_bytes = (u32) - ACPI_ROUND_UP_to_64_bITS - (acpi_rs_stream_option_length - (resource_length, minimum_aml_resource_length)); - break; - default: break; } - /* Update the required buffer size for the internal descriptor structs */ - - temp16 = (u16) (acpi_gbl_resource_struct_sizes[resource_index] + - extra_struct_bytes); - buffer_size += (u32) ACPI_ROUND_UP_TO_NATIVE_WORD(temp16); + /* + * Update the required buffer size for the internal descriptor structs + * + * Important: Round the size up for the appropriate alignment. This + * is a requirement on IA64. + */ + buffer_size = acpi_gbl_resourcestructsizes[resource_index] + + extra_struct_bytes; + buffer_size = ACPI_ROUND_UP_TO_NATIVE_WORD(buffer_size); + + *size_needed += buffer_size; + + ACPI_DEBUG_PRINT((ACPI_DB_RESOURCES, + "Type %.2X, Aml %.2X internal %.2X\n", + acpi_ut_get_resource_type(aml_buffer), + acpi_ut_get_descriptor_length(aml_buffer), + buffer_size)); /* - * Point to the next resource within the stream - * using the size of the header plus the length contained in the header + * Point to the next resource within the AML stream using the length + * contained in the resource descriptor header */ aml_buffer += acpi_ut_get_descriptor_length(aml_buffer); } @@ -589,7 +579,7 @@ acpi_rs_get_pci_routing_table_length(uni /* Round up the size since each element must be aligned */ - temp_size_needed = ACPI_ROUND_UP_to_64_bITS(temp_size_needed); + temp_size_needed = ACPI_ROUND_UP_TO_64BIT(temp_size_needed); /* Point to the next union acpi_operand_object */ @@ -597,7 +587,7 @@ acpi_rs_get_pci_routing_table_length(uni } /* - * Adding an extra element to the end of the list, essentially a + * Add an extra element to the end of the list, essentially a * NULL terminator */ *buffer_size_needed = Index: linux-acpi-2.6/drivers/acpi/resources/rscreate.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/resources/rscreate.c +++ linux-acpi-2.6/drivers/acpi/resources/rscreate.c @@ -332,7 +332,7 @@ acpi_rs_create_pci_routing_table(union a /* Now align the current length */ user_prt->length = - (u32) ACPI_ROUND_UP_to_64_bITS(user_prt->length); + (u32) ACPI_ROUND_UP_TO_64BIT(user_prt->length); /* 4) Fourth subobject: Dereference the PRT.source_index */ Index: linux-acpi-2.6/drivers/acpi/resources/rsdump.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/resources/rsdump.c +++ linux-acpi-2.6/drivers/acpi/resources/rsdump.c @@ -120,9 +120,9 @@ struct acpi_rsdump_info acpi_rs_dump_sta {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_start_dpf), "Start-Dependent-Functions", NULL}, {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(start_dpf.compatibility_priority), - "Compatibility Priority", acpi_gbl_config_decode}, + "Compatibility Priority", acpi_gbl_configdecode}, {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(start_dpf.performance_robustness), - "Performance/Robustness", acpi_gbl_config_decode} + "Performance/Robustness", acpi_gbl_configdecode} }; struct acpi_rsdump_info acpi_rs_dump_end_dpf[1] = { @@ -133,7 +133,7 @@ struct acpi_rsdump_info acpi_rs_dump_end struct acpi_rsdump_info acpi_rs_dump_io[6] = { {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_io), "I/O", NULL}, {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(io.io_decode), "Address Decoding", - acpi_gbl_io_decode}, + acpi_gbl_iodecode}, {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(io.minimum), "Address Minimum", NULL}, {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(io.maximum), "Address Maximum", NULL}, {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(io.alignment), "Alignment", NULL}, @@ -276,7 +276,7 @@ struct acpi_rsdump_info acpi_rs_dump_ext {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_ext_irq), "Extended IRQ", NULL}, {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(extended_irq.producer_consumer), - "Type", acpi_gbl_consume_decode}, + "Type", acpi_gbl_consumedecode}, {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(extended_irq.triggering), "Triggering", acpi_gbl_HEdecode}, {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(extended_irq.polarity), "Polarity", @@ -312,13 +312,13 @@ static struct acpi_rsdump_info acpi_rs_d {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_general_flags), NULL, NULL}, {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.producer_consumer), - "Consumer/Producer", acpi_gbl_consume_decode}, + "Consumer/Producer", acpi_gbl_consumedecode}, {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.decode), "Address Decode", acpi_gbl_DECdecode}, {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.min_address_fixed), - "Min Relocatability", acpi_gbl_min_decode}, + "Min Relocatability", acpi_gbl_mindecode}, {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.max_address_fixed), - "Max Relocatability", acpi_gbl_max_decode} + "Max Relocatability", acpi_gbl_maxdecode} }; static struct acpi_rsdump_info acpi_rs_dump_memory_flags[5] = { @@ -625,7 +625,7 @@ void acpi_rs_dump_resource_list(struct a /* Dump the resource descriptor */ acpi_rs_dump_descriptor(&resource_list->data, - acpi_gbl_dump_resource_dispatch[type]); + acpi_gbl_dumpresourcedispatch[type]); /* Point to the next resource structure */ Index: linux-acpi-2.6/drivers/acpi/resources/rsinfo.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/resources/rsinfo.c +++ linux-acpi-2.6/drivers/acpi/resources/rsinfo.c @@ -58,7 +58,7 @@ ACPI_MODULE_NAME("rsinfo") * descriptors are indexed by the acpi_resource_type field. */ /* Dispatch table for resource-to-AML (Set Resource) conversion functions */ -struct acpi_rsconvert_info *acpi_gbl_set_resource_dispatch[] = { +struct acpi_rsconvert_info *acpi_gbl_setresourcedispatch[] = { acpi_rs_set_irq, /* 0x00, ACPI_RESOURCE_TYPE_IRQ */ acpi_rs_convert_dma, /* 0x01, ACPI_RESOURCE_TYPE_DMA */ acpi_rs_set_start_dpf, /* 0x02, ACPI_RESOURCE_TYPE_START_DEPENDENT */ @@ -80,7 +80,7 @@ struct acpi_rsconvert_info *acpi_gbl_set /* Dispatch tables for AML-to-resource (Get Resource) conversion functions */ -struct acpi_rsconvert_info *acpi_gbl_get_resource_dispatch[] = { +struct acpi_rsconvert_info *acpi_gbl_getresourcedispatch[] = { /* Small descriptors */ NULL, /* 0x00, Reserved */ @@ -121,7 +121,7 @@ struct acpi_rsconvert_info *acpi_gbl_get /* Dispatch table for resource dump functions */ -struct acpi_rsdump_info *acpi_gbl_dump_resource_dispatch[] = { +struct acpi_rsdump_info *acpi_gbl_dumpresourcedispatch[] = { acpi_rs_dump_irq, /* ACPI_RESOURCE_TYPE_IRQ */ acpi_rs_dump_dma, /* ACPI_RESOURCE_TYPE_DMA */ acpi_rs_dump_start_dpf, /* ACPI_RESOURCE_TYPE_START_DEPENDENT */ @@ -147,7 +147,7 @@ struct acpi_rsdump_info *acpi_gbl_dump_r * Includes size of the descriptor header (1 byte for small descriptors, * 3 bytes for large descriptors) */ -const u8 acpi_gbl_aml_resource_sizes[] = { +const u8 acpi_gbl_amlresourcesizes[] = { sizeof(struct aml_resource_irq), /* ACPI_RESOURCE_TYPE_IRQ (optional Byte 3 always created) */ sizeof(struct aml_resource_dma), /* ACPI_RESOURCE_TYPE_DMA */ sizeof(struct aml_resource_start_dependent), /* ACPI_RESOURCE_TYPE_START_DEPENDENT (optional Byte 1 always created) */ @@ -167,7 +167,7 @@ const u8 acpi_gbl_aml_resource_sizes[] = sizeof(struct aml_resource_generic_register) /* ACPI_RESOURCE_TYPE_GENERIC_REGISTER */ }; -const u8 acpi_gbl_resource_struct_sizes[] = { +const u8 acpi_gbl_resourcestructsizes[] = { /* Small descriptors */ 0, Index: linux-acpi-2.6/drivers/acpi/resources/rslist.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/resources/rslist.c +++ linux-acpi-2.6/drivers/acpi/resources/rslist.c @@ -77,6 +77,15 @@ acpi_rs_convert_aml_to_resources(u8 * am /* Loop until end-of-buffer or an end_tag is found */ while (aml < end_aml) { + /* + * Check that the input buffer and all subsequent pointers into it + * are aligned on a native word boundary. Most important on IA64 + */ + if (ACPI_IS_MISALIGNED(resource)) { + ACPI_WARNING((AE_INFO, + "Misaligned resource pointer %p", + resource)); + } /* Validate the Resource Type and Resource Length */ @@ -92,7 +101,7 @@ acpi_rs_convert_aml_to_resources(u8 * am ACPI_CAST_PTR(union aml_resource, aml), - acpi_gbl_get_resource_dispatch + acpi_gbl_getresourcedispatch [resource_index]); if (ACPI_FAILURE(status)) { ACPI_EXCEPTION((AE_INFO, status, @@ -101,6 +110,12 @@ acpi_rs_convert_aml_to_resources(u8 * am return_ACPI_STATUS(status); } + ACPI_DEBUG_PRINT((ACPI_DB_RESOURCES, + "Type %.2X, Aml %.2X internal %.2X\n", + acpi_ut_get_resource_type(aml), + acpi_ut_get_descriptor_length(aml), + resource->length)); + /* Normal exit on completion of an end_tag resource descriptor */ if (acpi_ut_get_resource_type(aml) == @@ -172,7 +187,7 @@ acpi_rs_convert_resources_to_aml(struct ACPI_CAST_PTR(union aml_resource, aml), - acpi_gbl_set_resource_dispatch + acpi_gbl_setresourcedispatch [resource->type]); if (ACPI_FAILURE(status)) { ACPI_EXCEPTION((AE_INFO, status, Index: linux-acpi-2.6/drivers/acpi/resources/rsmisc.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/resources/rsmisc.c +++ linux-acpi-2.6/drivers/acpi/resources/rsmisc.c @@ -81,7 +81,7 @@ acpi_rs_convert_aml_to_resource(struct a u16 item_count = 0; u16 temp16 = 0; - ACPI_FUNCTION_TRACE("rs_get_resource"); + ACPI_FUNCTION_TRACE("rs_convert_aml_to_resource"); if (((acpi_native_uint) resource) & 0x3) { @@ -297,10 +297,10 @@ acpi_rs_convert_aml_to_resource(struct a exit: if (!flags_mode) { - /* Round the resource struct length up to the next 32-bit boundary */ + /* Round the resource struct length up to the next boundary (32 or 64) */ resource->length = - (u32) ACPI_ROUND_UP_to_32_bITS(resource->length); + (u32) ACPI_ROUND_UP_TO_NATIVE_WORD(resource->length); } return_ACPI_STATUS(AE_OK); } Index: linux-acpi-2.6/drivers/acpi/resources/rsutils.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/resources/rsutils.c +++ linux-acpi-2.6/drivers/acpi/resources/rsutils.c @@ -299,7 +299,8 @@ static u16 acpi_rs_strcpy(char *destinat * string_ptr - (optional) where to store the actual * resource_source string * - * RETURN: Length of the string plus NULL terminator, rounded up to 32 bit + * RETURN: Length of the string plus NULL terminator, rounded up to native + * word boundary * * DESCRIPTION: Copy the optional resource_source data from a raw AML descriptor * to an internal resource descriptor @@ -346,18 +347,16 @@ acpi_rs_get_resource_source(acpi_rs_leng } /* - * In order for the struct_size to fall on a 32-bit boundary, calculate - * the length of the string (+1 for the NULL terminator) and expand the - * struct_size to the next 32-bit boundary. + * In order for the Resource length to be a multiple of the native + * word, calculate the length of the string (+1 for NULL terminator) + * and expand to the next word multiple. * * Zero the entire area of the buffer. */ total_length = - (u32) - ACPI_ROUND_UP_to_32_bITS(ACPI_STRLEN - (ACPI_CAST_PTR - (char, - &aml_resource_source[1])) + 1); + ACPI_STRLEN(ACPI_CAST_PTR(char, &aml_resource_source[1])) + + 1; + total_length = (u32) ACPI_ROUND_UP_TO_NATIVE_WORD(total_length); ACPI_MEMSET(resource_source->string_ptr, 0, total_length); Index: linux-acpi-2.6/drivers/acpi/tables/tbconvrt.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/tables/tbconvrt.c +++ linux-acpi-2.6/drivers/acpi/tables/tbconvrt.c @@ -90,7 +90,7 @@ acpi_tb_get_table_count(struct rsdp_desc /* RSDT pointers are 32 bits, XSDT pointers are 64 bits */ - if (acpi_gbl_root_table_type == ACPI_TABLE_TYPE_RSDT) { + if (acpi_gbl_roottabletype == ACPI_TABLE_TYPE_RSDT) { pointer_size = sizeof(u32); } else { pointer_size = sizeof(u64); @@ -128,7 +128,7 @@ acpi_status acpi_tb_convert_to_xsdt(stru /* Compute size of the converted XSDT */ - table_size = ((acpi_size) acpi_gbl_rsdt_table_count * sizeof(u64)) + + table_size = ((acpi_size) acpi_gbl_rsdttablecount * sizeof(u64)) + sizeof(struct acpi_table_header); /* Allocate an XSDT */ @@ -146,11 +146,11 @@ acpi_status acpi_tb_convert_to_xsdt(stru /* Copy the table pointers */ - for (i = 0; i < acpi_gbl_rsdt_table_count; i++) { + for (i = 0; i < acpi_gbl_rsdttablecount; i++) { /* RSDT pointers are 32 bits, XSDT pointers are 64 bits */ - if (acpi_gbl_root_table_type == ACPI_TABLE_TYPE_RSDT) { + if (acpi_gbl_roottabletype == ACPI_TABLE_TYPE_RSDT) { ACPI_STORE_ADDRESS(new_table->table_offset_entry[i], (ACPI_CAST_PTR (struct rsdt_descriptor_rev1, @@ -240,7 +240,7 @@ acpi_tb_convert_fadt1(struct fadt_descri /* Convert table pointers to 64-bit fields */ ACPI_STORE_ADDRESS(local_fadt->xfirmware_ctrl, - local_fadt->V1_firmware_ctrl); + local_fadt->V1_firmwarectrl); ACPI_STORE_ADDRESS(local_fadt->Xdsdt, local_fadt->V1_dsdt); /* @@ -300,37 +300,37 @@ acpi_tb_convert_fadt1(struct fadt_descri acpi_tb_init_generic_address(&local_fadt->xpm1a_evt_blk, local_fadt->pm1_evt_len, (acpi_physical_address) local_fadt-> - V1_pm1a_evt_blk); + V1_pm1aevtblk); acpi_tb_init_generic_address(&local_fadt->xpm1b_evt_blk, local_fadt->pm1_evt_len, (acpi_physical_address) local_fadt-> - V1_pm1b_evt_blk); + V1_pm1bevtblk); acpi_tb_init_generic_address(&local_fadt->xpm1a_cnt_blk, local_fadt->pm1_cnt_len, (acpi_physical_address) local_fadt-> - V1_pm1a_cnt_blk); + V1_pm1acntblk); acpi_tb_init_generic_address(&local_fadt->xpm1b_cnt_blk, local_fadt->pm1_cnt_len, (acpi_physical_address) local_fadt-> - V1_pm1b_cnt_blk); + V1_pm1bcntblk); acpi_tb_init_generic_address(&local_fadt->xpm2_cnt_blk, local_fadt->pm2_cnt_len, (acpi_physical_address) local_fadt-> - V1_pm2_cnt_blk); + V1_pm2cntblk); acpi_tb_init_generic_address(&local_fadt->xpm_tmr_blk, local_fadt->pm_tm_len, (acpi_physical_address) local_fadt-> - V1_pm_tmr_blk); + V1_pmtmrblk); acpi_tb_init_generic_address(&local_fadt->xgpe0_blk, 0, (acpi_physical_address) local_fadt-> - V1_gpe0_blk); + V1_gpe0blk); acpi_tb_init_generic_address(&local_fadt->xgpe1_blk, 0, (acpi_physical_address) local_fadt-> - V1_gpe1_blk); + V1_gpe1blk); /* Create separate GAS structs for the PM1 Enable registers */ - acpi_tb_init_generic_address(&acpi_gbl_xpm1a_enable, + acpi_tb_init_generic_address(&acpi_gbl_Xpm1aenable, (u8) ACPI_DIV_2(acpi_gbl_FADT-> pm1_evt_len), (acpi_physical_address) @@ -340,7 +340,7 @@ acpi_tb_convert_fadt1(struct fadt_descri /* PM1B is optional; leave null if not present */ if (local_fadt->xpm1b_evt_blk.address) { - acpi_tb_init_generic_address(&acpi_gbl_xpm1b_enable, + acpi_tb_init_generic_address(&acpi_gbl_Xpm1benable, (u8) ACPI_DIV_2(acpi_gbl_FADT-> pm1_evt_len), (acpi_physical_address) @@ -382,7 +382,7 @@ acpi_tb_convert_fadt2(struct fadt_descri */ if (!(local_fadt->xfirmware_ctrl)) { ACPI_STORE_ADDRESS(local_fadt->xfirmware_ctrl, - local_fadt->V1_firmware_ctrl); + local_fadt->V1_firmwarectrl); } if (!(local_fadt->Xdsdt)) { @@ -393,74 +393,74 @@ acpi_tb_convert_fadt2(struct fadt_descri acpi_tb_init_generic_address(&local_fadt->xpm1a_evt_blk, local_fadt->pm1_evt_len, (acpi_physical_address) - local_fadt->V1_pm1a_evt_blk); + local_fadt->V1_pm1aevtblk); } if (!(local_fadt->xpm1b_evt_blk.address)) { acpi_tb_init_generic_address(&local_fadt->xpm1b_evt_blk, local_fadt->pm1_evt_len, (acpi_physical_address) - local_fadt->V1_pm1b_evt_blk); + local_fadt->V1_pm1bevtblk); } if (!(local_fadt->xpm1a_cnt_blk.address)) { acpi_tb_init_generic_address(&local_fadt->xpm1a_cnt_blk, local_fadt->pm1_cnt_len, (acpi_physical_address) - local_fadt->V1_pm1a_cnt_blk); + local_fadt->V1_pm1acntblk); } if (!(local_fadt->xpm1b_cnt_blk.address)) { acpi_tb_init_generic_address(&local_fadt->xpm1b_cnt_blk, local_fadt->pm1_cnt_len, (acpi_physical_address) - local_fadt->V1_pm1b_cnt_blk); + local_fadt->V1_pm1bcntblk); } if (!(local_fadt->xpm2_cnt_blk.address)) { acpi_tb_init_generic_address(&local_fadt->xpm2_cnt_blk, local_fadt->pm2_cnt_len, (acpi_physical_address) - local_fadt->V1_pm2_cnt_blk); + local_fadt->V1_pm2cntblk); } if (!(local_fadt->xpm_tmr_blk.address)) { acpi_tb_init_generic_address(&local_fadt->xpm_tmr_blk, local_fadt->pm_tm_len, (acpi_physical_address) - local_fadt->V1_pm_tmr_blk); + local_fadt->V1_pmtmrblk); } if (!(local_fadt->xgpe0_blk.address)) { acpi_tb_init_generic_address(&local_fadt->xgpe0_blk, 0, (acpi_physical_address) - local_fadt->V1_gpe0_blk); + local_fadt->V1_gpe0blk); } if (!(local_fadt->xgpe1_blk.address)) { acpi_tb_init_generic_address(&local_fadt->xgpe1_blk, 0, (acpi_physical_address) - local_fadt->V1_gpe1_blk); + local_fadt->V1_gpe1blk); } /* Create separate GAS structs for the PM1 Enable registers */ - acpi_tb_init_generic_address(&acpi_gbl_xpm1a_enable, + acpi_tb_init_generic_address(&acpi_gbl_Xpm1aenable, (u8) ACPI_DIV_2(acpi_gbl_FADT-> pm1_evt_len), (acpi_physical_address) (local_fadt->xpm1a_evt_blk.address + ACPI_DIV_2(acpi_gbl_FADT->pm1_evt_len))); - acpi_gbl_xpm1a_enable.address_space_id = + acpi_gbl_Xpm1aenable.address_space_id = local_fadt->xpm1a_evt_blk.address_space_id; /* PM1B is optional; leave null if not present */ if (local_fadt->xpm1b_evt_blk.address) { - acpi_tb_init_generic_address(&acpi_gbl_xpm1b_enable, + acpi_tb_init_generic_address(&acpi_gbl_Xpm1benable, (u8) ACPI_DIV_2(acpi_gbl_FADT-> pm1_evt_len), (acpi_physical_address) @@ -469,7 +469,7 @@ acpi_tb_convert_fadt2(struct fadt_descri ACPI_DIV_2(acpi_gbl_FADT-> pm1_evt_len))); - acpi_gbl_xpm1b_enable.address_space_id = + acpi_gbl_Xpm1benable.address_space_id = local_fadt->xpm1b_evt_blk.address_space_id; } } @@ -544,7 +544,7 @@ acpi_status acpi_tb_convert_table_fadt(v /* Free the original table */ - table_desc = acpi_gbl_table_lists[ACPI_TABLE_FADT].next; + table_desc = acpi_gbl_tablelists[ACPI_TABLE_FADT].next; acpi_tb_delete_single_table(table_desc); /* Install the new table */ @@ -600,7 +600,7 @@ acpi_status acpi_tb_build_common_facs(st /* Copy fields to the new FACS */ - acpi_gbl_common_fACS.global_lock = &(acpi_gbl_FACS->global_lock); + acpi_gbl_commonFACS.global_lock = &(acpi_gbl_FACS->global_lock); if ((acpi_gbl_RSDP->revision < 2) || (acpi_gbl_FACS->length < 32) || @@ -608,17 +608,17 @@ acpi_status acpi_tb_build_common_facs(st /* ACPI 1.0 FACS or short table or optional X_ field is zero */ - acpi_gbl_common_fACS.firmware_waking_vector = ACPI_CAST_PTR(u64, - & - (acpi_gbl_FACS-> - firmware_waking_vector)); - acpi_gbl_common_fACS.vector_width = 32; + acpi_gbl_commonFACS.firmware_waking_vector = ACPI_CAST_PTR(u64, + & + (acpi_gbl_FACS-> + firmware_waking_vector)); + acpi_gbl_commonFACS.vector_width = 32; } else { /* ACPI 2.0 FACS with valid X_ field */ - acpi_gbl_common_fACS.firmware_waking_vector = + acpi_gbl_commonFACS.firmware_waking_vector = &acpi_gbl_FACS->xfirmware_waking_vector; - acpi_gbl_common_fACS.vector_width = 64; + acpi_gbl_commonFACS.vector_width = 64; } return_ACPI_STATUS(AE_OK); Index: linux-acpi-2.6/drivers/acpi/tables/tbgetall.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/tables/tbgetall.c +++ linux-acpi-2.6/drivers/acpi/tables/tbgetall.c @@ -210,9 +210,9 @@ acpi_status acpi_tb_get_required_tables( ACPI_FUNCTION_TRACE("tb_get_required_tables"); ACPI_DEBUG_PRINT((ACPI_DB_INFO, "%d ACPI tables in RSDT\n", - acpi_gbl_rsdt_table_count)); + acpi_gbl_rsdttablecount)); - address.pointer_type = acpi_gbl_table_flags | ACPI_LOGICAL_ADDRESSING; + address.pointer_type = acpi_gbl_tableflags | ACPI_LOGICAL_ADDRESSING; /* * Loop through all table pointers found in RSDT. @@ -222,7 +222,7 @@ acpi_status acpi_tb_get_required_tables( * The only tables we are interested in getting here is the FADT and * any SSDTs. */ - for (i = 0; i < acpi_gbl_rsdt_table_count; i++) { + for (i = 0; i < acpi_gbl_rsdttablecount; i++) { /* Get the table address from the common internal XSDT */ @@ -299,7 +299,7 @@ acpi_status acpi_tb_get_required_tables( ACPI_DEBUG_PRINT((ACPI_DB_TABLES, "Hex dump of entire DSDT, size %d (0x%X), Integer width = %d\n", acpi_gbl_DSDT->length, acpi_gbl_DSDT->length, - acpi_gbl_integer_bit_width)); + acpi_gbl_integerbitwidth)); ACPI_DUMP_BUFFER(ACPI_CAST_PTR(u8, acpi_gbl_DSDT), acpi_gbl_DSDT->length); Index: linux-acpi-2.6/drivers/acpi/tables/tbget.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/tables/tbget.c +++ linux-acpi-2.6/drivers/acpi/tables/tbget.c @@ -452,16 +452,16 @@ acpi_tb_get_table_ptr(acpi_table_type ta /* Get the first */ *table_ptr_loc = NULL; - if (acpi_gbl_table_lists[table_type].next) { + if (acpi_gbl_tablelists[table_type].next) { *table_ptr_loc = - acpi_gbl_table_lists[table_type].next->pointer; + acpi_gbl_tablelists[table_type].next->pointer; } return_ACPI_STATUS(AE_OK); } /* Check for instance out of range */ - if (instance > acpi_gbl_table_lists[table_type].count) { + if (instance > acpi_gbl_tablelists[table_type].count) { return_ACPI_STATUS(AE_NOT_EXIST); } @@ -472,7 +472,7 @@ acpi_tb_get_table_ptr(acpi_table_type ta * need to walk from the 2nd table until we reach the Instance * that the user is looking for and return its table pointer. */ - table_desc = acpi_gbl_table_lists[table_type].next; + table_desc = acpi_gbl_tablelists[table_type].next; for (i = 2; i < instance; i++) { table_desc = table_desc->next; } Index: linux-acpi-2.6/drivers/acpi/tables/tbinstal.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/tables/tbinstal.c +++ linux-acpi-2.6/drivers/acpi/tables/tbinstal.c @@ -78,12 +78,12 @@ acpi_tb_match_signature(char *signature, /* Search for a signature match among the known table types */ for (i = 0; i < NUM_ACPI_TABLE_TYPES; i++) { - if (!(acpi_gbl_table_data[i].flags & search_type)) { + if (!(acpi_gbl_tabledata[i].flags & search_type)) { continue; } - if (!ACPI_STRNCMP(signature, acpi_gbl_table_data[i].signature, - acpi_gbl_table_data[i].sig_length)) { + if (!ACPI_STRNCMP(signature, acpi_gbl_tabledata[i].signature, + acpi_gbl_tabledata[i].sig_length)) { /* Found a signature match, return index if requested */ @@ -93,7 +93,7 @@ acpi_tb_match_signature(char *signature, ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Table [%4.4s] is an ACPI table consumed by the core subsystem\n", - (char *)acpi_gbl_table_data[i]. + (char *)acpi_gbl_tabledata[i]. signature)); return_ACPI_STATUS(AE_OK); @@ -153,7 +153,7 @@ acpi_status acpi_tb_install_table(struct } ACPI_DEBUG_PRINT((ACPI_DB_INFO, "%s located at %p\n", - acpi_gbl_table_data[table_info->type].name, + acpi_gbl_tabledata[table_info->type].name, table_info->pointer)); unlock_and_exit: @@ -262,14 +262,14 @@ acpi_tb_init_table_descriptor(acpi_table /* Install the table into the global data structure */ - list_head = &acpi_gbl_table_lists[table_type]; + list_head = &acpi_gbl_tablelists[table_type]; /* * Two major types of tables: 1) Only one instance is allowed. This * includes most ACPI tables such as the DSDT. 2) Multiple instances of * the table are allowed. This includes SSDT and PSDTs. */ - if (ACPI_IS_SINGLE_TABLE(acpi_gbl_table_data[table_type].flags)) { + if (ACPI_IS_SINGLE_TABLE(acpi_gbl_tabledata[table_type].flags)) { /* * Only one table allowed, and a table has alread been installed * at this location, so return an error. @@ -327,8 +327,8 @@ acpi_tb_init_table_descriptor(acpi_table * Set the appropriate global pointer (if there is one) to point to the * newly installed table */ - if (acpi_gbl_table_data[table_type].global_ptr) { - *(acpi_gbl_table_data[table_type].global_ptr) = + if (acpi_gbl_tabledata[table_type].global_ptr) { + *(acpi_gbl_tabledata[table_type].global_ptr) = table_info->pointer; } @@ -427,8 +427,8 @@ void acpi_tb_delete_tables_by_type(acpi_ * Free the table * 1) Get the head of the list */ - table_desc = acpi_gbl_table_lists[type].next; - count = acpi_gbl_table_lists[type].count; + table_desc = acpi_gbl_tablelists[type].next; + count = acpi_gbl_tablelists[type].count; /* * 2) Walk the entire list, deleting both the allocated tables @@ -517,7 +517,7 @@ struct acpi_table_desc *acpi_tb_uninstal } else { /* Is first on list, update list head */ - acpi_gbl_table_lists[table_desc->type].next = table_desc->next; + acpi_gbl_tablelists[table_desc->type].next = table_desc->next; } if (table_desc->next) { Index: linux-acpi-2.6/drivers/acpi/tables/tbrsdt.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/tables/tbrsdt.c +++ linux-acpi-2.6/drivers/acpi/tables/tbrsdt.c @@ -117,7 +117,7 @@ acpi_status acpi_tb_verify_rsdp(struct a /* Error exit */ cleanup: - if (acpi_gbl_table_flags & ACPI_PHYSICAL_POINTER) { + if (acpi_gbl_tableflags & ACPI_PHYSICAL_POINTER) { acpi_os_unmap_memory(rsdp, sizeof(struct rsdp_descriptor)); } return_ACPI_STATUS(status); @@ -142,7 +142,7 @@ void acpi_tb_get_rsdt_address(struct acp ACPI_FUNCTION_ENTRY(); out_address->pointer_type = - acpi_gbl_table_flags | ACPI_LOGICAL_ADDRESSING; + acpi_gbl_tableflags | ACPI_LOGICAL_ADDRESSING; /* Use XSDT if it is present */ @@ -150,13 +150,13 @@ void acpi_tb_get_rsdt_address(struct acp acpi_gbl_RSDP->xsdt_physical_address) { out_address->pointer.value = acpi_gbl_RSDP->xsdt_physical_address; - acpi_gbl_root_table_type = ACPI_TABLE_TYPE_XSDT; + acpi_gbl_roottabletype = ACPI_TABLE_TYPE_XSDT; } else { /* No XSDT, use the RSDT */ out_address->pointer.value = acpi_gbl_RSDP->rsdt_physical_address; - acpi_gbl_root_table_type = ACPI_TABLE_TYPE_RSDT; + acpi_gbl_roottabletype = ACPI_TABLE_TYPE_RSDT; } } @@ -181,7 +181,7 @@ acpi_status acpi_tb_validate_rsdt(struct /* * Search for appropriate signature, RSDT or XSDT */ - if (acpi_gbl_root_table_type == ACPI_TABLE_TYPE_RSDT) { + if (acpi_gbl_roottabletype == ACPI_TABLE_TYPE_RSDT) { no_match = ACPI_STRNCMP((char *)table_ptr, RSDT_SIG, sizeof(RSDT_SIG) - 1); } else { @@ -204,7 +204,7 @@ acpi_status acpi_tb_validate_rsdt(struct (void *)(acpi_native_uint) acpi_gbl_RSDP-> rsdt_physical_address)); - if (acpi_gbl_root_table_type == ACPI_TABLE_TYPE_RSDT) { + if (acpi_gbl_roottabletype == ACPI_TABLE_TYPE_RSDT) { ACPI_ERROR((AE_INFO, "Looking for RSDT")); } else { ACPI_ERROR((AE_INFO, "Looking for XSDT")); @@ -263,8 +263,8 @@ acpi_status acpi_tb_get_table_rsdt(void) /* Get the number of tables defined in the RSDT or XSDT */ - acpi_gbl_rsdt_table_count = acpi_tb_get_table_count(acpi_gbl_RSDP, - table_info.pointer); + acpi_gbl_rsdttablecount = acpi_tb_get_table_count(acpi_gbl_RSDP, + table_info.pointer); /* Convert and/or copy to an XSDT structure */ Index: linux-acpi-2.6/drivers/acpi/tables/tbutils.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/tables/tbutils.c +++ linux-acpi-2.6/drivers/acpi/tables/tbutils.c @@ -75,7 +75,7 @@ acpi_status acpi_tb_is_table_installed(s /* Get the list descriptor and first table descriptor */ - table_desc = acpi_gbl_table_lists[new_table_desc->type].next; + table_desc = acpi_gbl_tablelists[new_table_desc->type].next; /* Examine all installed tables of this type */ @@ -286,7 +286,7 @@ acpi_tb_handle_to_object(u16 table_id, ACPI_FUNCTION_NAME("tb_handle_to_object"); for (i = 0; i < ACPI_TABLE_MAX; i++) { - table_desc = acpi_gbl_table_lists[i].next; + table_desc = acpi_gbl_tablelists[i].next; while (table_desc) { if (table_desc->table_id == table_id) { *return_table_desc = table_desc; Index: linux-acpi-2.6/drivers/acpi/tables/tbxface.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/tables/tbxface.c +++ linux-acpi-2.6/drivers/acpi/tables/tbxface.c @@ -81,7 +81,7 @@ acpi_status acpi_load_tables(void) /* Map and validate the RSDP */ - acpi_gbl_table_flags = rsdp_address.pointer_type; + acpi_gbl_tableflags = rsdp_address.pointer_type; status = acpi_tb_verify_rsdp(&rsdp_address); if (ACPI_FAILURE(status)) { @@ -204,7 +204,7 @@ acpi_status acpi_load_table(struct acpi_ status = acpi_ns_load_table(table_info.installed_desc, - acpi_gbl_root_node); + acpi_gbl_rootnode); break; } @@ -244,7 +244,7 @@ acpi_status acpi_unload_table(acpi_table /* Find all tables of the requested type */ - table_desc = acpi_gbl_table_lists[table_type].next; + table_desc = acpi_gbl_tablelists[table_type].next; while (table_desc) { /* * Delete all namespace entries owned by this table. Note that these @@ -270,7 +270,7 @@ acpi_status acpi_unload_table(acpi_table * PARAMETERS: table_type - one of the defined table types * Instance - the non zero instance of the table, allows * support for multiple tables of the same type - * see acpi_gbl_acpi_table_flag + * see acpi_gbl_AcpiTableFlag * out_table_header - pointer to the struct acpi_table_header if successful * * DESCRIPTION: This function is called to get an ACPI table header. The caller @@ -301,7 +301,7 @@ acpi_get_table_header(acpi_table_type ta /* Check the table type and instance */ if ((table_type > ACPI_TABLE_MAX) || - (ACPI_IS_SINGLE_TABLE(acpi_gbl_table_data[table_type].flags) && + (ACPI_IS_SINGLE_TABLE(acpi_gbl_tabledata[table_type].flags) && instance > 1)) { return_ACPI_STATUS(AE_BAD_PARAMETER); } @@ -336,7 +336,7 @@ acpi_get_table_header(acpi_table_type ta * PARAMETERS: table_type - one of the defined table types * Instance - the non zero instance of the table, allows * support for multiple tables of the same type - * see acpi_gbl_acpi_table_flag + * see acpi_gbl_AcpiTableFlag * ret_buffer - pointer to a structure containing a buffer to * receive the table * @@ -376,7 +376,7 @@ acpi_get_table(acpi_table_type table_typ /* Check the table type and instance */ if ((table_type > ACPI_TABLE_MAX) || - (ACPI_IS_SINGLE_TABLE(acpi_gbl_table_data[table_type].flags) && + (ACPI_IS_SINGLE_TABLE(acpi_gbl_tabledata[table_type].flags) && instance > 1)) { return_ACPI_STATUS(AE_BAD_PARAMETER); } Index: linux-acpi-2.6/drivers/acpi/tables/tbxfroot.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/tables/tbxfroot.c +++ linux-acpi-2.6/drivers/acpi/tables/tbxfroot.c @@ -296,7 +296,7 @@ acpi_get_firmware_table(acpi_string sign table_count = acpi_tb_get_table_count(acpi_gbl_RSDP, rsdt_info->pointer); - address.pointer_type = acpi_gbl_table_flags | flags; + address.pointer_type = acpi_gbl_tableflags | flags; /* * Search the RSDT/XSDT for the correct instance of the @@ -307,7 +307,7 @@ acpi_get_firmware_table(acpi_string sign * Get the next table pointer, handle RSDT vs. XSDT * RSDT pointers are 32 bits, XSDT pointers are 64 bits */ - if (acpi_gbl_root_table_type == ACPI_TABLE_TYPE_RSDT) { + if (acpi_gbl_roottabletype == ACPI_TABLE_TYPE_RSDT) { address.pointer.value = (ACPI_CAST_PTR (RSDT_DESCRIPTOR, Index: linux-acpi-2.6/drivers/acpi/utilities/utalloc.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/utilities/utalloc.c +++ linux-acpi-2.6/drivers/acpi/utilities/utalloc.c @@ -84,7 +84,7 @@ acpi_status acpi_ut_create_caches(void) /* Memory allocation lists */ - status = acpi_ut_create_list("Acpi-Global", 0, &acpi_gbl_global_list); + status = acpi_ut_create_list("Acpi-Global", 0, &acpi_gbl_globallist); if (ACPI_FAILURE(status)) { return (status); } @@ -92,7 +92,7 @@ acpi_status acpi_ut_create_caches(void) status = acpi_ut_create_list("Acpi-Namespace", sizeof(struct acpi_namespace_node), - &acpi_gbl_ns_node_list); + &acpi_gbl_nsnodelist); if (ACPI_FAILURE(status)) { return (status); } @@ -103,7 +103,7 @@ acpi_status acpi_ut_create_caches(void) status = acpi_os_create_cache("acpi_state", sizeof(union acpi_generic_state), ACPI_MAX_STATE_CACHE_DEPTH, - &acpi_gbl_state_cache); + &acpi_gbl_statecache); if (ACPI_FAILURE(status)) { return (status); } @@ -112,7 +112,7 @@ acpi_status acpi_ut_create_caches(void) acpi_os_create_cache("acpi_parse", sizeof(struct acpi_parse_obj_common), ACPI_MAX_PARSE_CACHE_DEPTH, - &acpi_gbl_ps_node_cache); + &acpi_gbl_psnodecache); if (ACPI_FAILURE(status)) { return (status); } @@ -121,7 +121,7 @@ acpi_status acpi_ut_create_caches(void) acpi_os_create_cache("acpi_parse_ext", sizeof(struct acpi_parse_obj_named), ACPI_MAX_EXTPARSE_CACHE_DEPTH, - &acpi_gbl_ps_node_ext_cache); + &acpi_gbl_psnodeextcache); if (ACPI_FAILURE(status)) { return (status); } @@ -130,7 +130,7 @@ acpi_status acpi_ut_create_caches(void) acpi_os_create_cache("acpi_operand", sizeof(union acpi_operand_object), ACPI_MAX_OBJECT_CACHE_DEPTH, - &acpi_gbl_operand_cache); + &acpi_gbl_operandcache); if (ACPI_FAILURE(status)) { return (status); } @@ -153,17 +153,17 @@ acpi_status acpi_ut_create_caches(void) acpi_status acpi_ut_delete_caches(void) { - (void)acpi_os_delete_cache(acpi_gbl_state_cache); - acpi_gbl_state_cache = NULL; + (void)acpi_os_delete_cache(acpi_gbl_statecache); + acpi_gbl_statecache = NULL; - (void)acpi_os_delete_cache(acpi_gbl_operand_cache); - acpi_gbl_operand_cache = NULL; + (void)acpi_os_delete_cache(acpi_gbl_operandcache); + acpi_gbl_operandcache = NULL; - (void)acpi_os_delete_cache(acpi_gbl_ps_node_cache); - acpi_gbl_ps_node_cache = NULL; + (void)acpi_os_delete_cache(acpi_gbl_psnodecache); + acpi_gbl_psnodecache = NULL; - (void)acpi_os_delete_cache(acpi_gbl_ps_node_ext_cache); - acpi_gbl_ps_node_ext_cache = NULL; + (void)acpi_os_delete_cache(acpi_gbl_psnodeextcache); + acpi_gbl_psnodeextcache = NULL; return (AE_OK); } @@ -448,8 +448,8 @@ void *acpi_ut_allocate_and_track(acpi_si return (NULL); } - acpi_gbl_global_list->total_allocated++; - acpi_gbl_global_list->current_total_size += (u32) size; + acpi_gbl_globallist->total_allocated++; + acpi_gbl_globallist->current_total_size += (u32) size; return ((void *)&allocation->user_space); } @@ -495,8 +495,8 @@ void *acpi_ut_callocate_and_track(acpi_s return (NULL); } - acpi_gbl_global_list->total_allocated++; - acpi_gbl_global_list->current_total_size += (u32) size; + acpi_gbl_globallist->total_allocated++; + acpi_gbl_globallist->current_total_size += (u32) size; return ((void *)&allocation->user_space); } @@ -534,8 +534,8 @@ acpi_ut_free_and_track(void *allocation, (((char *)allocation) - sizeof(struct acpi_debug_mem_header))); - acpi_gbl_global_list->total_freed++; - acpi_gbl_global_list->current_total_size -= debug_block->size; + acpi_gbl_globallist->total_freed++; + acpi_gbl_globallist->current_total_size -= debug_block->size; status = acpi_ut_remove_allocation(debug_block, component, module, line); @@ -566,7 +566,7 @@ static struct acpi_debug_mem_block *acpi ACPI_FUNCTION_ENTRY(); - element = acpi_gbl_global_list->list_head; + element = acpi_gbl_globallist->list_head; /* Search for the address. */ @@ -609,7 +609,7 @@ acpi_ut_track_allocation(struct acpi_deb ACPI_FUNCTION_TRACE_PTR("ut_track_allocation", allocation); - mem_list = acpi_gbl_global_list; + mem_list = acpi_gbl_globallist; status = acpi_ut_acquire_mutex(ACPI_MTX_MEMORY); if (ACPI_FAILURE(status)) { return_ACPI_STATUS(status); @@ -682,7 +682,7 @@ acpi_ut_remove_allocation(struct acpi_de ACPI_FUNCTION_TRACE("ut_remove_allocation"); - mem_list = acpi_gbl_global_list; + mem_list = acpi_gbl_globallist; if (NULL == mem_list->list_head) { /* No allocations! */ @@ -765,13 +765,13 @@ void acpi_ut_dump_allocation_info(void) ACPI_DEBUG_PRINT (TRACE_ALLOCATIONS | TRACE_TABLES, ("%30s: %4d (%3d Kb)\n", "Current Nodes", - acpi_gbl_current_node_count, - ROUND_UP_TO_1K (acpi_gbl_current_node_size))); + acpi_gbl_CurrentNodeCount, + ROUND_UP_TO_1K (acpi_gbl_CurrentNodeSize))); ACPI_DEBUG_PRINT (TRACE_ALLOCATIONS | TRACE_TABLES, ("%30s: %4d (%3d Kb)\n", "Max Nodes", - acpi_gbl_max_concurrent_node_count, - ROUND_UP_TO_1K ((acpi_gbl_max_concurrent_node_count * + acpi_gbl_MaxConcurrentNodeCount, + ROUND_UP_TO_1K ((acpi_gbl_MaxConcurrentNodeCount * sizeof (struct acpi_namespace_node))))); */ return_VOID; @@ -806,7 +806,7 @@ void acpi_ut_dump_allocations(u32 compon return; } - element = acpi_gbl_global_list->list_head; + element = acpi_gbl_globallist->list_head; while (element) { if ((element->component & component) && ((module == NULL) Index: linux-acpi-2.6/drivers/acpi/utilities/utdebug.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/utilities/utdebug.c +++ linux-acpi-2.6/drivers/acpi/utilities/utdebug.c @@ -49,9 +49,9 @@ ACPI_MODULE_NAME("utdebug") #ifdef ACPI_DEBUG_OUTPUT -static u32 acpi_gbl_prev_thread_id = 0xFFFFFFFF; -static char *acpi_gbl_fn_entry_str = "----Entry"; -static char *acpi_gbl_fn_exit_str = "----Exit-"; +static u32 acpi_gbl_prevthreadid = 0xFFFFFFFF; +static char *acpi_gbl_fnentrystr = "----Entry"; +static char *acpi_gbl_fnexitstr = "----Exit-"; /* Local prototypes */ @@ -73,7 +73,7 @@ void acpi_ut_init_stack_ptr_trace(void) { u32 current_sp; - acpi_gbl_entry_stack_pointer = ACPI_PTR_DIFF(¤t_sp, NULL); + acpi_gbl_entrystackpointer = ACPI_PTR_DIFF(¤t_sp, NULL); } /******************************************************************************* @@ -94,12 +94,12 @@ void acpi_ut_track_stack_ptr(void) current_sp = ACPI_PTR_DIFF(¤t_sp, NULL); - if (current_sp < acpi_gbl_lowest_stack_pointer) { - acpi_gbl_lowest_stack_pointer = current_sp; + if (current_sp < acpi_gbl_loweststackpointer) { + acpi_gbl_loweststackpointer = current_sp; } - if (acpi_gbl_nesting_level > acpi_gbl_deepest_nesting) { - acpi_gbl_deepest_nesting = acpi_gbl_nesting_level; + if (acpi_gbl_nestinglevel > acpi_gbl_deepestnesting) { + acpi_gbl_deepestnesting = acpi_gbl_nestinglevel; } } @@ -180,14 +180,14 @@ acpi_ut_debug_print(u32 requested_debug_ */ thread_id = acpi_os_get_thread_id(); - if (thread_id != acpi_gbl_prev_thread_id) { + if (thread_id != acpi_gbl_prevthreadid) { if (ACPI_LV_THREADS & acpi_dbg_level) { acpi_os_printf ("\n**** Context Switch from TID %X to TID %X ****\n\n", - acpi_gbl_prev_thread_id, thread_id); + acpi_gbl_prevthreadid, thread_id); } - acpi_gbl_prev_thread_id = thread_id; + acpi_gbl_prevthreadid = thread_id; } /* @@ -201,7 +201,7 @@ acpi_ut_debug_print(u32 requested_debug_ } acpi_os_printf("[%02ld] %-22.22s: ", - acpi_gbl_nesting_level, + acpi_gbl_nestinglevel, acpi_ut_trim_function_name(function_name)); va_start(args, format); @@ -269,12 +269,12 @@ acpi_ut_trace(u32 line_number, const char *function_name, char *module_name, u32 component_id) { - acpi_gbl_nesting_level++; + acpi_gbl_nestinglevel++; acpi_ut_track_stack_ptr(); acpi_ut_debug_print(ACPI_LV_FUNCTIONS, line_number, function_name, module_name, - component_id, "%s\n", acpi_gbl_fn_entry_str); + component_id, "%s\n", acpi_gbl_fnentrystr); } EXPORT_SYMBOL(acpi_ut_trace); @@ -301,12 +301,12 @@ acpi_ut_trace_ptr(u32 line_number, const char *function_name, char *module_name, u32 component_id, void *pointer) { - acpi_gbl_nesting_level++; + acpi_gbl_nestinglevel++; acpi_ut_track_stack_ptr(); acpi_ut_debug_print(ACPI_LV_FUNCTIONS, line_number, function_name, module_name, - component_id, "%s %p\n", acpi_gbl_fn_entry_str, + component_id, "%s %p\n", acpi_gbl_fnentrystr, pointer); } @@ -333,12 +333,12 @@ acpi_ut_trace_str(u32 line_number, char *module_name, u32 component_id, char *string) { - acpi_gbl_nesting_level++; + acpi_gbl_nestinglevel++; acpi_ut_track_stack_ptr(); acpi_ut_debug_print(ACPI_LV_FUNCTIONS, line_number, function_name, module_name, - component_id, "%s %s\n", acpi_gbl_fn_entry_str, + component_id, "%s %s\n", acpi_gbl_fnentrystr, string); } @@ -365,12 +365,12 @@ acpi_ut_trace_u32(u32 line_number, char *module_name, u32 component_id, u32 integer) { - acpi_gbl_nesting_level++; + acpi_gbl_nestinglevel++; acpi_ut_track_stack_ptr(); acpi_ut_debug_print(ACPI_LV_FUNCTIONS, line_number, function_name, module_name, - component_id, "%s %08X\n", acpi_gbl_fn_entry_str, + component_id, "%s %08X\n", acpi_gbl_fnentrystr, integer); } @@ -397,9 +397,9 @@ acpi_ut_exit(u32 line_number, acpi_ut_debug_print(ACPI_LV_FUNCTIONS, line_number, function_name, module_name, - component_id, "%s\n", acpi_gbl_fn_exit_str); + component_id, "%s\n", acpi_gbl_fnexitstr); - acpi_gbl_nesting_level--; + acpi_gbl_nestinglevel--; } EXPORT_SYMBOL(acpi_ut_exit); @@ -430,18 +430,17 @@ acpi_ut_status_exit(u32 line_number, if (ACPI_SUCCESS(status)) { acpi_ut_debug_print(ACPI_LV_FUNCTIONS, line_number, function_name, module_name, - component_id, "%s %s\n", - acpi_gbl_fn_exit_str, + component_id, "%s %s\n", acpi_gbl_fnexitstr, acpi_format_exception(status)); } else { acpi_ut_debug_print(ACPI_LV_FUNCTIONS, line_number, function_name, module_name, component_id, "%s ****Exception****: %s\n", - acpi_gbl_fn_exit_str, + acpi_gbl_fnexitstr, acpi_format_exception(status)); } - acpi_gbl_nesting_level--; + acpi_gbl_nestinglevel--; } EXPORT_SYMBOL(acpi_ut_status_exit); @@ -471,10 +470,10 @@ acpi_ut_value_exit(u32 line_number, acpi_ut_debug_print(ACPI_LV_FUNCTIONS, line_number, function_name, module_name, - component_id, "%s %8.8X%8.8X\n", - acpi_gbl_fn_exit_str, ACPI_FORMAT_UINT64(value)); + component_id, "%s %8.8X%8.8X\n", acpi_gbl_fnexitstr, + ACPI_FORMAT_UINT64(value)); - acpi_gbl_nesting_level--; + acpi_gbl_nestinglevel--; } EXPORT_SYMBOL(acpi_ut_value_exit); @@ -504,9 +503,9 @@ acpi_ut_ptr_exit(u32 line_number, acpi_ut_debug_print(ACPI_LV_FUNCTIONS, line_number, function_name, module_name, - component_id, "%s %p\n", acpi_gbl_fn_exit_str, ptr); + component_id, "%s %p\n", acpi_gbl_fnexitstr, ptr); - acpi_gbl_nesting_level--; + acpi_gbl_nestinglevel--; } #endif Index: linux-acpi-2.6/drivers/acpi/utilities/uteval.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/utilities/uteval.c +++ linux-acpi-2.6/drivers/acpi/utilities/uteval.c @@ -96,8 +96,7 @@ acpi_status acpi_ut_osi_implementation(s for (i = 0; i < ACPI_NUM_OSI_STRINGS; i++) { if (!ACPI_STRCMP(string_desc->string.pointer, ACPI_CAST_PTR(char, - acpi_gbl_valid_osi_strings[i]))) - { + acpi_gbl_validosistrings[i]))) { /* This string is supported */ @@ -199,7 +198,7 @@ acpi_ut_evaluate_object(struct acpi_name break; } - if ((acpi_gbl_enable_interpreter_slack) && (!expected_return_btypes)) { + if ((acpi_gbl_enableinterpreterslack) && (!expected_return_btypes)) { /* * We received a return object, but one was not expected. This can * happen frequently if the "implicit return" feature is enabled. @@ -642,7 +641,7 @@ acpi_ut_execute_sxds(struct acpi_namespa highest[i] = 0xFF; status = acpi_ut_evaluate_object(device_node, ACPI_CAST_PTR(char, - acpi_gbl_highest_dstate_names + acpi_gbl_highestdstatenames [i]), ACPI_BTYPE_INTEGER, &obj_desc); if (ACPI_FAILURE(status)) { @@ -650,7 +649,7 @@ acpi_ut_execute_sxds(struct acpi_namespa ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "%s on Device %4.4s, %s\n", ACPI_CAST_PTR(char, - acpi_gbl_highest_dstate_names + acpi_gbl_highestdstatenames [i]), acpi_ut_get_node_name (device_node), Index: linux-acpi-2.6/drivers/acpi/utilities/utglobal.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/utilities/utglobal.c +++ linux-acpi-2.6/drivers/acpi/utilities/utglobal.c @@ -78,31 +78,28 @@ const char *acpi_format_exception(acpi_s case AE_CODE_ENVIRONMENTAL: if (sub_status <= AE_CODE_ENV_MAX) { - exception = acpi_gbl_exception_names_env[sub_status]; + exception = acpi_gbl_exceptionnames_env[sub_status]; } break; case AE_CODE_PROGRAMMER: if (sub_status <= AE_CODE_PGM_MAX) { - exception = - acpi_gbl_exception_names_pgm[sub_status - 1]; + exception = acpi_gbl_exceptionnames_pgm[sub_status - 1]; } 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_exceptionnames_tbl[sub_status - 1]; } break; case AE_CODE_AML: if (sub_status <= AE_CODE_AML_MAX) { - exception = - acpi_gbl_exception_names_aml[sub_status - 1]; + exception = acpi_gbl_exceptionnames_aml[sub_status - 1]; } break; @@ -110,7 +107,7 @@ const char *acpi_format_exception(acpi_s if (sub_status <= AE_CODE_CTRL_MAX) { exception = - acpi_gbl_exception_names_ctrl[sub_status - 1]; + acpi_gbl_exceptionnames_ctrl[sub_status - 1]; } break; @@ -143,32 +140,37 @@ const char *acpi_format_exception(acpi_s */ /* Debug switch - level and trace mask */ + +#ifdef ACPI_DEBUG_OUTPUT u32 acpi_dbg_level = ACPI_DEBUG_DEFAULT; +#else +u32 acpi_dbg_level = ACPI_NORMAL_DEFAULT; +#endif EXPORT_SYMBOL(acpi_dbg_level); /* Debug switch - layer (component) mask */ -u32 acpi_dbg_layer = ACPI_COMPONENT_DEFAULT | ACPI_ALL_DRIVERS; +u32 acpi_dbg_layer = ACPI_COMPONENT_DEFAULT; EXPORT_SYMBOL(acpi_dbg_layer); -u32 acpi_gbl_nesting_level = 0; +u32 acpi_gbl_nestinglevel = 0; /* Debugger globals */ -u8 acpi_gbl_db_terminate_threads = FALSE; -u8 acpi_gbl_abort_method = FALSE; -u8 acpi_gbl_method_executing = FALSE; +u8 acpi_gbl_dbterminatethreads = FALSE; +u8 acpi_gbl_abortmethod = FALSE; +u8 acpi_gbl_methodexecuting = FALSE; /* System flags */ -u32 acpi_gbl_startup_flags = 0; +u32 acpi_gbl_startupflags = 0; /* System starts uninitialized */ u8 acpi_gbl_shutdown = TRUE; -const u8 acpi_gbl_decode_to8bit[8] = { 1, 2, 4, 8, 16, 32, 64, 128 }; +const u8 acpi_gbl_decodeto8bit[8] = { 1, 2, 4, 8, 16, 32, 64, 128 }; -const char *acpi_gbl_sleep_state_names[ACPI_S_STATE_COUNT] = { +const char *acpi_gbl_sleepstatenames[ACPI_S_STATE_COUNT] = { "\\_S0_", "\\_S1_", "\\_S2_", @@ -177,7 +179,7 @@ const char *acpi_gbl_sleep_state_names[A "\\_S5_" }; -const char *acpi_gbl_highest_dstate_names[4] = { +const char *acpi_gbl_highestdstatenames[4] = { "_S1D", "_S2D", "_S3D", @@ -188,7 +190,7 @@ const char *acpi_gbl_highest_dstate_name * Strings supported by the _OSI predefined (internal) method. * When adding strings, be sure to update ACPI_NUM_OSI_STRINGS. */ -const char *acpi_gbl_valid_osi_strings[ACPI_NUM_OSI_STRINGS] = { +const char *acpi_gbl_validosistrings[ACPI_NUM_OSI_STRINGS] = { /* Operating System Vendor Strings */ "Linux", @@ -221,7 +223,7 @@ const char *acpi_gbl_valid_osi_strings[A * 2) _TZ_ is defined to be a thermal zone in order to allow ASL code to * perform a Notify() operation on it. */ -const struct acpi_predefined_names acpi_gbl_pre_defined_names[] = { +const struct acpi_predefined_names acpi_gbl_predefinednames[] = { {"_GPE", ACPI_TYPE_LOCAL_SCOPE, NULL}, {"_PR_", ACPI_TYPE_LOCAL_SCOPE, NULL}, {"_SB_", ACPI_TYPE_DEVICE, NULL}, @@ -244,7 +246,7 @@ const struct acpi_predefined_names acpi_ * Properties of the ACPI Object Types, both internal and external. * The table is indexed by values of acpi_object_type */ -const u8 acpi_gbl_ns_properties[] = { +const u8 acpi_gbl_nsproperties[] = { ACPI_NS_NORMAL, /* 00 Any */ ACPI_NS_NORMAL, /* 01 Number */ ACPI_NS_NORMAL, /* 02 String */ @@ -280,7 +282,7 @@ const u8 acpi_gbl_ns_properties[] = { /* Hex to ASCII conversion table */ -static const char acpi_gbl_hex_to_ascii[] = { +static const char acpi_gbl_hextoascii[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; @@ -302,7 +304,7 @@ static const char acpi_gbl_hex_to_ascii[ char acpi_ut_hex_to_ascii_char(acpi_integer integer, u32 position) { - return (acpi_gbl_hex_to_ascii[(integer >> position) & 0xF]); + return (acpi_gbl_hextoascii[(integer >> position) & 0xF]); } /******************************************************************************* @@ -318,9 +320,9 @@ char acpi_ut_hex_to_ascii_char(acpi_inte * ******************************************************************************/ -struct acpi_table_list acpi_gbl_table_lists[NUM_ACPI_TABLE_TYPES]; +struct acpi_table_list acpi_gbl_tablelists[NUM_ACPI_TABLE_TYPES]; -struct acpi_table_support acpi_gbl_table_data[NUM_ACPI_TABLE_TYPES] = { +struct acpi_table_support acpi_gbl_tabledata[NUM_ACPI_TABLE_TYPES] = { /*********** Name, Signature, Global typed pointer Signature size, Type How many allowed?, Contains valid AML? */ /* RSDP 0 */ {RSDP_NAME, RSDP_SIG, NULL, sizeof(RSDP_SIG) - 1, @@ -358,7 +360,7 @@ struct acpi_table_support acpi_gbl_table * ******************************************************************************/ -struct acpi_bit_register_info acpi_gbl_bit_register_info[ACPI_NUM_BITREG] = { +struct acpi_bit_register_info acpi_gbl_bitregisterinfo[ACPI_NUM_BITREG] = { /* Name Parent Register Register Bit Position Register Bit Mask */ /* ACPI_BITREG_TIMER_STATUS */ {ACPI_REGISTER_PM1_STATUS, @@ -430,7 +432,7 @@ struct acpi_bit_register_info acpi_gbl_b ACPI_BITMASK_ARB_DISABLE} }; -struct acpi_fixed_event_info acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVENTS] = { +struct acpi_fixed_event_info acpi_gbl_fixedeventinfo[ACPI_NUM_FIXED_EVENTS] = { /* ACPI_EVENT_PMTIMER */ {ACPI_BITREG_TIMER_STATUS, ACPI_BITREG_TIMER_ENABLE, ACPI_BITMASK_TIMER_STATUS, @@ -467,7 +469,7 @@ struct acpi_fixed_event_info acpi_gbl_fi /* Region type decoding */ -const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS] = { +const char *acpi_gbl_regiontypes[ACPI_NUM_PREDEFINED_REGIONS] = { /*! [Begin] no source code translation (keep these ASL Keywords as-is) */ "SystemMemory", "SystemIO", @@ -489,7 +491,7 @@ char *acpi_ut_get_region_name(u8 space_i return ("invalid_space_id"); } - return (ACPI_CAST_PTR(char, acpi_gbl_region_types[space_id])); + return (ACPI_CAST_PTR(char, acpi_gbl_regiontypes[space_id])); } /******************************************************************************* @@ -506,7 +508,7 @@ char *acpi_ut_get_region_name(u8 space_i /* Event type decoding */ -static const char *acpi_gbl_event_types[ACPI_NUM_FIXED_EVENTS] = { +static const char *acpi_gbl_eventtypes[ACPI_NUM_FIXED_EVENTS] = { /*! [Begin] no source code translation (keep these strings as-is) */ "PM_Timer", "GlobalLock", @@ -523,7 +525,7 @@ char *acpi_ut_get_event_name(u32 event_i return ("invalid_event_iD"); } - return (ACPI_CAST_PTR(char, acpi_gbl_event_types[event_id])); + return (ACPI_CAST_PTR(char, acpi_gbl_eventtypes[event_id])); } /******************************************************************************* @@ -539,18 +541,18 @@ char *acpi_ut_get_event_name(u32 event_i ******************************************************************************/ /* - * Elements of acpi_gbl_ns_type_names below must match + * Elements of acpi_gbl_NsTypeNames below must match * one-to-one with values of acpi_object_type * * The type ACPI_TYPE_ANY (Untyped) is used as a "don't care" when searching; * when stored in a table it really means that we have thus far seen no * evidence to indicate what type is actually going to be stored for this entry. */ -static const char acpi_gbl_bad_type[] = "UNDEFINED"; +static const char acpi_gbl_badtype[] = "UNDEFINED"; /* Printable names of the ACPI object types */ -static const char *acpi_gbl_ns_type_names[] = { +static const char *acpi_gbl_nstypenames[] = { /*! [Begin] no source code translation (keep these strings as-is) */ /* 00 */ "Untyped", /* 01 */ "Integer", @@ -590,10 +592,10 @@ char *acpi_ut_get_type_name(acpi_object_ { if (type > ACPI_TYPE_INVALID) { - return (ACPI_CAST_PTR(char, acpi_gbl_bad_type)); + return (ACPI_CAST_PTR(char, acpi_gbl_badtype)); } - return (ACPI_CAST_PTR(char, acpi_gbl_ns_type_names[type])); + return (ACPI_CAST_PTR(char, acpi_gbl_nstypenames[type])); } char *acpi_ut_get_object_type_name(union acpi_operand_object *obj_desc) @@ -630,7 +632,7 @@ char *acpi_ut_get_node_name(void *object /* Check for Root node */ - if ((object == ACPI_ROOT_OBJECT) || (object == acpi_gbl_root_node)) { + if ((object == ACPI_ROOT_OBJECT) || (object == acpi_gbl_rootnode)) { return ("\"\\\" "); } @@ -665,7 +667,7 @@ char *acpi_ut_get_node_name(void *object /* Printable names of object descriptor types */ -static const char *acpi_gbl_desc_type_names[] = { +static const char *acpi_gbl_desctypenames[] = { /*! [Begin] no source code translation (keep these ASL Keywords as-is) */ /* 00 */ "Invalid", /* 01 */ "Cached", @@ -694,12 +696,12 @@ char *acpi_ut_get_descriptor_name(void * } if (ACPI_GET_DESCRIPTOR_TYPE(object) > ACPI_DESC_TYPE_MAX) { - return (ACPI_CAST_PTR(char, acpi_gbl_bad_type)); + return (ACPI_CAST_PTR(char, acpi_gbl_badtype)); } return (ACPI_CAST_PTR(char, - acpi_gbl_desc_type_names[ACPI_GET_DESCRIPTOR_TYPE - (object)])); + acpi_gbl_desctypenames[ACPI_GET_DESCRIPTOR_TYPE + (object)])); } @@ -728,7 +730,7 @@ char *acpi_ut_get_mutex_name(u32 mutex_i return ("Invalid Mutex ID"); } - return (acpi_gbl_mutex_names[mutex_id]); + return (acpi_gbl_mutexnames[mutex_id]); } #endif @@ -787,35 +789,35 @@ void acpi_ut_init_globals(void) /* ACPI table structure */ for (i = 0; i < NUM_ACPI_TABLE_TYPES; i++) { - acpi_gbl_table_lists[i].next = NULL; - acpi_gbl_table_lists[i].count = 0; + acpi_gbl_tablelists[i].next = NULL; + acpi_gbl_tablelists[i].count = 0; } /* Mutex locked flags */ for (i = 0; i < NUM_MUTEX; i++) { - acpi_gbl_mutex_info[i].mutex = NULL; - acpi_gbl_mutex_info[i].thread_id = ACPI_MUTEX_NOT_ACQUIRED; - acpi_gbl_mutex_info[i].use_count = 0; + acpi_gbl_mutexinfo[i].mutex = NULL; + acpi_gbl_mutexinfo[i].thread_id = ACPI_MUTEX_NOT_ACQUIRED; + acpi_gbl_mutexinfo[i].use_count = 0; } for (i = 0; i < ACPI_NUM_OWNERID_MASKS; i++) { - acpi_gbl_owner_id_mask[i] = 0; + acpi_gbl_owneridmask[i] = 0; } - acpi_gbl_owner_id_mask[ACPI_NUM_OWNERID_MASKS - 1] = 0x80000000; /* Last ID is never valid */ + acpi_gbl_owneridmask[ACPI_NUM_OWNERID_MASKS - 1] = 0x80000000; /* Last ID is never valid */ /* GPE support */ - acpi_gbl_gpe_xrupt_list_head = NULL; - acpi_gbl_gpe_fadt_blocks[0] = NULL; - acpi_gbl_gpe_fadt_blocks[1] = NULL; + acpi_gbl_gpexruptlisthead = NULL; + acpi_gbl_gpefadtblocks[0] = NULL; + acpi_gbl_gpefadtblocks[1] = NULL; /* Global notify handlers */ - acpi_gbl_system_notify.handler = NULL; - acpi_gbl_device_notify.handler = NULL; - acpi_gbl_exception_handler = NULL; - acpi_gbl_init_handler = NULL; + acpi_gbl_systemnotify.handler = NULL; + acpi_gbl_devicenotify.handler = NULL; + acpi_gbl_exceptionhandler = NULL; + acpi_gbl_inithandler = NULL; /* Global "typed" ACPI table pointers */ @@ -827,46 +829,46 @@ void acpi_ut_init_globals(void) /* Global Lock support */ - acpi_gbl_global_lock_acquired = FALSE; - acpi_gbl_global_lock_thread_count = 0; - acpi_gbl_global_lock_handle = 0; + acpi_gbl_globallockacquired = FALSE; + acpi_gbl_globallockthreadcount = 0; + acpi_gbl_globallockhandle = 0; /* Miscellaneous variables */ - acpi_gbl_table_flags = ACPI_PHYSICAL_POINTER; - acpi_gbl_rsdp_original_location = 0; - acpi_gbl_cm_single_step = FALSE; - acpi_gbl_db_terminate_threads = FALSE; + acpi_gbl_tableflags = ACPI_PHYSICAL_POINTER; + acpi_gbl_rsdporiginallocation = 0; + acpi_gbl_cmsinglestep = FALSE; + acpi_gbl_dbterminatethreads = FALSE; acpi_gbl_shutdown = FALSE; - acpi_gbl_ns_lookup_count = 0; - acpi_gbl_ps_find_count = 0; - acpi_gbl_acpi_hardware_present = TRUE; - acpi_gbl_last_owner_id_index = 0; - acpi_gbl_next_owner_id_offset = 0; - acpi_gbl_trace_method_name = 0; - acpi_gbl_trace_dbg_level = 0; - acpi_gbl_trace_dbg_layer = 0; - acpi_gbl_debugger_configuration = DEBUGGER_THREADING; - acpi_gbl_db_output_flags = ACPI_DB_CONSOLE_OUTPUT; + acpi_gbl_nslookupcount = 0; + acpi_gbl_psfindcount = 0; + acpi_gbl_acpihardwarepresent = TRUE; + acpi_gbl_lastowneridindex = 0; + acpi_gbl_nextowneridoffset = 0; + acpi_gbl_tracemethodname = 0; + acpi_gbl_tracedbglevel = 0; + acpi_gbl_tracedbglayer = 0; + acpi_gbl_debuggerconfiguration = DEBUGGER_THREADING; + acpi_gbl_dboutputflags = ACPI_DB_CONSOLE_OUTPUT; /* Hardware oriented */ - acpi_gbl_events_initialized = FALSE; - acpi_gbl_system_awake_and_running = TRUE; + acpi_gbl_eventsinitialized = FALSE; + acpi_gbl_systemawakeandrunning = TRUE; /* Namespace */ - acpi_gbl_root_node = NULL; - acpi_gbl_root_node_struct.name.integer = ACPI_ROOT_NAME; - acpi_gbl_root_node_struct.descriptor = ACPI_DESC_TYPE_NAMED; - acpi_gbl_root_node_struct.type = ACPI_TYPE_DEVICE; - acpi_gbl_root_node_struct.child = NULL; - acpi_gbl_root_node_struct.peer = NULL; - acpi_gbl_root_node_struct.object = NULL; - acpi_gbl_root_node_struct.flags = ANOBJ_END_OF_PEER_LIST; + acpi_gbl_rootnode = NULL; + acpi_gbl_rootnodestruct.name.integer = ACPI_ROOT_NAME; + acpi_gbl_rootnodestruct.descriptor = ACPI_DESC_TYPE_NAMED; + acpi_gbl_rootnodestruct.type = ACPI_TYPE_DEVICE; + acpi_gbl_rootnodestruct.child = NULL; + acpi_gbl_rootnodestruct.peer = NULL; + acpi_gbl_rootnodestruct.object = NULL; + acpi_gbl_rootnodestruct.flags = ANOBJ_END_OF_PEER_LIST; #ifdef ACPI_DEBUG_OUTPUT - acpi_gbl_lowest_stack_pointer = ACPI_SIZE_MAX; + acpi_gbl_loweststackpointer = ACPI_SIZE_MAX; #endif return_VOID; Index: linux-acpi-2.6/drivers/acpi/utilities/utinit.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/utilities/utinit.c +++ linux-acpi-2.6/drivers/acpi/utilities/utinit.c @@ -181,7 +181,7 @@ static void acpi_ut_terminate(void) /* Free global tables, etc. */ /* Free global GPE blocks and related info structures */ - gpe_xrupt_info = acpi_gbl_gpe_xrupt_list_head; + gpe_xrupt_info = acpi_gbl_gpexruptlisthead; while (gpe_xrupt_info) { gpe_block = gpe_xrupt_info->gpe_block_list_head; while (gpe_block) { Index: linux-acpi-2.6/drivers/acpi/utilities/utmisc.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/utilities/utmisc.c +++ linux-acpi-2.6/drivers/acpi/utilities/utmisc.c @@ -89,30 +89,30 @@ acpi_status acpi_ut_allocate_owner_id(ac * allocations. (ACPI_NUM_OWNERID_MASKS + 1) because first index may have * to be scanned twice. */ - for (i = 0, j = acpi_gbl_last_owner_id_index; + for (i = 0, j = acpi_gbl_lastowneridindex; i < (ACPI_NUM_OWNERID_MASKS + 1); i++, j++) { if (j >= ACPI_NUM_OWNERID_MASKS) { j = 0; /* Wraparound to start of mask array */ } - for (k = acpi_gbl_next_owner_id_offset; k < 32; k++) { - if (acpi_gbl_owner_id_mask[j] == ACPI_UINT32_MAX) { + for (k = acpi_gbl_nextowneridoffset; k < 32; k++) { + if (acpi_gbl_owneridmask[j] == ACPI_UINT32_MAX) { /* There are no free IDs in this mask */ break; } - if (!(acpi_gbl_owner_id_mask[j] & (1 << k))) { + if (!(acpi_gbl_owneridmask[j] & (1 << k))) { /* * Found a free ID. The actual ID is the bit index plus one, * making zero an invalid Owner ID. Save this as the last ID * allocated and update the global ID mask. */ - acpi_gbl_owner_id_mask[j] |= (1 << k); + acpi_gbl_owneridmask[j] |= (1 << k); - acpi_gbl_last_owner_id_index = (u8) j; - acpi_gbl_next_owner_id_offset = (u8) (k + 1); + acpi_gbl_lastowneridindex = (u8) j; + acpi_gbl_nextowneridoffset = (u8) (k + 1); /* * Construct encoded ID from the index and bit position @@ -130,7 +130,7 @@ acpi_status acpi_ut_allocate_owner_id(ac } } - acpi_gbl_next_owner_id_offset = 0; + acpi_gbl_nextowneridoffset = 0; } /* @@ -204,8 +204,8 @@ void acpi_ut_release_owner_id(acpi_owner /* Free the owner ID only if it is valid */ - if (acpi_gbl_owner_id_mask[index] & bit) { - acpi_gbl_owner_id_mask[index] ^= bit; + if (acpi_gbl_owneridmask[index] & bit) { + acpi_gbl_owneridmask[index] ^= bit; } else { ACPI_ERROR((AE_INFO, "Release of non-allocated owner_id: %2.2X", @@ -389,13 +389,13 @@ void acpi_ut_set_integer_width(u8 revisi { if (revision <= 1) { - acpi_gbl_integer_bit_width = 32; - acpi_gbl_integer_nybble_width = 8; - acpi_gbl_integer_byte_width = 4; + acpi_gbl_integerbitwidth = 32; + acpi_gbl_integernybblewidth = 8; + acpi_gbl_integerbytewidth = 4; } else { - acpi_gbl_integer_bit_width = 64; - acpi_gbl_integer_nybble_width = 16; - acpi_gbl_integer_byte_width = 8; + acpi_gbl_integerbitwidth = 64; + acpi_gbl_integernybblewidth = 16; + acpi_gbl_integerbytewidth = 8; } } Index: linux-acpi-2.6/drivers/acpi/utilities/utmutex.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/utilities/utmutex.c +++ linux-acpi-2.6/drivers/acpi/utilities/utmutex.c @@ -80,7 +80,7 @@ acpi_status acpi_ut_mutex_initialize(voi } } - status = acpi_os_create_lock(&acpi_gbl_gpe_lock); + status = acpi_os_create_lock(&acpi_gbl_gpelock); return_ACPI_STATUS(status); } @@ -109,7 +109,7 @@ void acpi_ut_mutex_terminate(void) (void)acpi_ut_delete_mutex(i); } - acpi_os_delete_lock(acpi_gbl_gpe_lock); + acpi_os_delete_lock(acpi_gbl_gpelock); return_VOID; } @@ -135,13 +135,13 @@ static acpi_status acpi_ut_create_mutex( return_ACPI_STATUS(AE_BAD_PARAMETER); } - if (!acpi_gbl_mutex_info[mutex_id].mutex) { + if (!acpi_gbl_mutexinfo[mutex_id].mutex) { status = acpi_os_create_semaphore(1, 1, - &acpi_gbl_mutex_info - [mutex_id].mutex); - acpi_gbl_mutex_info[mutex_id].thread_id = + &acpi_gbl_mutexinfo[mutex_id]. + mutex); + acpi_gbl_mutexinfo[mutex_id].thread_id = ACPI_MUTEX_NOT_ACQUIRED; - acpi_gbl_mutex_info[mutex_id].use_count = 0; + acpi_gbl_mutexinfo[mutex_id].use_count = 0; } return_ACPI_STATUS(status); @@ -169,10 +169,10 @@ static acpi_status acpi_ut_delete_mutex( return_ACPI_STATUS(AE_BAD_PARAMETER); } - status = acpi_os_delete_semaphore(acpi_gbl_mutex_info[mutex_id].mutex); + status = acpi_os_delete_semaphore(acpi_gbl_mutexinfo[mutex_id].mutex); - acpi_gbl_mutex_info[mutex_id].mutex = NULL; - acpi_gbl_mutex_info[mutex_id].thread_id = ACPI_MUTEX_NOT_ACQUIRED; + acpi_gbl_mutexinfo[mutex_id].mutex = NULL; + acpi_gbl_mutexinfo[mutex_id].thread_id = ACPI_MUTEX_NOT_ACQUIRED; return_ACPI_STATUS(status); } @@ -214,7 +214,7 @@ acpi_status acpi_ut_acquire_mutex(acpi_m * the ACPI subsystem code. */ for (i = mutex_id; i < MAX_MUTEX; i++) { - if (acpi_gbl_mutex_info[i].thread_id == this_thread_id) { + if (acpi_gbl_mutexinfo[i].thread_id == this_thread_id) { if (i == mutex_id) { ACPI_ERROR((AE_INFO, "Mutex [%s] already acquired by this thread [%X]", @@ -241,7 +241,7 @@ acpi_status acpi_ut_acquire_mutex(acpi_m "Thread %X attempting to acquire Mutex [%s]\n", this_thread_id, acpi_ut_get_mutex_name(mutex_id))); - status = acpi_os_wait_semaphore(acpi_gbl_mutex_info[mutex_id].mutex, + status = acpi_os_wait_semaphore(acpi_gbl_mutexinfo[mutex_id].mutex, 1, ACPI_WAIT_FOREVER); if (ACPI_SUCCESS(status)) { ACPI_DEBUG_PRINT((ACPI_DB_MUTEX, @@ -249,8 +249,8 @@ acpi_status acpi_ut_acquire_mutex(acpi_m this_thread_id, acpi_ut_get_mutex_name(mutex_id))); - acpi_gbl_mutex_info[mutex_id].use_count++; - acpi_gbl_mutex_info[mutex_id].thread_id = this_thread_id; + acpi_gbl_mutexinfo[mutex_id].use_count++; + acpi_gbl_mutexinfo[mutex_id].thread_id = this_thread_id; } else { ACPI_EXCEPTION((AE_INFO, status, "Thread %X could not acquire Mutex [%X]", @@ -291,7 +291,7 @@ acpi_status acpi_ut_release_mutex(acpi_m /* * Mutex must be acquired in order to release it! */ - if (acpi_gbl_mutex_info[mutex_id].thread_id == ACPI_MUTEX_NOT_ACQUIRED) { + if (acpi_gbl_mutexinfo[mutex_id].thread_id == ACPI_MUTEX_NOT_ACQUIRED) { ACPI_ERROR((AE_INFO, "Mutex [%X] is not acquired, cannot release", mutex_id)); @@ -310,7 +310,7 @@ acpi_status acpi_ut_release_mutex(acpi_m * the ACPI subsystem code. */ for (i = mutex_id; i < MAX_MUTEX; i++) { - if (acpi_gbl_mutex_info[i].thread_id == this_thread_id) { + if (acpi_gbl_mutexinfo[i].thread_id == this_thread_id) { if (i == mutex_id) { continue; } @@ -328,10 +328,10 @@ acpi_status acpi_ut_release_mutex(acpi_m /* Mark unlocked FIRST */ - acpi_gbl_mutex_info[mutex_id].thread_id = ACPI_MUTEX_NOT_ACQUIRED; + acpi_gbl_mutexinfo[mutex_id].thread_id = ACPI_MUTEX_NOT_ACQUIRED; status = - acpi_os_signal_semaphore(acpi_gbl_mutex_info[mutex_id].mutex, 1); + acpi_os_signal_semaphore(acpi_gbl_mutexinfo[mutex_id].mutex, 1); if (ACPI_FAILURE(status)) { ACPI_EXCEPTION((AE_INFO, status, Index: linux-acpi-2.6/drivers/acpi/utilities/utobject.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/utilities/utobject.c +++ linux-acpi-2.6/drivers/acpi/utilities/utobject.c @@ -311,7 +311,7 @@ void *acpi_ut_allocate_object_desc_dbg(c ACPI_FUNCTION_TRACE("ut_allocate_object_desc_dbg"); - object = acpi_os_acquire_object(acpi_gbl_operand_cache); + object = acpi_os_acquire_object(acpi_gbl_operandcache); if (!object) { ACPI_ERROR((module_name, line_number, "Could not allocate an object descriptor")); @@ -354,7 +354,7 @@ void acpi_ut_delete_object_desc(union ac return_VOID; } - (void)acpi_os_release_object(acpi_gbl_operand_cache, object); + (void)acpi_os_release_object(acpi_gbl_operandcache, object); return_VOID; } Index: linux-acpi-2.6/drivers/acpi/utilities/utresrc.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/utilities/utresrc.c +++ linux-acpi-2.6/drivers/acpi/utilities/utresrc.c @@ -57,14 +57,14 @@ const char *acpi_gbl_BMdecode[2] = { "bus_master" }; -const char *acpi_gbl_config_decode[4] = { +const char *acpi_gbl_configdecode[4] = { "0 - Good Configuration", "1 - Acceptable Configuration", "2 - Suboptimal Configuration", "3 - ***Invalid Configuration***", }; -const char *acpi_gbl_consume_decode[2] = { +const char *acpi_gbl_consumedecode[2] = { "resource_producer", "resource_consumer" }; @@ -79,7 +79,7 @@ const char *acpi_gbl_HEdecode[2] = { "Edge" }; -const char *acpi_gbl_io_decode[2] = { +const char *acpi_gbl_iodecode[2] = { "Decode10", "Decode16" }; @@ -89,7 +89,7 @@ const char *acpi_gbl_LLdecode[2] = { "active_low" }; -const char *acpi_gbl_max_decode[2] = { +const char *acpi_gbl_maxdecode[2] = { "max_not_fixed", "max_fixed" }; @@ -101,7 +101,7 @@ const char *acpi_gbl_MEMdecode[4] = { "Prefetchable" }; -const char *acpi_gbl_min_decode[2] = { +const char *acpi_gbl_mindecode[2] = { "min_not_fixed", "min_fixed" }; @@ -160,7 +160,7 @@ const char *acpi_gbl_TYPdecode[4] = { * Base sizes of the raw AML resource descriptors, indexed by resource type. * Zero indicates a reserved (and therefore invalid) resource type. */ -const u8 acpi_gbl_resource_aml_sizes[] = { +const u8 acpi_gbl_resourceamlsizes[] = { /* Small descriptors */ 0, @@ -202,7 +202,7 @@ const u8 acpi_gbl_resource_aml_sizes[] = * lengths must meet the minimum required length, etc. * Zero indicates a reserved (and therefore invalid) resource type. */ -static const u8 acpi_gbl_resource_types[] = { +static const u8 acpi_gbl_resourcetypes[] = { /* Small descriptors */ 0, @@ -296,7 +296,7 @@ acpi_status acpi_ut_validate_resource(vo /* Check validity of the resource type, zero indicates name is invalid */ - if (!acpi_gbl_resource_types[resource_index]) { + if (!acpi_gbl_resourcetypes[resource_index]) { return (AE_AML_INVALID_RESOURCE_TYPE); } @@ -305,11 +305,11 @@ acpi_status acpi_ut_validate_resource(vo * is at least reasonable, and guarantees that it is non-zero. */ resource_length = acpi_ut_get_resource_length(aml); - minimum_resource_length = acpi_gbl_resource_aml_sizes[resource_index]; + minimum_resource_length = acpi_gbl_resourceamlsizes[resource_index]; /* Validate based upon the type of resource - fixed length or variable */ - switch (acpi_gbl_resource_types[resource_index]) { + switch (acpi_gbl_resourcetypes[resource_index]) { case ACPI_FIXED_LENGTH: /* Fixed length resource, length must match exactly */ Index: linux-acpi-2.6/drivers/acpi/utilities/utstate.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/utilities/utstate.c +++ linux-acpi-2.6/drivers/acpi/utilities/utstate.c @@ -157,7 +157,7 @@ union acpi_generic_state *acpi_ut_create ACPI_FUNCTION_ENTRY(); - state = acpi_os_acquire_object(acpi_gbl_state_cache); + state = acpi_os_acquire_object(acpi_gbl_statecache); if (state) { /* Initialize */ @@ -330,6 +330,6 @@ void acpi_ut_delete_generic_state(union { ACPI_FUNCTION_TRACE("ut_delete_generic_state"); - (void)acpi_os_release_object(acpi_gbl_state_cache, state); + (void)acpi_os_release_object(acpi_gbl_statecache, state); return_VOID; } Index: linux-acpi-2.6/drivers/acpi/utilities/utxface.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/utilities/utxface.c +++ linux-acpi-2.6/drivers/acpi/utilities/utxface.c @@ -148,7 +148,7 @@ acpi_status acpi_enable_subsystem(u32 fl ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "[Init] Going into ACPI mode\n")); - acpi_gbl_original_mode = acpi_hw_get_mode(); + acpi_gbl_originalmode = acpi_hw_get_mode(); status = acpi_enable(); if (ACPI_FAILURE(status)) { @@ -301,7 +301,7 @@ acpi_status acpi_initialize_objects(u32 */ status = acpi_purge_cached_objects(); - acpi_gbl_startup_flags |= ACPI_INITIALIZED_OK; + acpi_gbl_startupflags |= ACPI_INITIALIZED_OK; return_ACPI_STATUS(status); } @@ -325,7 +325,7 @@ acpi_status acpi_terminate(void) /* Terminate the AML Debugger if present */ - ACPI_DEBUGGER_EXEC(acpi_gbl_db_terminate_threads = TRUE); + ACPI_DEBUGGER_EXEC(acpi_gbl_dbterminatethreads = TRUE); /* Shutdown and free all resources */ @@ -366,7 +366,7 @@ acpi_status acpi_terminate(void) acpi_status acpi_subsystem_status(void) { - if (acpi_gbl_startup_flags & ACPI_INITIALIZED_OK) { + if (acpi_gbl_startupflags & ACPI_INITIALIZED_OK) { return (AE_OK); } else { return (AE_ERROR); @@ -450,7 +450,7 @@ acpi_status acpi_get_system_info(struct info_ptr->num_table_types = NUM_ACPI_TABLE_TYPES; for (i = 0; i < NUM_ACPI_TABLE_TYPES; i++) { - info_ptr->table_info[i].count = acpi_gbl_table_lists[i].count; + info_ptr->table_info[i].count = acpi_gbl_tablelists[i].count; } return_ACPI_STATUS(AE_OK); @@ -481,11 +481,11 @@ acpi_install_initialization_handler(acpi return (AE_BAD_PARAMETER); } - if (acpi_gbl_init_handler) { + if (acpi_gbl_inithandler) { return (AE_ALREADY_EXISTS); } - acpi_gbl_init_handler = handler; + acpi_gbl_inithandler = handler; return AE_OK; } @@ -507,9 +507,9 @@ acpi_status acpi_purge_cached_objects(vo { ACPI_FUNCTION_TRACE("acpi_purge_cached_objects"); - (void)acpi_os_purge_cache(acpi_gbl_state_cache); - (void)acpi_os_purge_cache(acpi_gbl_operand_cache); - (void)acpi_os_purge_cache(acpi_gbl_ps_node_cache); - (void)acpi_os_purge_cache(acpi_gbl_ps_node_ext_cache); + (void)acpi_os_purge_cache(acpi_gbl_statecache); + (void)acpi_os_purge_cache(acpi_gbl_operandcache); + (void)acpi_os_purge_cache(acpi_gbl_psnodecache); + (void)acpi_os_purge_cache(acpi_gbl_psnodeextcache); return_ACPI_STATUS(AE_OK); } Index: linux-acpi-2.6/include/acpi/acconfig.h =================================================================== --- linux-acpi-2.6.orig/include/acpi/acconfig.h +++ linux-acpi-2.6/include/acpi/acconfig.h @@ -63,7 +63,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20060210 +#define ACPI_CA_VERSION 0x20060217 /* * OS name, used for the _OS object. The _OS object is essentially obsolete, Index: linux-acpi-2.6/include/acpi/acdebug.h =================================================================== --- linux-acpi-2.6.orig/include/acpi/acdebug.h +++ linux-acpi-2.6/include/acpi/acdebug.h @@ -56,7 +56,7 @@ struct argument_info { }; #define PARAM_LIST(pl) pl -#define DBTEST_OUTPUT_LEVEL(lvl) if (acpi_gbl_db_opt_verbose) +#define DBTEST_OUTPUT_LEVEL(lvl) if (acpi_gbl_dbopt_verbose) #define VERBOSE_PRINT(fp) DBTEST_OUTPUT_LEVEL(lvl) {\ acpi_os_printf PARAM_LIST(fp);} Index: linux-acpi-2.6/include/acpi/acdisasm.h =================================================================== --- linux-acpi-2.6.orig/include/acpi/acdisasm.h +++ linux-acpi-2.6/include/acpi/acdisasm.h @@ -56,16 +56,16 @@ struct acpi_external_list { struct acpi_external_list *next; }; -extern struct acpi_external_list *acpi_gbl_external_list; +extern struct acpi_external_list *acpi_gbl_externallist; /* Strings used for decoding flags to ASL keywords */ -extern const char *acpi_gbl_word_decode[4]; -extern const char *acpi_gbl_irq_decode[2]; -extern const char *acpi_gbl_lock_rule[ACPI_NUM_LOCK_RULES]; -extern const char *acpi_gbl_access_types[ACPI_NUM_ACCESS_TYPES]; -extern const char *acpi_gbl_update_rules[ACPI_NUM_UPDATE_RULES]; -extern const char *acpi_gbl_match_ops[ACPI_NUM_MATCH_OPS]; +extern const char *acpi_gbl_worddecode[4]; +extern const char *acpi_gbl_irqdecode[2]; +extern const char *acpi_gbl_lockrule[ACPI_NUM_LOCK_RULES]; +extern const char *acpi_gbl_accesstypes[ACPI_NUM_ACCESS_TYPES]; +extern const char *acpi_gbl_updaterules[ACPI_NUM_UPDATE_RULES]; +extern const char *acpi_gbl_matchops[ACPI_NUM_MATCH_OPS]; struct acpi_op_walk_info { u32 level; Index: linux-acpi-2.6/include/acpi/acexcep.h =================================================================== --- linux-acpi-2.6.orig/include/acpi/acexcep.h +++ linux-acpi-2.6/include/acpi/acexcep.h @@ -186,7 +186,7 @@ * String versions of the exception codes above * These strings must match the corresponding defines exactly */ -char const *acpi_gbl_exception_names_env[] = { +char const *acpi_gbl_exceptionnames_env[] = { "AE_OK", "AE_ERROR", "AE_NO_ACPI_TABLES", @@ -221,7 +221,7 @@ char const *acpi_gbl_exception_names_env "AE_OWNER_ID_LIMIT" }; -char const *acpi_gbl_exception_names_pgm[] = { +char const *acpi_gbl_exceptionnames_pgm[] = { "AE_BAD_PARAMETER", "AE_BAD_CHARACTER", "AE_BAD_PATHNAME", @@ -233,7 +233,7 @@ char const *acpi_gbl_exception_names_pgm "AE_BAD_DECIMAL_CONSTANT" }; -char const *acpi_gbl_exception_names_tbl[] = { +char const *acpi_gbl_exceptionnames_tbl[] = { "AE_BAD_SIGNATURE", "AE_BAD_HEADER", "AE_BAD_CHECKSUM", @@ -242,7 +242,7 @@ char const *acpi_gbl_exception_names_tbl "AE_INVALID_TABLE_LENGTH" }; -char const *acpi_gbl_exception_names_aml[] = { +char const *acpi_gbl_exceptionnames_aml[] = { "AE_AML_ERROR", "AE_AML_PARSE", "AE_AML_BAD_OPCODE", @@ -278,7 +278,7 @@ char const *acpi_gbl_exception_names_aml "AE_AML_BAD_RESOURCE_LENGTH" }; -char const *acpi_gbl_exception_names_ctrl[] = { +char const *acpi_gbl_exceptionnames_ctrl[] = { "AE_CTRL_RETURN_VALUE", "AE_CTRL_PENDING", "AE_CTRL_TERMINATE", Index: linux-acpi-2.6/include/acpi/acglobal.h =================================================================== --- linux-acpi-2.6.orig/include/acpi/acglobal.h +++ linux-acpi-2.6/include/acpi/acglobal.h @@ -62,8 +62,8 @@ * Keep local copies of these FADT-based registers. NOTE: These globals * are first in this file for alignment reasons on 64-bit systems. */ -ACPI_EXTERN struct acpi_generic_address acpi_gbl_xpm1a_enable; -ACPI_EXTERN struct acpi_generic_address acpi_gbl_xpm1b_enable; +ACPI_EXTERN struct acpi_generic_address acpi_gbl_Xpm1aenable; +ACPI_EXTERN struct acpi_generic_address acpi_gbl_Xpm1benable; /***************************************************************************** * @@ -78,16 +78,16 @@ extern u32 acpi_dbg_layer; /* Procedure nesting level for debug output */ -extern u32 acpi_gbl_nesting_level; +extern u32 acpi_gbl_nestinglevel; /* Support for dynamic control method tracing mechanism */ -ACPI_EXTERN u32 acpi_gbl_original_dbg_level; -ACPI_EXTERN u32 acpi_gbl_original_dbg_layer; -ACPI_EXTERN acpi_name acpi_gbl_trace_method_name; -ACPI_EXTERN u32 acpi_gbl_trace_dbg_level; -ACPI_EXTERN u32 acpi_gbl_trace_dbg_layer; -ACPI_EXTERN u32 acpi_gbl_trace_flags; +ACPI_EXTERN u32 acpi_gbl_originaldbglevel; +ACPI_EXTERN u32 acpi_gbl_originaldbglayer; +ACPI_EXTERN acpi_name acpi_gbl_tracemethodname; +ACPI_EXTERN u32 acpi_gbl_tracedbglevel; +ACPI_EXTERN u32 acpi_gbl_tracedbglayer; +ACPI_EXTERN u32 acpi_gbl_traceflags; /***************************************************************************** * @@ -108,7 +108,7 @@ ACPI_EXTERN u32 acpi_gbl_trace_flags; * 4) Allow ANY object type to be a source operand for the Store() operator * 5) Allow unresolved references (invalid target name) in package objects */ -ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_enable_interpreter_slack, FALSE); +ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_enableinterpreterslack, FALSE); /* * Automatically serialize ALL control methods? Default is FALSE, meaning @@ -116,21 +116,21 @@ ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl * Only change this if the ASL code is poorly written and cannot handle * reentrancy even though methods are marked "not_serialized". */ -ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_all_methods_serialized, FALSE); +ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_allmethodsserialized, FALSE); /* * Create the predefined _OSI method in the namespace? Default is TRUE * because ACPI CA is fully compatible with other ACPI implementations. * Changing this will revert ACPI CA (and machine ASL) to pre-OSI behavior. */ -ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_create_osi_method, TRUE); +ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_createosimethod, TRUE); /* * Disable wakeup GPEs during runtime? Default is TRUE because WAKE and * RUNTIME GPEs should never be shared, and WAKE GPEs should typically only * be enabled just before going to sleep. */ -ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_leave_wake_gpes_disabled, TRUE); +ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl_leavewakegpesdisabled, TRUE); /***************************************************************************** * @@ -146,14 +146,14 @@ ACPI_EXTERN u8 ACPI_INIT_GLOBAL(acpi_gbl * These tables are single-table only; meaning that there can be at most one * of each in the system. Each global points to the actual table. */ -ACPI_EXTERN u32 acpi_gbl_table_flags; -ACPI_EXTERN u32 acpi_gbl_rsdt_table_count; +ACPI_EXTERN u32 acpi_gbl_tableflags; +ACPI_EXTERN u32 acpi_gbl_rsdttablecount; ACPI_EXTERN struct rsdp_descriptor *acpi_gbl_RSDP; ACPI_EXTERN XSDT_DESCRIPTOR *acpi_gbl_XSDT; ACPI_EXTERN FADT_DESCRIPTOR *acpi_gbl_FADT; ACPI_EXTERN struct acpi_table_header *acpi_gbl_DSDT; ACPI_EXTERN FACS_DESCRIPTOR *acpi_gbl_FACS; -ACPI_EXTERN struct acpi_common_facs acpi_gbl_common_fACS; +ACPI_EXTERN struct acpi_common_facs acpi_gbl_commonFACS; /* * Since there may be multiple SSDTs and PSDTs, a single pointer is not * sufficient; Therefore, there isn't one! @@ -161,7 +161,7 @@ ACPI_EXTERN struct acpi_common_facs acpi /* The root table can be either an RSDT or an XSDT */ -ACPI_EXTERN u8 acpi_gbl_root_table_type; +ACPI_EXTERN u8 acpi_gbl_roottabletype; #define ACPI_TABLE_TYPE_RSDT 'R' #define ACPI_TABLE_TYPE_XSDT 'X' @@ -170,22 +170,22 @@ ACPI_EXTERN u8 acpi_gbl_root_table_type; * If we are executing a method that exists in a 32-bit ACPI table, * use only the lower 32 bits of the (internal) 64-bit Integer. */ -ACPI_EXTERN u8 acpi_gbl_integer_bit_width; -ACPI_EXTERN u8 acpi_gbl_integer_byte_width; -ACPI_EXTERN u8 acpi_gbl_integer_nybble_width; +ACPI_EXTERN u8 acpi_gbl_integerbitwidth; +ACPI_EXTERN u8 acpi_gbl_integerbytewidth; +ACPI_EXTERN u8 acpi_gbl_integernybblewidth; /* * ACPI Table info arrays */ -extern struct acpi_table_list acpi_gbl_table_lists[NUM_ACPI_TABLE_TYPES]; -extern struct acpi_table_support acpi_gbl_table_data[NUM_ACPI_TABLE_TYPES]; +extern struct acpi_table_list acpi_gbl_tablelists[NUM_ACPI_TABLE_TYPES]; +extern struct acpi_table_support acpi_gbl_tabledata[NUM_ACPI_TABLE_TYPES]; /* * Predefined mutex objects. This array contains the * actual OS mutex handles, indexed by the local ACPI_MUTEX_HANDLEs. * (The table maps local handles to the real OS handles) */ -ACPI_EXTERN struct acpi_mutex_info acpi_gbl_mutex_info[NUM_MUTEX]; +ACPI_EXTERN struct acpi_mutex_info acpi_gbl_mutexinfo[NUM_MUTEX]; /***************************************************************************** * @@ -197,54 +197,54 @@ ACPI_EXTERN struct acpi_mutex_info acpi_ /* Lists for tracking memory allocations */ -ACPI_EXTERN struct acpi_memory_list *acpi_gbl_global_list; -ACPI_EXTERN struct acpi_memory_list *acpi_gbl_ns_node_list; +ACPI_EXTERN struct acpi_memory_list *acpi_gbl_globallist; +ACPI_EXTERN struct acpi_memory_list *acpi_gbl_nsnodelist; #endif /* Object caches */ -ACPI_EXTERN acpi_cache_t *acpi_gbl_state_cache; -ACPI_EXTERN acpi_cache_t *acpi_gbl_ps_node_cache; -ACPI_EXTERN acpi_cache_t *acpi_gbl_ps_node_ext_cache; -ACPI_EXTERN acpi_cache_t *acpi_gbl_operand_cache; +ACPI_EXTERN acpi_cache_t *acpi_gbl_statecache; +ACPI_EXTERN acpi_cache_t *acpi_gbl_psnodecache; +ACPI_EXTERN acpi_cache_t *acpi_gbl_psnodeextcache; +ACPI_EXTERN acpi_cache_t *acpi_gbl_operandcache; /* Global handlers */ -ACPI_EXTERN struct acpi_object_notify_handler acpi_gbl_device_notify; -ACPI_EXTERN struct acpi_object_notify_handler acpi_gbl_system_notify; -ACPI_EXTERN acpi_exception_handler acpi_gbl_exception_handler; -ACPI_EXTERN acpi_init_handler acpi_gbl_init_handler; -ACPI_EXTERN struct acpi_walk_state *acpi_gbl_breakpoint_walk; -ACPI_EXTERN acpi_handle acpi_gbl_global_lock_semaphore; +ACPI_EXTERN struct acpi_object_notify_handler acpi_gbl_devicenotify; +ACPI_EXTERN struct acpi_object_notify_handler acpi_gbl_systemnotify; +ACPI_EXTERN acpi_exception_handler acpi_gbl_exceptionhandler; +ACPI_EXTERN acpi_init_handler acpi_gbl_inithandler; +ACPI_EXTERN struct acpi_walk_state *acpi_gbl_breakpointwalk; +ACPI_EXTERN acpi_handle acpi_gbl_globallocksemaphore; /* Misc */ -ACPI_EXTERN u32 acpi_gbl_global_lock_thread_count; -ACPI_EXTERN u32 acpi_gbl_original_mode; -ACPI_EXTERN u32 acpi_gbl_rsdp_original_location; -ACPI_EXTERN u32 acpi_gbl_ns_lookup_count; -ACPI_EXTERN u32 acpi_gbl_ps_find_count; -ACPI_EXTERN u32 acpi_gbl_owner_id_mask[ACPI_NUM_OWNERID_MASKS]; -ACPI_EXTERN u16 acpi_gbl_pm1_enable_register_save; -ACPI_EXTERN u16 acpi_gbl_global_lock_handle; -ACPI_EXTERN u8 acpi_gbl_last_owner_id_index; -ACPI_EXTERN u8 acpi_gbl_next_owner_id_offset; -ACPI_EXTERN u8 acpi_gbl_debugger_configuration; -ACPI_EXTERN u8 acpi_gbl_global_lock_acquired; -ACPI_EXTERN u8 acpi_gbl_step_to_next_call; -ACPI_EXTERN u8 acpi_gbl_acpi_hardware_present; -ACPI_EXTERN u8 acpi_gbl_global_lock_present; -ACPI_EXTERN u8 acpi_gbl_events_initialized; -ACPI_EXTERN u8 acpi_gbl_system_awake_and_running; +ACPI_EXTERN u32 acpi_gbl_globallockthreadcount; +ACPI_EXTERN u32 acpi_gbl_originalmode; +ACPI_EXTERN u32 acpi_gbl_rsdporiginallocation; +ACPI_EXTERN u32 acpi_gbl_nslookupcount; +ACPI_EXTERN u32 acpi_gbl_psfindcount; +ACPI_EXTERN u32 acpi_gbl_owneridmask[ACPI_NUM_OWNERID_MASKS]; +ACPI_EXTERN u16 acpi_gbl_pm1enableregistersave; +ACPI_EXTERN u16 acpi_gbl_globallockhandle; +ACPI_EXTERN u8 acpi_gbl_lastowneridindex; +ACPI_EXTERN u8 acpi_gbl_nextowneridoffset; +ACPI_EXTERN u8 acpi_gbl_debuggerconfiguration; +ACPI_EXTERN u8 acpi_gbl_globallockacquired; +ACPI_EXTERN u8 acpi_gbl_steptonextcall; +ACPI_EXTERN u8 acpi_gbl_acpihardwarepresent; +ACPI_EXTERN u8 acpi_gbl_globallockpresent; +ACPI_EXTERN u8 acpi_gbl_eventsinitialized; +ACPI_EXTERN u8 acpi_gbl_systemawakeandrunning; extern u8 acpi_gbl_shutdown; -extern u32 acpi_gbl_startup_flags; -extern const u8 acpi_gbl_decode_to8bit[8]; -extern const char *acpi_gbl_sleep_state_names[ACPI_S_STATE_COUNT]; -extern const char *acpi_gbl_highest_dstate_names[4]; -extern const struct acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES]; -extern const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS]; -extern const char *acpi_gbl_valid_osi_strings[ACPI_NUM_OSI_STRINGS]; +extern u32 acpi_gbl_startupflags; +extern const u8 acpi_gbl_decodeto8bit[8]; +extern const char *acpi_gbl_sleepstatenames[ACPI_S_STATE_COUNT]; +extern const char *acpi_gbl_highestdstatenames[4]; +extern const struct acpi_opcode_info acpi_gbl_amlopinfo[AML_NUM_OPCODES]; +extern const char *acpi_gbl_regiontypes[ACPI_NUM_PREDEFINED_REGIONS]; +extern const char *acpi_gbl_validosistrings[ACPI_NUM_OSI_STRINGS]; /***************************************************************************** * @@ -260,21 +260,21 @@ extern const char *acpi_gbl_valid_osi_st #define NUM_PREDEFINED_NAMES 9 #endif -ACPI_EXTERN struct acpi_namespace_node acpi_gbl_root_node_struct; -ACPI_EXTERN struct acpi_namespace_node *acpi_gbl_root_node; -ACPI_EXTERN struct acpi_namespace_node *acpi_gbl_fadt_gpe_device; +ACPI_EXTERN struct acpi_namespace_node acpi_gbl_rootnodestruct; +ACPI_EXTERN struct acpi_namespace_node *acpi_gbl_rootnode; +ACPI_EXTERN struct acpi_namespace_node *acpi_gbl_fadtgpedevice; -extern const u8 acpi_gbl_ns_properties[NUM_NS_TYPES]; +extern const u8 acpi_gbl_nsproperties[NUM_NS_TYPES]; extern const struct acpi_predefined_names - acpi_gbl_pre_defined_names[NUM_PREDEFINED_NAMES]; + acpi_gbl_predefinednames[NUM_PREDEFINED_NAMES]; #ifdef ACPI_DEBUG_OUTPUT -ACPI_EXTERN u32 acpi_gbl_current_node_count; -ACPI_EXTERN u32 acpi_gbl_current_node_size; -ACPI_EXTERN u32 acpi_gbl_max_concurrent_node_count; -ACPI_EXTERN acpi_size acpi_gbl_entry_stack_pointer; -ACPI_EXTERN acpi_size acpi_gbl_lowest_stack_pointer; -ACPI_EXTERN u32 acpi_gbl_deepest_nesting; +ACPI_EXTERN u32 acpi_gbl_currentnodecount; +ACPI_EXTERN u32 acpi_gbl_currentnodesize; +ACPI_EXTERN u32 acpi_gbl_maxconcurrentnodecount; +ACPI_EXTERN acpi_size acpi_gbl_entrystackpointer; +ACPI_EXTERN acpi_size acpi_gbl_loweststackpointer; +ACPI_EXTERN u32 acpi_gbl_deepestnesting; #endif /***************************************************************************** @@ -283,11 +283,11 @@ ACPI_EXTERN u32 acpi_gbl_deepest_nesting * ****************************************************************************/ -ACPI_EXTERN struct acpi_thread_state *acpi_gbl_current_walk_list; +ACPI_EXTERN struct acpi_thread_state *acpi_gbl_currentwalklist; /* Control method single step flag */ -ACPI_EXTERN u8 acpi_gbl_cm_single_step; +ACPI_EXTERN u8 acpi_gbl_cmsinglestep; /***************************************************************************** * @@ -295,7 +295,7 @@ ACPI_EXTERN u8 acpi_gbl_cm_single_step; * ****************************************************************************/ -ACPI_EXTERN union acpi_parse_object *acpi_gbl_parsed_namespace_root; +ACPI_EXTERN union acpi_parse_object *acpi_gbl_parsednamespaceroot; /***************************************************************************** * @@ -303,10 +303,9 @@ ACPI_EXTERN union acpi_parse_object *acp * ****************************************************************************/ -extern struct acpi_bit_register_info - acpi_gbl_bit_register_info[ACPI_NUM_BITREG]; -ACPI_EXTERN u8 acpi_gbl_sleep_type_a; -ACPI_EXTERN u8 acpi_gbl_sleep_type_b; +extern struct acpi_bit_register_info acpi_gbl_bitregisterinfo[ACPI_NUM_BITREG]; +ACPI_EXTERN u8 acpi_gbl_sleeptypeA; +ACPI_EXTERN u8 acpi_gbl_sleeptypeB; /***************************************************************************** * @@ -315,13 +314,13 @@ ACPI_EXTERN u8 acpi_gbl_sleep_type_b; ****************************************************************************/ extern struct acpi_fixed_event_info - acpi_gbl_fixed_event_info[ACPI_NUM_FIXED_EVENTS]; + acpi_gbl_fixedeventinfo[ACPI_NUM_FIXED_EVENTS]; ACPI_EXTERN struct acpi_fixed_event_handler - acpi_gbl_fixed_event_handlers[ACPI_NUM_FIXED_EVENTS]; -ACPI_EXTERN struct acpi_gpe_xrupt_info *acpi_gbl_gpe_xrupt_list_head; + acpi_gbl_fixedeventhandlers[ACPI_NUM_FIXED_EVENTS]; +ACPI_EXTERN struct acpi_gpe_xrupt_info *acpi_gbl_gpexruptlisthead; ACPI_EXTERN struct acpi_gpe_block_info - *acpi_gbl_gpe_fadt_blocks[ACPI_MAX_GPE_BLOCKS]; -ACPI_EXTERN acpi_handle acpi_gbl_gpe_lock; + *acpi_gbl_gpefadtblocks[ACPI_MAX_GPE_BLOCKS]; +ACPI_EXTERN acpi_handle acpi_gbl_gpelock; /***************************************************************************** * @@ -329,54 +328,54 @@ ACPI_EXTERN acpi_handle acpi_gbl_gpe_loc * ****************************************************************************/ -ACPI_EXTERN u8 acpi_gbl_db_output_flags; +ACPI_EXTERN u8 acpi_gbl_dboutputflags; #ifdef ACPI_DISASSEMBLER -ACPI_EXTERN u8 acpi_gbl_db_opt_disasm; -ACPI_EXTERN u8 acpi_gbl_db_opt_verbose; +ACPI_EXTERN u8 acpi_gbl_dbopt_disasm; +ACPI_EXTERN u8 acpi_gbl_dbopt_verbose; #endif #ifdef ACPI_DEBUGGER -extern u8 acpi_gbl_method_executing; -extern u8 acpi_gbl_abort_method; -extern u8 acpi_gbl_db_terminate_threads; +extern u8 acpi_gbl_methodexecuting; +extern u8 acpi_gbl_abortmethod; +extern u8 acpi_gbl_dbterminatethreads; ACPI_EXTERN int optind; ACPI_EXTERN char *optarg; -ACPI_EXTERN u8 acpi_gbl_db_opt_tables; -ACPI_EXTERN u8 acpi_gbl_db_opt_stats; -ACPI_EXTERN u8 acpi_gbl_db_opt_ini_methods; - -ACPI_EXTERN char *acpi_gbl_db_args[ACPI_DEBUGGER_MAX_ARGS]; -ACPI_EXTERN char acpi_gbl_db_line_buf[80]; -ACPI_EXTERN char acpi_gbl_db_parsed_buf[80]; -ACPI_EXTERN char acpi_gbl_db_scope_buf[40]; -ACPI_EXTERN char acpi_gbl_db_debug_filename[40]; -ACPI_EXTERN u8 acpi_gbl_db_output_to_file; -ACPI_EXTERN char *acpi_gbl_db_buffer; -ACPI_EXTERN char *acpi_gbl_db_filename; -ACPI_EXTERN u32 acpi_gbl_db_debug_level; -ACPI_EXTERN u32 acpi_gbl_db_console_debug_level; -ACPI_EXTERN struct acpi_table_header *acpi_gbl_db_table_ptr; -ACPI_EXTERN struct acpi_namespace_node *acpi_gbl_db_scope_node; +ACPI_EXTERN u8 acpi_gbl_dbopt_tables; +ACPI_EXTERN u8 acpi_gbl_dbopt_stats; +ACPI_EXTERN u8 acpi_gbl_dbopt_ini_methods; + +ACPI_EXTERN char *acpi_gbl_dbargs[ACPI_DEBUGGER_MAX_ARGS]; +ACPI_EXTERN char acpi_gbl_dblinebuf[80]; +ACPI_EXTERN char acpi_gbl_dbparsedbuf[80]; +ACPI_EXTERN char acpi_gbl_dbscopebuf[40]; +ACPI_EXTERN char acpi_gbl_dbdebugfilename[40]; +ACPI_EXTERN u8 acpi_gbl_dboutputtofile; +ACPI_EXTERN char *acpi_gbl_dbbuffer; +ACPI_EXTERN char *acpi_gbl_dbfilename; +ACPI_EXTERN u32 acpi_gbl_dbdebuglevel; +ACPI_EXTERN u32 acpi_gbl_dbconsoledebuglevel; +ACPI_EXTERN struct acpi_table_header *acpi_gbl_dbtableptr; +ACPI_EXTERN struct acpi_namespace_node *acpi_gbl_dbscopenode; /* * Statistic globals */ -ACPI_EXTERN u16 acpi_gbl_obj_type_count[ACPI_TYPE_NS_NODE_MAX + 1]; -ACPI_EXTERN u16 acpi_gbl_node_type_count[ACPI_TYPE_NS_NODE_MAX + 1]; -ACPI_EXTERN u16 acpi_gbl_obj_type_count_misc; -ACPI_EXTERN u16 acpi_gbl_node_type_count_misc; -ACPI_EXTERN u32 acpi_gbl_num_nodes; -ACPI_EXTERN u32 acpi_gbl_num_objects; - -ACPI_EXTERN u32 acpi_gbl_size_of_parse_tree; -ACPI_EXTERN u32 acpi_gbl_size_of_method_trees; -ACPI_EXTERN u32 acpi_gbl_size_of_node_entries; -ACPI_EXTERN u32 acpi_gbl_size_of_acpi_objects; +ACPI_EXTERN u16 acpi_gbl_objtypecount[ACPI_TYPE_NS_NODE_MAX + 1]; +ACPI_EXTERN u16 acpi_gbl_nodetypecount[ACPI_TYPE_NS_NODE_MAX + 1]; +ACPI_EXTERN u16 acpi_gbl_objtypecountmisc; +ACPI_EXTERN u16 acpi_gbl_nodetypecountmisc; +ACPI_EXTERN u32 acpi_gbl_numnodes; +ACPI_EXTERN u32 acpi_gbl_numobjects; + +ACPI_EXTERN u32 acpi_gbl_sizeofparsetree; +ACPI_EXTERN u32 acpi_gbl_sizeofmethodtrees; +ACPI_EXTERN u32 acpi_gbl_sizeofnodeentries; +ACPI_EXTERN u32 acpi_gbl_sizeofacpiobjects; #endif /* ACPI_DEBUGGER */ Index: linux-acpi-2.6/include/acpi/aclocal.h =================================================================== --- linux-acpi-2.6.orig/include/acpi/aclocal.h +++ linux-acpi-2.6/include/acpi/aclocal.h @@ -72,7 +72,7 @@ union acpi_parse_object; * The acquire/release ordering protocol is implied via this list. Mutexes * with a lower value must be acquired before mutexes with a higher value. * - * NOTE: any changes here must be reflected in the acpi_gbl_mutex_names table also! + * NOTE: any changes here must be reflected in the acpi_gbl_MutexNames table also! */ #define ACPI_MTX_EXECUTE 0 #define ACPI_MTX_INTERPRETER 1 @@ -96,20 +96,20 @@ union acpi_parse_object; /* Names for the mutexes used in the subsystem */ -static char *acpi_gbl_mutex_names[] = { +static char *acpi_gbl_mutexnames[] = { "ACPI_MTX_Execute", "ACPI_MTX_Interpreter", "ACPI_MTX_Parser", "ACPI_MTX_Dispatcher", "ACPI_MTX_Tables", - "ACPI_MTX_op_regions", + "ACPI_MTX_OpRegions", "ACPI_MTX_Namespace", "ACPI_MTX_Events", "ACPI_MTX_Hardware", "ACPI_MTX_Caches", "ACPI_MTX_Memory", - "ACPI_MTX_debug_cmd_complete", - "ACPI_MTX_debug_cmd_ready", + "ACPI_MTX_DebugCmdComplete", + "ACPI_MTX_DebugCmdReady", }; #endif Index: linux-acpi-2.6/include/acpi/acmacros.h =================================================================== --- linux-acpi-2.6.orig/include/acpi/acmacros.h +++ linux-acpi-2.6/include/acpi/acmacros.h @@ -341,29 +341,33 @@ /* * Rounding macros (Power of two boundaries only) */ -#define ACPI_ROUND_DOWN(value,boundary) (((acpi_native_uint)(value)) & \ +#define ACPI_ROUND_DOWN(value,boundary) (((acpi_native_uint)(value)) & \ (~(((acpi_native_uint) boundary)-1))) -#define ACPI_ROUND_UP(value,boundary) ((((acpi_native_uint)(value)) + \ +#define ACPI_ROUND_UP(value,boundary) ((((acpi_native_uint)(value)) + \ (((acpi_native_uint) boundary)-1)) & \ (~(((acpi_native_uint) boundary)-1))) -#define ACPI_ROUND_DOWN_TO_32_BITS(a) ACPI_ROUND_DOWN(a,4) -#define ACPI_ROUND_DOWN_TO_64_BITS(a) ACPI_ROUND_DOWN(a,8) -#define ACPI_ROUND_DOWN_TO_NATIVE_WORD(a) ACPI_ROUND_DOWN(a,ALIGNED_ADDRESS_BOUNDARY) - -#define ACPI_ROUND_UP_to_32_bITS(a) ACPI_ROUND_UP(a,4) -#define ACPI_ROUND_UP_to_64_bITS(a) ACPI_ROUND_UP(a,8) -#define ACPI_ROUND_UP_TO_NATIVE_WORD(a) ACPI_ROUND_UP(a,ALIGNED_ADDRESS_BOUNDARY) +/* Note: sizeof(acpi_native_uint) evaluates to either 2, 4, or 8 */ -#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)) +#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_UP_TO_1K(a) (((a) + 1023) >> 10) +#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_BITS_UP_TO_BYTES(a) ACPI_DIV_8((a) + 7) +#define ACPI_ROUND_BITS_DOWN_TO_BYTES(a) ACPI_DIV_8((a)) + +#define ACPI_ROUND_UP_TO_1K(a) (((a) + 1023) >> 10) /* Generic (non-power-of-two) rounding */ -#define ACPI_ROUND_UP_TO(value,boundary) (((value) + ((boundary)-1)) / (boundary)) +#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)) /* * Bitmask creation @@ -371,10 +375,10 @@ * 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_INTEGER_MAX) << ((u32) (position)))) +#define ACPI_MASK_BITS_BELOW(position) ((ACPI_INTEGER_MAX) << ((u32) (position))) -#define ACPI_IS_OCTAL_DIGIT(d) (((char)(d) >= '0') && ((char)(d) <= '7')) +#define ACPI_IS_OCTAL_DIGIT(d) (((char)(d) >= '0') && ((char)(d) <= '7')) /* Bitfields within ACPI registers */ @@ -453,7 +457,7 @@ * 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 *_acpimodulename = name; #else #define ACPI_MODULE_NAME(name) #endif @@ -462,7 +466,7 @@ * Ascii error messages can be configured out */ #ifndef ACPI_NO_ERROR_MESSAGES -#define AE_INFO _acpi_module_name, __LINE__ +#define AE_INFO _acpimodulename, __LINE__ /* * Error reporting. Callers module and line number are inserted by AE_INFO, @@ -498,7 +502,7 @@ * Common parameters used for debug output functions: * line number, function name, module(file) name, component ID */ -#define ACPI_DEBUG_PARAMETERS __LINE__, ACPI_GET_FUNCTION_NAME, _acpi_module_name, _COMPONENT +#define ACPI_DEBUG_PARAMETERS __LINE__, ACPI_GET_FUNCTION_NAME, _acpimodulename, _COMPONENT /* * Function entry tracing @@ -511,7 +515,7 @@ * local stack. */ #ifndef ACPI_GET_FUNCTION_NAME -#define ACPI_GET_FUNCTION_NAME _acpi_function_name +#define ACPI_GET_FUNCTION_NAME _acpifunctionname /* * The Name parameter should be the procedure name as a quoted string. * This is declared as a local string ("my_function_name") so that it can @@ -519,7 +523,7 @@ * 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) const char *_acpifunctionname = name; #else /* Compiler supports __FUNCTION__ (or equivalent) -- Ignore this macro */ @@ -543,7 +547,7 @@ * WARNING: These macros include a return statement. This is usually considered * bad form, but having a separate exit macro is very ugly and difficult to maintain. * One of the FUNCTION_TRACE macros above must be used in conjunction with these macros - * so that "_acpi_function_name" is defined. + * so that "_AcpiFunctionName" is defined. * * Note: the DO_WHILE0 macro is used to prevent some compilers from complaining * about these constructs. @@ -616,7 +620,7 @@ /* 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,d,e) acpi_ex_dump_operands(a,b,c,d,e,_acpimodulename,__LINE__) #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) @@ -696,7 +700,7 @@ * 2) Copy the object name */ #define ACPI_ADD_OBJECT_NAME(a,b) ACPI_MEMSET (a->common.name, ' ', sizeof (a->common.name));\ - ACPI_STRNCPY (a->common.name, acpi_gbl_ns_type_names[b], sizeof (a->common.name)) + ACPI_STRNCPY (a->common.name, acpi_gbl_nstypenames[b], sizeof (a->common.name)) #else #define ACPI_ADD_OBJECT_NAME(a,b) @@ -709,8 +713,8 @@ /* Memory allocation */ -#define ACPI_MEM_ALLOCATE(a) acpi_ut_allocate((acpi_size)(a),_COMPONENT,_acpi_module_name,__LINE__) -#define ACPI_MEM_CALLOCATE(a) acpi_ut_callocate((acpi_size)(a), _COMPONENT,_acpi_module_name,__LINE__) +#define ACPI_MEM_ALLOCATE(a) acpi_ut_allocate((acpi_size)(a),_COMPONENT,_acpimodulename,__LINE__) +#define ACPI_MEM_CALLOCATE(a) acpi_ut_callocate((acpi_size)(a), _COMPONENT,_acpimodulename,__LINE__) #define ACPI_MEM_FREE(a) acpi_os_free(a) #define ACPI_MEM_TRACKING(a) @@ -718,9 +722,9 @@ /* Memory allocation */ -#define ACPI_MEM_ALLOCATE(a) acpi_ut_allocate_and_track((acpi_size)(a),_COMPONENT,_acpi_module_name,__LINE__) -#define ACPI_MEM_CALLOCATE(a) acpi_ut_callocate_and_track((acpi_size)(a), _COMPONENT,_acpi_module_name,__LINE__) -#define ACPI_MEM_FREE(a) acpi_ut_free_and_track(a,_COMPONENT,_acpi_module_name,__LINE__) +#define ACPI_MEM_ALLOCATE(a) acpi_ut_allocate_and_track((acpi_size)(a),_COMPONENT,_acpimodulename,__LINE__) +#define ACPI_MEM_CALLOCATE(a) acpi_ut_callocate_and_track((acpi_size)(a), _COMPONENT,_acpimodulename,__LINE__) +#define ACPI_MEM_FREE(a) acpi_ut_free_and_track(a,_COMPONENT,_acpimodulename,__LINE__) #define ACPI_MEM_TRACKING(a) a #endif /* ACPI_DBG_TRACK_ALLOCATIONS */ Index: linux-acpi-2.6/include/acpi/acpixf.h =================================================================== --- linux-acpi-2.6.orig/include/acpi/acpixf.h +++ linux-acpi-2.6/include/acpi/acpixf.h @@ -320,7 +320,7 @@ acpi_get_firmware_waking_vector(acpi_phy #endif acpi_status -acpi_get_sleep_type_data(u8 sleep_state, u8 * slp_typ_a, u8 * slp_typ_b); +acpi_get_sleep_type_data(u8 sleep_state, u8 * slp_typA, u8 * slp_typB); acpi_status acpi_enter_sleep_state_prep(u8 sleep_state); Index: linux-acpi-2.6/include/acpi/acresrc.h =================================================================== --- linux-acpi-2.6.orig/include/acpi/acresrc.h +++ linux-acpi-2.6/include/acpi/acresrc.h @@ -132,13 +132,13 @@ typedef const struct acpi_rsdump_info { /* Resource tables indexed by internal resource type */ -extern const u8 acpi_gbl_aml_resource_sizes[]; -extern struct acpi_rsconvert_info *acpi_gbl_set_resource_dispatch[]; +extern const u8 acpi_gbl_amlresourcesizes[]; +extern struct acpi_rsconvert_info *acpi_gbl_setresourcedispatch[]; /* Resource tables indexed by raw AML resource descriptor type */ -extern const u8 acpi_gbl_resource_struct_sizes[]; -extern struct acpi_rsconvert_info *acpi_gbl_get_resource_dispatch[]; +extern const u8 acpi_gbl_resourcestructsizes[]; +extern struct acpi_rsconvert_info *acpi_gbl_getresourcedispatch[]; struct acpi_vendor_walk_info { struct acpi_vendor_uuid *uuid; @@ -300,7 +300,7 @@ extern struct acpi_rsconvert_info acpi_r /* * rsinfo */ -extern struct acpi_rsdump_info *acpi_gbl_dump_resource_dispatch[]; +extern struct acpi_rsdump_info *acpi_gbl_dumpresourcedispatch[]; /* * rsdump Index: linux-acpi-2.6/include/acpi/actbl2.h =================================================================== --- linux-acpi-2.6.orig/include/acpi/actbl2.h +++ linux-acpi-2.6/include/acpi/actbl2.h @@ -115,7 +115,7 @@ struct acpi_generic_address { }; #define FADT_REV2_COMMON \ - u32 V1_firmware_ctrl; /* 32-bit physical address of FACS */ \ + u32 V1_firmwarectrl; /* 32-bit physical address of FACS */ \ u32 V1_dsdt; /* 32-bit physical address of DSDT */ \ u8 reserved1; /* System Interrupt Model isn't used in ACPI 2.0*/ \ u8 prefer_PM_profile; /* Conveys preferred power management profile to OSPM. */ \ @@ -125,14 +125,14 @@ struct acpi_generic_address { u8 acpi_disable; /* Value to write to smi_cmd to disable ACPI */ \ u8 S4bios_req; /* Value to write to SMI CMD to enter S4BIOS state */ \ u8 pstate_cnt; /* Processor performance state control*/ \ - u32 V1_pm1a_evt_blk; /* Port address of Power Mgt 1a acpi_event Reg Blk */ \ - u32 V1_pm1b_evt_blk; /* Port address of Power Mgt 1b acpi_event Reg Blk */ \ - u32 V1_pm1a_cnt_blk; /* Port address of Power Mgt 1a Control Reg Blk */ \ - u32 V1_pm1b_cnt_blk; /* Port address of Power Mgt 1b Control Reg Blk */ \ - u32 V1_pm2_cnt_blk; /* Port address of Power Mgt 2 Control Reg Blk */ \ - u32 V1_pm_tmr_blk; /* Port address of Power Mgt Timer Ctrl Reg Blk */ \ - u32 V1_gpe0_blk; /* Port addr of General Purpose acpi_event 0 Reg Blk */ \ - u32 V1_gpe1_blk; /* Port addr of General Purpose acpi_event 1 Reg Blk */ \ + u32 V1_pm1aevtblk; /* Port address of Power Mgt 1a acpi_event Reg Blk */ \ + u32 V1_pm1bevtblk; /* Port address of Power Mgt 1b acpi_event Reg Blk */ \ + u32 V1_pm1acntblk; /* Port address of Power Mgt 1a Control Reg Blk */ \ + u32 V1_pm1bcntblk; /* Port address of Power Mgt 1b Control Reg Blk */ \ + u32 V1_pm2cntblk; /* Port address of Power Mgt 2 Control Reg Blk */ \ + u32 V1_pmtmrblk; /* Port address of Power Mgt Timer Ctrl Reg Blk */ \ + u32 V1_gpe0blk; /* Port addr of General Purpose acpi_event 0 Reg Blk */ \ + u32 V1_gpe1blk; /* Port addr of General Purpose acpi_event 1 Reg Blk */ \ u8 pm1_evt_len; /* Byte length of ports at pm1_x_evt_blk */ \ u8 pm1_cnt_len; /* Byte length of ports at pm1_x_cnt_blk */ \ u8 pm2_cnt_len; /* Byte Length of ports at pm2_cnt_blk */ \ Index: linux-acpi-2.6/include/acpi/actypes.h =================================================================== --- linux-acpi-2.6.orig/include/acpi/actypes.h +++ linux-acpi-2.6/include/acpi/actypes.h @@ -154,7 +154,6 @@ typedef u64 acpi_physical_address; #define ACPI_MAX_PTR ACPI_UINT64_MAX #define ACPI_SIZE_MAX ACPI_UINT64_MAX -#define ALIGNED_ADDRESS_BOUNDARY 0x00000008 #define ACPI_USE_NATIVE_DIVIDE /* Has native 64-bit integer support */ /* @@ -195,8 +194,6 @@ typedef u64 acpi_physical_address; #define ACPI_MAX_PTR ACPI_UINT32_MAX #define ACPI_SIZE_MAX ACPI_UINT32_MAX -#define ALIGNED_ADDRESS_BOUNDARY 0x00000004 - /******************************************************************************* * * Types specific to 16-bit targets @@ -223,7 +220,6 @@ typedef char *acpi_physical_address; #define ACPI_MAX_PTR ACPI_UINT16_MAX #define ACPI_SIZE_MAX ACPI_UINT16_MAX -#define ALIGNED_ADDRESS_BOUNDARY 0x00000002 #define ACPI_USE_NATIVE_DIVIDE /* No 64-bit integers, ok to use native divide */ /* 64-bit integers cannot be supported */ @@ -284,7 +280,7 @@ typedef acpi_native_uint acpi_size; /* * Some compilers complain about unused variables. Sometimes we don't want to - * use all the variables (for example, _acpi_module_name). This allows us + * use all the variables (for example, _AcpiModuleName). This allows us * to to tell the compiler in a per-variable manner that a variable * is unused */ @@ -932,7 +928,7 @@ struct acpi_device_info { acpi_integer address; /* _ADR value if any */ struct acpi_device_id hardware_id; /* _HID value if any */ struct acpi_device_id unique_id; /* _UID value if any */ - u8 highest_dstates[4]; /* _sx_d values: 0xFF indicates not valid */ + u8 highest_dstates[4]; /* _SxD values: 0xFF indicates not valid */ struct acpi_compatible_id_list compatibility_id; /* List of _CIDs if any */ }; @@ -1297,12 +1293,6 @@ struct acpi_resource { #define ACPI_NEXT_RESOURCE(res) (struct acpi_resource *)((u8 *) res + res->length) -#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED -#define ACPI_ALIGN_RESOURCE_SIZE(length) (length) -#else -#define ACPI_ALIGN_RESOURCE_SIZE(length) ACPI_ROUND_UP_TO_NATIVE_WORD(length) -#endif - /* * END: of definitions for Resource Attributes */ Index: linux-acpi-2.6/include/acpi/acutils.h =================================================================== --- linux-acpi-2.6.orig/include/acpi/acutils.h +++ linux-acpi-2.6/include/acpi/acutils.h @@ -44,22 +44,22 @@ #ifndef _ACUTILS_H #define _ACUTILS_H -extern const u8 acpi_gbl_resource_aml_sizes[]; +extern const u8 acpi_gbl_resourceamlsizes[]; /* Strings used by the disassembler and debugger resource dump routines */ #if defined(ACPI_DISASSEMBLER) || defined (ACPI_DEBUGGER) extern const char *acpi_gbl_BMdecode[2]; -extern const char *acpi_gbl_config_decode[4]; -extern const char *acpi_gbl_consume_decode[2]; +extern const char *acpi_gbl_configdecode[4]; +extern const char *acpi_gbl_consumedecode[2]; extern const char *acpi_gbl_DECdecode[2]; extern const char *acpi_gbl_HEdecode[2]; -extern const char *acpi_gbl_io_decode[2]; +extern const char *acpi_gbl_iodecode[2]; extern const char *acpi_gbl_LLdecode[2]; -extern const char *acpi_gbl_max_decode[2]; +extern const char *acpi_gbl_maxdecode[2]; extern const char *acpi_gbl_MEMdecode[4]; -extern const char *acpi_gbl_min_decode[2]; +extern const char *acpi_gbl_mindecode[2]; extern const char *acpi_gbl_MTPdecode[4]; extern const char *acpi_gbl_RNGdecode[4]; extern const char *acpi_gbl_RWdecode[2]; @@ -377,8 +377,8 @@ union acpi_operand_object *acpi_ut_creat void *acpi_ut_allocate_object_desc_dbg(char *module_name, u32 line_number, u32 component_id); -#define acpi_ut_create_internal_object(t) acpi_ut_create_internal_object_dbg (_acpi_module_name,__LINE__,_COMPONENT,t) -#define acpi_ut_allocate_object_desc() acpi_ut_allocate_object_desc_dbg (_acpi_module_name,__LINE__,_COMPONENT) +#define acpi_ut_create_internal_object(t) acpi_ut_create_internal_object_dbg (_acpimodulename,__LINE__,_COMPONENT,t) +#define acpi_ut_allocate_object_desc() acpi_ut_allocate_object_desc_dbg (_acpimodulename,__LINE__,_COMPONENT) void acpi_ut_delete_object_desc(union acpi_operand_object *object); Index: linux-acpi-2.6/include/acpi/amlresrc.h =================================================================== --- linux-acpi-2.6.orig/include/acpi/amlresrc.h +++ linux-acpi-2.6/include/acpi/amlresrc.h @@ -74,7 +74,7 @@ #define ASL_RESNAME_TRANSLATION "_TRA" #define ASL_RESNAME_TRANSTYPE "_TRS" /* Sparse(1), Dense(0) */ #define ASL_RESNAME_TYPE "_TTP" /* Translation(1), Static (0) */ -#define ASL_RESNAME_XFERTYPE "_SIz" /* 8(0), 8_and16(1), 16(2) */ +#define Asl_RESNAME_XFERTYPE "_SIZ" /* 8(0), 8_and16(1), 16(2) */ /* Default sizes for "small" resource descriptors */ Index: linux-acpi-2.6/include/acpi/platform/acgcc.h =================================================================== --- linux-acpi-2.6.orig/include/acpi/platform/acgcc.h +++ linux-acpi-2.6/include/acpi/platform/acgcc.h @@ -56,7 +56,7 @@ /* * Some compilers complain about unused variables. Sometimes we don't want to - * use all the variables (for example, _acpi_module_name). This allows us + * use all the variables (for example, _AcpiModuleName). This allows us * to to tell the compiler warning in a per-variable manner that a variable * is unused. */ Index: linux-acpi-2.6/arch/i386/kernel/acpi/boot.c =================================================================== --- linux-acpi-2.6.orig/arch/i386/kernel/acpi/boot.c +++ linux-acpi-2.6/arch/i386/kernel/acpi/boot.c @@ -651,10 +651,10 @@ static int __init acpi_parse_fadt(unsign * corresponding X field is zero. */ if (!pmtmr_ioport) - pmtmr_ioport = fadt->V1_pm_tmr_blk; + pmtmr_ioport = fadt->V1_pmtmrblk; } else { /* FADT rev. 1 */ - pmtmr_ioport = fadt->V1_pm_tmr_blk; + pmtmr_ioport = fadt->V1_pmtmrblk; } if (pmtmr_ioport) printk(KERN_INFO PREFIX "PM-Timer IO Port: %#x\n", Index: linux-acpi-2.6/drivers/acpi/osl.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/osl.c +++ linux-acpi-2.6/drivers/acpi/osl.c @@ -996,7 +996,7 @@ static int __init acpi_osi_setup(char *s { if (str == NULL || *str == '\0') { printk(KERN_INFO PREFIX "_OSI method disabled\n"); - acpi_gbl_create_osi_method = FALSE; + acpi_gbl_createosimethod = FALSE; } else { /* TBD */ printk(KERN_ERR PREFIX "_OSI additional string ignored -- %s\n", @@ -1013,7 +1013,7 @@ static int __init acpi_serialize_setup(c { printk(KERN_INFO PREFIX "serialize enabled\n"); - acpi_gbl_all_methods_serialized = TRUE; + acpi_gbl_allmethodsserialized = TRUE; return 1; } @@ -1033,7 +1033,7 @@ static int __init acpi_wake_gpes_always_ { printk(KERN_INFO PREFIX "wake GPEs not disabled\n"); - acpi_gbl_leave_wake_gpes_disabled = FALSE; + acpi_gbl_leavewakegpesdisabled = FALSE; return 1; } Index: linux-acpi-2.6/drivers/acpi/bus.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/bus.c +++ linux-acpi-2.6/drivers/acpi/bus.c @@ -598,7 +598,7 @@ void __init acpi_early_init(void) /* enable workarounds, unless strict ACPI spec. compliance */ if (!acpi_strict) - acpi_gbl_enable_interpreter_slack = TRUE; + acpi_gbl_enableinterpreterslack = TRUE; status = acpi_initialize_subsystem(); if (ACPI_FAILURE(status)) { Index: linux-acpi-2.6/drivers/acpi/processor_core.c =================================================================== --- linux-acpi-2.6.orig/drivers/acpi/processor_core.c +++ linux-acpi-2.6/drivers/acpi/processor_core.c @@ -444,7 +444,7 @@ static int acpi_processor_get_info(struc * Check to see if we have bus mastering arbitration control. This * is required for proper C3 usage (to maintain cache coherency). */ - if (acpi_fadt.V1_pm2_cnt_blk && acpi_fadt.pm2_cnt_len) { + if (acpi_fadt.V1_pm2cntblk && acpi_fadt.pm2_cnt_len) { pr->flags.bm_control = 1; ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Bus mastering arbitration control present\n"));