Commit d8c71b6d authored by Bob Moore's avatar Bob Moore Committed by Len Brown

ACPICA: Remove obsolete Flags parameter.

Remove flags parameter for acpi_{get,set}_register().
It is no longer necessary now that these functions use a
spinlock for mutual exclusion.
Signed-off-by: default avatarAlexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 73ca0fbc
...@@ -204,8 +204,7 @@ static acpi_status acpi_ev_fixed_event_initialize(void) ...@@ -204,8 +204,7 @@ static acpi_status acpi_ev_fixed_event_initialize(void)
if (acpi_gbl_fixed_event_info[i].enable_register_id != 0xFF) { if (acpi_gbl_fixed_event_info[i].enable_register_id != 0xFF) {
status = status =
acpi_set_register(acpi_gbl_fixed_event_info[i]. acpi_set_register(acpi_gbl_fixed_event_info[i].
enable_register_id, 0, enable_register_id, 0);
ACPI_MTX_LOCK);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
return (status); return (status);
} }
...@@ -291,7 +290,7 @@ static u32 acpi_ev_fixed_event_dispatch(u32 event) ...@@ -291,7 +290,7 @@ static u32 acpi_ev_fixed_event_dispatch(u32 event)
/* Clear the status bit */ /* Clear the status bit */
(void)acpi_set_register(acpi_gbl_fixed_event_info[event]. (void)acpi_set_register(acpi_gbl_fixed_event_info[event].
status_register_id, 1, ACPI_MTX_DO_NOT_LOCK); status_register_id, 1);
/* /*
* Make sure we've got a handler. If not, report an error. * Make sure we've got a handler. If not, report an error.
...@@ -299,8 +298,7 @@ static u32 acpi_ev_fixed_event_dispatch(u32 event) ...@@ -299,8 +298,7 @@ static u32 acpi_ev_fixed_event_dispatch(u32 event)
*/ */
if (NULL == acpi_gbl_fixed_event_handlers[event].handler) { if (NULL == acpi_gbl_fixed_event_handlers[event].handler) {
(void)acpi_set_register(acpi_gbl_fixed_event_info[event]. (void)acpi_set_register(acpi_gbl_fixed_event_info[event].
enable_register_id, 0, enable_register_id, 0);
ACPI_MTX_DO_NOT_LOCK);
ACPI_ERROR((AE_INFO, ACPI_ERROR((AE_INFO,
"No installed handler for fixed event [%08X]", "No installed handler for fixed event [%08X]",
......
...@@ -493,7 +493,7 @@ acpi_status acpi_ev_release_global_lock(void) ...@@ -493,7 +493,7 @@ acpi_status acpi_ev_release_global_lock(void)
if (pending) { if (pending) {
status = status =
acpi_set_register(ACPI_BITREG_GLOBAL_LOCK_RELEASE, acpi_set_register(ACPI_BITREG_GLOBAL_LOCK_RELEASE,
1, ACPI_MTX_LOCK); 1);
} }
ACPI_DEBUG_PRINT((ACPI_DB_EXEC, ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
......
...@@ -157,7 +157,7 @@ acpi_status acpi_enable_event(u32 event, u32 flags) ...@@ -157,7 +157,7 @@ acpi_status acpi_enable_event(u32 event, u32 flags)
*/ */
status = status =
acpi_set_register(acpi_gbl_fixed_event_info[event]. acpi_set_register(acpi_gbl_fixed_event_info[event].
enable_register_id, 1, ACPI_MTX_LOCK); enable_register_id, 1);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
...@@ -166,7 +166,7 @@ acpi_status acpi_enable_event(u32 event, u32 flags) ...@@ -166,7 +166,7 @@ acpi_status acpi_enable_event(u32 event, u32 flags)
status = status =
acpi_get_register(acpi_gbl_fixed_event_info[event]. acpi_get_register(acpi_gbl_fixed_event_info[event].
enable_register_id, &value, ACPI_MTX_LOCK); enable_register_id, &value);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
...@@ -356,14 +356,14 @@ acpi_status acpi_disable_event(u32 event, u32 flags) ...@@ -356,14 +356,14 @@ acpi_status acpi_disable_event(u32 event, u32 flags)
*/ */
status = status =
acpi_set_register(acpi_gbl_fixed_event_info[event]. acpi_set_register(acpi_gbl_fixed_event_info[event].
enable_register_id, 0, ACPI_MTX_LOCK); enable_register_id, 0);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
status = status =
acpi_get_register(acpi_gbl_fixed_event_info[event]. acpi_get_register(acpi_gbl_fixed_event_info[event].
enable_register_id, &value, ACPI_MTX_LOCK); enable_register_id, &value);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
...@@ -409,7 +409,7 @@ acpi_status acpi_clear_event(u32 event) ...@@ -409,7 +409,7 @@ acpi_status acpi_clear_event(u32 event)
*/ */
status = status =
acpi_set_register(acpi_gbl_fixed_event_info[event]. acpi_set_register(acpi_gbl_fixed_event_info[event].
status_register_id, 1, ACPI_MTX_LOCK); status_register_id, 1);
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
...@@ -498,7 +498,7 @@ acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status) ...@@ -498,7 +498,7 @@ acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status)
status = status =
acpi_get_register(acpi_gbl_fixed_event_info[event]. acpi_get_register(acpi_gbl_fixed_event_info[event].
status_register_id, event_status, ACPI_MTX_LOCK); status_register_id, event_status);
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
......
...@@ -171,8 +171,7 @@ u32 acpi_hw_get_mode(void) ...@@ -171,8 +171,7 @@ u32 acpi_hw_get_mode(void)
return_UINT32(ACPI_SYS_MODE_ACPI); return_UINT32(ACPI_SYS_MODE_ACPI);
} }
status = status = acpi_get_register(ACPI_BITREG_SCI_ENABLE, &value);
acpi_get_register(ACPI_BITREG_SCI_ENABLE, &value, ACPI_MTX_LOCK);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
return_UINT32(ACPI_SYS_MODE_LEGACY); return_UINT32(ACPI_SYS_MODE_LEGACY);
} }
......
...@@ -54,17 +54,15 @@ ACPI_MODULE_NAME("hwregs") ...@@ -54,17 +54,15 @@ ACPI_MODULE_NAME("hwregs")
* *
* FUNCTION: acpi_hw_clear_acpi_status * FUNCTION: acpi_hw_clear_acpi_status
* *
* PARAMETERS: Flags - Lock the hardware or not * PARAMETERS: None
* *
* RETURN: none * RETURN: None
* *
* DESCRIPTION: Clears all fixed and general purpose status bits * DESCRIPTION: Clears all fixed and general purpose status bits
* THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED
* *
* NOTE: TBD: Flags parameter is obsolete, to be removed
*
******************************************************************************/ ******************************************************************************/
acpi_status acpi_hw_clear_acpi_status(u32 flags) acpi_status acpi_hw_clear_acpi_status(void)
{ {
acpi_status status; acpi_status status;
acpi_cpu_flags lock_flags = 0; acpi_cpu_flags lock_flags = 0;
...@@ -253,18 +251,15 @@ struct acpi_bit_register_info *acpi_hw_get_bit_register_info(u32 register_id) ...@@ -253,18 +251,15 @@ struct acpi_bit_register_info *acpi_hw_get_bit_register_info(u32 register_id)
* *
* PARAMETERS: register_id - ID of ACPI bit_register to access * PARAMETERS: register_id - ID of ACPI bit_register to access
* return_value - Value that was read from the register * return_value - Value that was read from the register
* Flags - Lock the hardware or not
* *
* RETURN: Status and the value read from specified Register. Value * RETURN: Status and the value read from specified Register. Value
* returned is normalized to bit0 (is shifted all the way right) * returned is normalized to bit0 (is shifted all the way right)
* *
* DESCRIPTION: ACPI bit_register read function. * DESCRIPTION: ACPI bit_register read function.
* *
* NOTE: TBD: Flags parameter is obsolete, to be removed
*
******************************************************************************/ ******************************************************************************/
acpi_status acpi_get_register(u32 register_id, u32 * return_value, u32 flags) acpi_status acpi_get_register(u32 register_id, u32 * return_value)
{ {
u32 register_value = 0; u32 register_value = 0;
struct acpi_bit_register_info *bit_reg_info; struct acpi_bit_register_info *bit_reg_info;
...@@ -312,16 +307,13 @@ ACPI_EXPORT_SYMBOL(acpi_get_register) ...@@ -312,16 +307,13 @@ ACPI_EXPORT_SYMBOL(acpi_get_register)
* PARAMETERS: register_id - ID of ACPI bit_register to access * PARAMETERS: register_id - ID of ACPI bit_register to access
* Value - (only used on write) value to write to the * Value - (only used on write) value to write to the
* Register, NOT pre-normalized to the bit pos * Register, NOT pre-normalized to the bit pos
* Flags - Lock the hardware or not
* *
* RETURN: Status * RETURN: Status
* *
* DESCRIPTION: ACPI Bit Register write function. * DESCRIPTION: ACPI Bit Register write function.
* *
* NOTE: TBD: Flags parameter is obsolete, to be removed
*
******************************************************************************/ ******************************************************************************/
acpi_status acpi_set_register(u32 register_id, u32 value, u32 flags) acpi_status acpi_set_register(u32 register_id, u32 value)
{ {
u32 register_value = 0; u32 register_value = 0;
struct acpi_bit_register_info *bit_reg_info; struct acpi_bit_register_info *bit_reg_info;
......
...@@ -277,15 +277,14 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state) ...@@ -277,15 +277,14 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state)
/* Clear wake status */ /* Clear wake status */
status = status = acpi_set_register(ACPI_BITREG_WAKE_STATUS, 1);
acpi_set_register(ACPI_BITREG_WAKE_STATUS, 1, ACPI_MTX_DO_NOT_LOCK);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
/* Clear all fixed and general purpose status bits */ /* Clear all fixed and general purpose status bits */
status = acpi_hw_clear_acpi_status(ACPI_MTX_DO_NOT_LOCK); status = acpi_hw_clear_acpi_status();
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
...@@ -398,8 +397,7 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state) ...@@ -398,8 +397,7 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state)
/* Wait until we enter sleep state */ /* Wait until we enter sleep state */
do { do {
status = acpi_get_register(ACPI_BITREG_WAKE_STATUS, &in_value, status = acpi_get_register(ACPI_BITREG_WAKE_STATUS, &in_value);
ACPI_MTX_DO_NOT_LOCK);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
...@@ -432,13 +430,12 @@ acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void) ...@@ -432,13 +430,12 @@ acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void)
ACPI_FUNCTION_TRACE(acpi_enter_sleep_state_s4bios); ACPI_FUNCTION_TRACE(acpi_enter_sleep_state_s4bios);
status = status = acpi_set_register(ACPI_BITREG_WAKE_STATUS, 1);
acpi_set_register(ACPI_BITREG_WAKE_STATUS, 1, ACPI_MTX_DO_NOT_LOCK);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
status = acpi_hw_clear_acpi_status(ACPI_MTX_DO_NOT_LOCK); status = acpi_hw_clear_acpi_status();
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
...@@ -465,8 +462,7 @@ acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void) ...@@ -465,8 +462,7 @@ acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void)
do { do {
acpi_os_stall(1000); acpi_os_stall(1000);
status = acpi_get_register(ACPI_BITREG_WAKE_STATUS, &in_value, status = acpi_get_register(ACPI_BITREG_WAKE_STATUS, &in_value);
ACPI_MTX_DO_NOT_LOCK);
if (ACPI_FAILURE(status)) { if (ACPI_FAILURE(status)) {
return_ACPI_STATUS(status); return_ACPI_STATUS(status);
} }
...@@ -599,13 +595,11 @@ acpi_status acpi_leave_sleep_state(u8 sleep_state) ...@@ -599,13 +595,11 @@ acpi_status acpi_leave_sleep_state(u8 sleep_state)
(void) (void)
acpi_set_register(acpi_gbl_fixed_event_info acpi_set_register(acpi_gbl_fixed_event_info
[ACPI_EVENT_POWER_BUTTON].enable_register_id, 1, [ACPI_EVENT_POWER_BUTTON].enable_register_id, 1);
ACPI_MTX_DO_NOT_LOCK);
(void) (void)
acpi_set_register(acpi_gbl_fixed_event_info acpi_set_register(acpi_gbl_fixed_event_info
[ACPI_EVENT_POWER_BUTTON].status_register_id, 1, [ACPI_EVENT_POWER_BUTTON].status_register_id, 1);
ACPI_MTX_DO_NOT_LOCK);
arg.integer.value = ACPI_SST_WORKING; arg.integer.value = ACPI_SST_WORKING;
status = acpi_evaluate_object(NULL, METHOD_NAME__SST, &arg_list, NULL); status = acpi_evaluate_object(NULL, METHOD_NAME__SST, &arg_list, NULL);
......
...@@ -785,7 +785,7 @@ static int irqrouter_resume(struct sys_device *dev) ...@@ -785,7 +785,7 @@ static int irqrouter_resume(struct sys_device *dev)
/* Make sure SCI is enabled again (Apple firmware bug?) */ /* Make sure SCI is enabled again (Apple firmware bug?) */
acpi_set_register(ACPI_BITREG_SCI_ENABLE, 1, ACPI_MTX_DO_NOT_LOCK); acpi_set_register(ACPI_BITREG_SCI_ENABLE, 1);
list_for_each(node, &acpi_link.entries) { list_for_each(node, &acpi_link.entries) {
link = list_entry(node, struct acpi_pci_link, node); link = list_entry(node, struct acpi_pci_link, node);
......
...@@ -187,8 +187,7 @@ acpi_processor_power_activate(struct acpi_processor *pr, ...@@ -187,8 +187,7 @@ acpi_processor_power_activate(struct acpi_processor *pr,
case ACPI_STATE_C3: case ACPI_STATE_C3:
/* Disable bus master reload */ /* Disable bus master reload */
if (new->type != ACPI_STATE_C3 && pr->flags.bm_check) if (new->type != ACPI_STATE_C3 && pr->flags.bm_check)
acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD, 0, acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD, 0);
ACPI_MTX_DO_NOT_LOCK);
break; break;
} }
} }
...@@ -198,8 +197,7 @@ acpi_processor_power_activate(struct acpi_processor *pr, ...@@ -198,8 +197,7 @@ acpi_processor_power_activate(struct acpi_processor *pr,
case ACPI_STATE_C3: case ACPI_STATE_C3:
/* Enable bus master reload */ /* Enable bus master reload */
if (old->type != ACPI_STATE_C3 && pr->flags.bm_check) if (old->type != ACPI_STATE_C3 && pr->flags.bm_check)
acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD, 1, acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD, 1);
ACPI_MTX_DO_NOT_LOCK);
break; break;
} }
...@@ -291,12 +289,10 @@ static void acpi_processor_idle(void) ...@@ -291,12 +289,10 @@ static void acpi_processor_idle(void)
pr->power.bm_activity <<= diff; pr->power.bm_activity <<= diff;
acpi_get_register(ACPI_BITREG_BUS_MASTER_STATUS, acpi_get_register(ACPI_BITREG_BUS_MASTER_STATUS, &bm_status);
&bm_status, ACPI_MTX_DO_NOT_LOCK);
if (bm_status) { if (bm_status) {
pr->power.bm_activity |= 0x1; pr->power.bm_activity |= 0x1;
acpi_set_register(ACPI_BITREG_BUS_MASTER_STATUS, acpi_set_register(ACPI_BITREG_BUS_MASTER_STATUS, 1);
1, ACPI_MTX_DO_NOT_LOCK);
} }
/* /*
* PIIX4 Erratum #18: Note that BM_STS doesn't always reflect * PIIX4 Erratum #18: Note that BM_STS doesn't always reflect
...@@ -411,8 +407,7 @@ static void acpi_processor_idle(void) ...@@ -411,8 +407,7 @@ static void acpi_processor_idle(void)
* All CPUs are trying to go to C3 * All CPUs are trying to go to C3
* Disable bus master arbitration * Disable bus master arbitration
*/ */
acpi_set_register(ACPI_BITREG_ARB_DISABLE, 1, acpi_set_register(ACPI_BITREG_ARB_DISABLE, 1);
ACPI_MTX_DO_NOT_LOCK);
} }
} else { } else {
/* SMP with no shared cache... Invalidate cache */ /* SMP with no shared cache... Invalidate cache */
...@@ -428,8 +423,7 @@ static void acpi_processor_idle(void) ...@@ -428,8 +423,7 @@ static void acpi_processor_idle(void)
if (pr->flags.bm_check) { if (pr->flags.bm_check) {
/* Enable bus master arbitration */ /* Enable bus master arbitration */
atomic_dec(&c3_cpu_count); atomic_dec(&c3_cpu_count);
acpi_set_register(ACPI_BITREG_ARB_DISABLE, 0, acpi_set_register(ACPI_BITREG_ARB_DISABLE, 0);
ACPI_MTX_DO_NOT_LOCK);
} }
#ifdef CONFIG_GENERIC_TIME #ifdef CONFIG_GENERIC_TIME
...@@ -890,8 +884,7 @@ static void acpi_processor_power_verify_c3(struct acpi_processor *pr, ...@@ -890,8 +884,7 @@ static void acpi_processor_power_verify_c3(struct acpi_processor *pr,
" for C3 to be enabled on SMP systems\n")); " for C3 to be enabled on SMP systems\n"));
return; return;
} }
acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD, acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD, 0);
0, ACPI_MTX_DO_NOT_LOCK);
} }
/* /*
......
...@@ -82,7 +82,7 @@ acpi_hw_low_level_read(u32 width, ...@@ -82,7 +82,7 @@ acpi_hw_low_level_read(u32 width,
acpi_status acpi_status
acpi_hw_low_level_write(u32 width, u32 value, struct acpi_generic_address *reg); acpi_hw_low_level_write(u32 width, u32 value, struct acpi_generic_address *reg);
acpi_status acpi_hw_clear_acpi_status(u32 flags); acpi_status acpi_hw_clear_acpi_status(void);
/* /*
* hwgpe - GPE support * hwgpe - GPE support
......
...@@ -312,9 +312,9 @@ acpi_resource_to_address64(struct acpi_resource *resource, ...@@ -312,9 +312,9 @@ acpi_resource_to_address64(struct acpi_resource *resource,
/* /*
* Hardware (ACPI device) interfaces * Hardware (ACPI device) interfaces
*/ */
acpi_status acpi_get_register(u32 register_id, u32 * return_value, u32 flags); acpi_status acpi_get_register(u32 register_id, u32 * return_value);
acpi_status acpi_set_register(u32 register_id, u32 value, u32 flags); acpi_status acpi_set_register(u32 register_id, u32 value);
acpi_status acpi_status
acpi_set_firmware_waking_vector(acpi_physical_address physical_address); acpi_set_firmware_waking_vector(acpi_physical_address physical_address);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment