Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 46379
b: refs/heads/master
c: d8c71b6
h: refs/heads/master
i:
  46377: 0dc39d8
  46375: bdc2016
v: v3
  • Loading branch information
Bob Moore authored and Len Brown committed Feb 3, 2007
1 parent 23093d5 commit 5d52c0c
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 60 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 73ca0fbcc25a6080db4136f55dbcd5fe7b33398f
refs/heads/master: d8c71b6d3b21cf21ad775e1cf6da95bf87bd5ad4
8 changes: 3 additions & 5 deletions trunk/drivers/acpi/events/evevent.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,7 @@ static acpi_status acpi_ev_fixed_event_initialize(void)
if (acpi_gbl_fixed_event_info[i].enable_register_id != 0xFF) {
status =
acpi_set_register(acpi_gbl_fixed_event_info[i].
enable_register_id, 0,
ACPI_MTX_LOCK);
enable_register_id, 0);
if (ACPI_FAILURE(status)) {
return (status);
}
Expand Down Expand Up @@ -291,16 +290,15 @@ static u32 acpi_ev_fixed_event_dispatch(u32 event)
/* Clear the status bit */

(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.
* 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].
enable_register_id, 0,
ACPI_MTX_DO_NOT_LOCK);
enable_register_id, 0);

ACPI_ERROR((AE_INFO,
"No installed handler for fixed event [%08X]",
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/acpi/events/evmisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ acpi_status acpi_ev_release_global_lock(void)
if (pending) {
status =
acpi_set_register(ACPI_BITREG_GLOBAL_LOCK_RELEASE,
1, ACPI_MTX_LOCK);
1);
}

ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
Expand Down
12 changes: 6 additions & 6 deletions trunk/drivers/acpi/events/evxfevnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ acpi_status acpi_enable_event(u32 event, u32 flags)
*/
status =
acpi_set_register(acpi_gbl_fixed_event_info[event].
enable_register_id, 1, ACPI_MTX_LOCK);
enable_register_id, 1);
if (ACPI_FAILURE(status)) {
return_ACPI_STATUS(status);
}
Expand All @@ -166,7 +166,7 @@ acpi_status acpi_enable_event(u32 event, u32 flags)

status =
acpi_get_register(acpi_gbl_fixed_event_info[event].
enable_register_id, &value, ACPI_MTX_LOCK);
enable_register_id, &value);
if (ACPI_FAILURE(status)) {
return_ACPI_STATUS(status);
}
Expand Down Expand Up @@ -356,14 +356,14 @@ acpi_status acpi_disable_event(u32 event, u32 flags)
*/
status =
acpi_set_register(acpi_gbl_fixed_event_info[event].
enable_register_id, 0, ACPI_MTX_LOCK);
enable_register_id, 0);
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);
enable_register_id, &value);
if (ACPI_FAILURE(status)) {
return_ACPI_STATUS(status);
}
Expand Down Expand Up @@ -409,7 +409,7 @@ acpi_status acpi_clear_event(u32 event)
*/
status =
acpi_set_register(acpi_gbl_fixed_event_info[event].
status_register_id, 1, ACPI_MTX_LOCK);
status_register_id, 1);

return_ACPI_STATUS(status);
}
Expand Down Expand Up @@ -498,7 +498,7 @@ acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status)

status =
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);
}
Expand Down
3 changes: 1 addition & 2 deletions trunk/drivers/acpi/hardware/hwacpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,7 @@ u32 acpi_hw_get_mode(void)
return_UINT32(ACPI_SYS_MODE_ACPI);
}

status =
acpi_get_register(ACPI_BITREG_SCI_ENABLE, &value, ACPI_MTX_LOCK);
status = acpi_get_register(ACPI_BITREG_SCI_ENABLE, &value);
if (ACPI_FAILURE(status)) {
return_UINT32(ACPI_SYS_MODE_LEGACY);
}
Expand Down
18 changes: 5 additions & 13 deletions trunk/drivers/acpi/hardware/hwregs.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,15 @@ ACPI_MODULE_NAME("hwregs")
*
* 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
* 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_cpu_flags lock_flags = 0;
Expand Down Expand Up @@ -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
* 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
* returned is normalized to bit0 (is shifted all the way right)
*
* 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;
struct acpi_bit_register_info *bit_reg_info;
Expand Down Expand Up @@ -312,16 +307,13 @@ ACPI_EXPORT_SYMBOL(acpi_get_register)
* PARAMETERS: register_id - ID of ACPI bit_register to access
* Value - (only used on write) value to write to the
* Register, NOT pre-normalized to the bit pos
* Flags - Lock the hardware or not
*
* RETURN: Status
*
* 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;
struct acpi_bit_register_info *bit_reg_info;
Expand Down
22 changes: 8 additions & 14 deletions trunk/drivers/acpi/hardware/hwsleep.c
Original file line number Diff line number Diff line change
Expand Up @@ -277,15 +277,14 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state)

/* Clear wake status */

status =
acpi_set_register(ACPI_BITREG_WAKE_STATUS, 1, ACPI_MTX_DO_NOT_LOCK);
status = acpi_set_register(ACPI_BITREG_WAKE_STATUS, 1);
if (ACPI_FAILURE(status)) {
return_ACPI_STATUS(status);
}

/* 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)) {
return_ACPI_STATUS(status);
}
Expand Down Expand Up @@ -398,8 +397,7 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state)
/* Wait until we enter sleep state */

do {
status = acpi_get_register(ACPI_BITREG_WAKE_STATUS, &in_value,
ACPI_MTX_DO_NOT_LOCK);
status = acpi_get_register(ACPI_BITREG_WAKE_STATUS, &in_value);
if (ACPI_FAILURE(status)) {
return_ACPI_STATUS(status);
}
Expand Down Expand Up @@ -432,13 +430,12 @@ acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void)

ACPI_FUNCTION_TRACE(acpi_enter_sleep_state_s4bios);

status =
acpi_set_register(ACPI_BITREG_WAKE_STATUS, 1, ACPI_MTX_DO_NOT_LOCK);
status = acpi_set_register(ACPI_BITREG_WAKE_STATUS, 1);
if (ACPI_FAILURE(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)) {
return_ACPI_STATUS(status);
}
Expand All @@ -465,8 +462,7 @@ acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void)

do {
acpi_os_stall(1000);
status = acpi_get_register(ACPI_BITREG_WAKE_STATUS, &in_value,
ACPI_MTX_DO_NOT_LOCK);
status = acpi_get_register(ACPI_BITREG_WAKE_STATUS, &in_value);
if (ACPI_FAILURE(status)) {
return_ACPI_STATUS(status);
}
Expand Down Expand Up @@ -599,13 +595,11 @@ acpi_status acpi_leave_sleep_state(u8 sleep_state)

(void)
acpi_set_register(acpi_gbl_fixed_event_info
[ACPI_EVENT_POWER_BUTTON].enable_register_id, 1,
ACPI_MTX_DO_NOT_LOCK);
[ACPI_EVENT_POWER_BUTTON].enable_register_id, 1);

(void)
acpi_set_register(acpi_gbl_fixed_event_info
[ACPI_EVENT_POWER_BUTTON].status_register_id, 1,
ACPI_MTX_DO_NOT_LOCK);
[ACPI_EVENT_POWER_BUTTON].status_register_id, 1);

arg.integer.value = ACPI_SST_WORKING;
status = acpi_evaluate_object(NULL, METHOD_NAME__SST, &arg_list, NULL);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/acpi/pci_link.c
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ static int irqrouter_resume(struct sys_device *dev)


/* 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) {
link = list_entry(node, struct acpi_pci_link, node);
Expand Down
21 changes: 7 additions & 14 deletions trunk/drivers/acpi/processor_idle.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,7 @@ acpi_processor_power_activate(struct acpi_processor *pr,
case ACPI_STATE_C3:
/* Disable bus master reload */
if (new->type != ACPI_STATE_C3 && pr->flags.bm_check)
acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD, 0,
ACPI_MTX_DO_NOT_LOCK);
acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD, 0);
break;
}
}
Expand All @@ -198,8 +197,7 @@ acpi_processor_power_activate(struct acpi_processor *pr,
case ACPI_STATE_C3:
/* Enable bus master reload */
if (old->type != ACPI_STATE_C3 && pr->flags.bm_check)
acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD, 1,
ACPI_MTX_DO_NOT_LOCK);
acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD, 1);
break;
}

Expand Down Expand Up @@ -291,12 +289,10 @@ static void acpi_processor_idle(void)

pr->power.bm_activity <<= diff;

acpi_get_register(ACPI_BITREG_BUS_MASTER_STATUS,
&bm_status, ACPI_MTX_DO_NOT_LOCK);
acpi_get_register(ACPI_BITREG_BUS_MASTER_STATUS, &bm_status);
if (bm_status) {
pr->power.bm_activity |= 0x1;
acpi_set_register(ACPI_BITREG_BUS_MASTER_STATUS,
1, ACPI_MTX_DO_NOT_LOCK);
acpi_set_register(ACPI_BITREG_BUS_MASTER_STATUS, 1);
}
/*
* PIIX4 Erratum #18: Note that BM_STS doesn't always reflect
Expand Down Expand Up @@ -411,8 +407,7 @@ static void acpi_processor_idle(void)
* All CPUs are trying to go to C3
* Disable bus master arbitration
*/
acpi_set_register(ACPI_BITREG_ARB_DISABLE, 1,
ACPI_MTX_DO_NOT_LOCK);
acpi_set_register(ACPI_BITREG_ARB_DISABLE, 1);
}
} else {
/* SMP with no shared cache... Invalidate cache */
Expand All @@ -428,8 +423,7 @@ static void acpi_processor_idle(void)
if (pr->flags.bm_check) {
/* Enable bus master arbitration */
atomic_dec(&c3_cpu_count);
acpi_set_register(ACPI_BITREG_ARB_DISABLE, 0,
ACPI_MTX_DO_NOT_LOCK);
acpi_set_register(ACPI_BITREG_ARB_DISABLE, 0);
}

#ifdef CONFIG_GENERIC_TIME
Expand Down Expand Up @@ -890,8 +884,7 @@ static void acpi_processor_power_verify_c3(struct acpi_processor *pr,
" for C3 to be enabled on SMP systems\n"));
return;
}
acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD,
0, ACPI_MTX_DO_NOT_LOCK);
acpi_set_register(ACPI_BITREG_BUS_MASTER_RLD, 0);
}

/*
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/acpi/achware.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ acpi_hw_low_level_read(u32 width,
acpi_status
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
Expand Down
4 changes: 2 additions & 2 deletions trunk/include/acpi/acpixf.h
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,9 @@ acpi_resource_to_address64(struct acpi_resource *resource,
/*
* 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_set_firmware_waking_vector(acpi_physical_address physical_address);
Expand Down

0 comments on commit 5d52c0c

Please sign in to comment.