status = acpi_hw_disable_all_gpes (ACPI_NOT_ISR); 
status = acpi_hw_disable_all_gpes (); 
acpi_leave_sleep_state (	u8                              sleep_state){	struct acpi_object_list         arg_list;	union acpi_object               arg;	acpi_status                     status;	struct acpi_bit_register_info   *sleep_type_reg_info;	struct acpi_bit_register_info   *sleep_enable_reg_info;	u32                             PM1Acontrol;	u32                             PM1Bcontrol;	ACPI_FUNCTION_TRACE ("acpi_leave_sleep_state");	/*	 * Set SLP_TYPE and SLP_EN to state S0.	 * This is unclear from the ACPI Spec, but it is required	 * by some machines.	 */	status = acpi_get_sleep_type_data (ACPI_STATE_S0,			  &acpi_gbl_sleep_type_a, &acpi_gbl_sleep_type_b);	if (ACPI_SUCCESS (status)) {		sleep_type_reg_info = acpi_hw_get_bit_register_info (ACPI_BITREG_SLEEP_TYPE_A);		sleep_enable_reg_info = acpi_hw_get_bit_register_info (ACPI_BITREG_SLEEP_ENABLE);		/* Get current value of PM1A control */		status = acpi_hw_register_read (ACPI_MTX_DO_NOT_LOCK,				 ACPI_REGISTER_PM1_CONTROL, &PM1Acontrol);		if (ACPI_SUCCESS (status)) {			/* Clear SLP_EN and SLP_TYP fields */			PM1Acontrol &= ~(sleep_type_reg_info->access_bit_mask |					   sleep_enable_reg_info->access_bit_mask);			PM1Bcontrol = PM1Acontrol;			/* Insert SLP_TYP bits */			PM1Acontrol |= (acpi_gbl_sleep_type_a << sleep_type_reg_info->bit_position);			PM1Bcontrol |= (acpi_gbl_sleep_type_b << sleep_type_reg_info->bit_position);			/* Just ignore any errors */			(void) acpi_hw_register_write (ACPI_MTX_DO_NOT_LOCK,					  ACPI_REGISTER_PM1A_CONTROL, PM1Acontrol);			(void) acpi_hw_register_write (ACPI_MTX_DO_NOT_LOCK,					  ACPI_REGISTER_PM1B_CONTROL, PM1Bcontrol);		}	}	/* Ensure enter_sleep_state_prep -> enter_sleep_state ordering */	acpi_gbl_sleep_type_a = ACPI_SLEEP_TYPE_INVALID;	/* Setup parameter object */	arg_list.count = 1;	arg_list.pointer = &arg;	arg.type = ACPI_TYPE_INTEGER;	/* Ignore any errors from these methods */	arg.integer.value = ACPI_SST_WAKING;	status = acpi_evaluate_object (NULL, METHOD_NAME__SST, &arg_list, NULL);	if (ACPI_FAILURE (status) && status != AE_NOT_FOUND) {		ACPI_REPORT_ERROR (("Method _SST failed, %s\n",			acpi_format_exception (status)));	}	arg.integer.value = sleep_state;	status = acpi_evaluate_object (NULL, METHOD_NAME__BFS, &arg_list, NULL);	if (ACPI_FAILURE (status) && status != AE_NOT_FOUND) {		ACPI_REPORT_ERROR (("Method _BFS failed, %s\n",			acpi_format_exception (status)));	}	status = acpi_evaluate_object (NULL, METHOD_NAME__WAK, &arg_list, NULL);	if (ACPI_FAILURE (status) && status != AE_NOT_FOUND) {		ACPI_REPORT_ERROR (("Method _WAK failed, %s\n",			acpi_format_exception (status)));	}	/* TBD: _WAK "sometimes" returns stuff - do we want to look at it? */	/*	 * Restore the GPEs:	 * 1) Disable/Clear all GPEs	 * 2) Enable all runtime GPEs	 */	status = acpi_hw_disable_all_gpes (ACPI_NOT_ISR);	if (ACPI_FAILURE (status)) {		return_ACPI_STATUS (status);	}	acpi_gbl_system_awake_and_running = TRUE;	status = acpi_hw_enable_all_runtime_gpes (ACPI_NOT_ISR);	if (ACPI_FAILURE (status)) {		return_ACPI_STATUS (status);	}	/* 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);	(void) acpi_set_register(			acpi_gbl_fixed_event_info[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);	if (ACPI_FAILURE (status) && status != AE_NOT_FOUND) {		ACPI_REPORT_ERROR (("Method _SST failed, %s\n",			acpi_format_exception (status)));	}	return_ACPI_STATUS (status);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/73459f73e5d1602c59ebec114fc45185521353c1/hwsleep.c/clean/drivers/acpi/hardware/hwsleep.c