ACPICA: Remove obsolete Flags parameter.
authorBob Moore <robert.moore@intel.com>
Fri, 2 Feb 2007 16:48:21 +0000 (19:48 +0300)
committerLen Brown <len.brown@intel.com>
Sat, 3 Feb 2007 02:14:26 +0000 (21:14 -0500)
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: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/events/evevent.c
drivers/acpi/events/evmisc.c
drivers/acpi/events/evxfevnt.c
drivers/acpi/hardware/hwacpi.c
drivers/acpi/hardware/hwregs.c
drivers/acpi/hardware/hwsleep.c
drivers/acpi/pci_link.c
drivers/acpi/processor_idle.c
include/acpi/achware.h
include/acpi/acpixf.h

index 6b4bc99b1c2c651a2bcc562561a77eec6d034067..f09d1aa82edb139c336f632a406496e07e38732b 100644 (file)
@@ -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);
                        }
@@ -291,7 +290,7 @@ 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.
@@ -299,8 +298,7 @@ static u32 acpi_ev_fixed_event_dispatch(u32 event)
         */
        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]",
index 21449f36b5f8d8d751228a57924c6db05b790238..3bacede53503fe29ac8f22a1d2f37bfa4a12a91f 100644 (file)
@@ -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,
index 91e5f5b53a97d029e6546f953265b7fb2b93057d..a3d148e4d39f381a2625ade191fd276eae54d107 100644 (file)
@@ -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);
        }
@@ -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);
        }
@@ -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);
        }
@@ -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);
 }
@@ -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);
 }
index 9c7df711c18dce0d7d06d637257f124dd3e17db3..dbcc4c0d037c7cc5aa4bd0a611a790c0c1c0027c 100644 (file)
@@ -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);
        }
index 9fe7adf21f8b2e63ff5da43a097c3458274e62a3..716e4aeca1e1d0d00966e7a2b125afe9e14c8b6e 100644 (file)
@@ -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;
@@ -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;
@@ -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;
index 6faa76bdc3d51cb769035aa8ef01f7a672c45cec..7c9645129210657ac5cc192312bbdaa6d7f0f5d0 100644 (file)
@@ -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);
        }
@@ -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);
                }
@@ -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);
        }
@@ -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);
                }
@@ -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);
index 481e633bbf41b33c16b6c7def7ff16e8252592ea..662e4299743d553a865da467ee40b201393981dc 100644 (file)
@@ -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);
index 9fa3d3965bb38e515923f2c7dedd084c6aae3911..db21dda5837d76e400e7dd2213c904d1185a1dde 100644 (file)
@@ -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;
                }
        }
@@ -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;
        }
 
@@ -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
@@ -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  */
@@ -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
@@ -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);
        }
 
        /*
index f3e9a03d651ffa2e1375ace629235d8835f1a622..ae449f235cfe2635bd19cc390207fe844da9c77f 100644 (file)
@@ -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
index f4b0a81ee7cb561f2292b2a89f1d20d4003bbcb5..9c26400acc4d75f307a225ef6223697dd15d82b1 100644 (file)
@@ -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);