Exemplo n.º 1
0
ACPI_STATUS
acpi_ev_remove_sci_handler (void)
{
#if 0
	/* TBD:[Investigate] Figure this out!!  Disable all events first ???  */

	if (original_fixed_enable_bit_status ^ 1 << acpi_event_index (TMR_FIXED_EVENT)) {
		acpi_event_disable_event (TMR_FIXED_EVENT);
	}

	if (original_fixed_enable_bit_status ^ 1 << acpi_event_index (GBL_FIXED_EVENT)) {
		acpi_event_disable_event (GBL_FIXED_EVENT);
	}

	if (original_fixed_enable_bit_status ^ 1 << acpi_event_index (PWR_BTN_FIXED_EVENT)) {
		acpi_event_disable_event (PWR_BTN_FIXED_EVENT);
	}

	if (original_fixed_enable_bit_status ^ 1 << acpi_event_index (SLP_BTN_FIXED_EVENT)) {
		acpi_event_disable_event (SLP_BTN_FIXED_EVENT);
	}

	if (original_fixed_enable_bit_status ^ 1 << acpi_event_index (RTC_FIXED_EVENT)) {
		acpi_event_disable_event (RTC_FIXED_EVENT);
	}

	original_fixed_enable_bit_status = 0;

#endif

	acpi_os_remove_interrupt_handler ((u32) acpi_gbl_FADT->sci_int,
			   acpi_ev_sci_handler);

	return (AE_OK);
}
acpi_status
acpi_os_terminate(void)
{
    if (acpi_irq_handler) {
        acpi_os_remove_interrupt_handler(acpi_irq_irq,
                                         acpi_irq_handler);
    }

    return AE_OK;
}
Exemplo n.º 3
0
acpi_status acpi_os_terminate(void)
{
	if (acpi_irq_handler) {
		acpi_os_remove_interrupt_handler(acpi_irq_irq,
						 acpi_irq_handler);
	}

	destroy_workqueue(kacpid_wq);

	return AE_OK;
}
Exemplo n.º 4
0
acpi_status acpi_ev_remove_sci_handler(void)
{
	acpi_status status;

	ACPI_FUNCTION_TRACE("ev_remove_sci_handler");

	/* Just let the OS remove the handler and disable the level */

	status = acpi_os_remove_interrupt_handler((u32) acpi_gbl_FADT->sci_int,
						  acpi_ev_sci_xrupt_handler);

	return_ACPI_STATUS(status);
}
Exemplo n.º 5
0
acpi_status acpi_ev_remove_sci_handler(void)
{
	acpi_status status;

	ACPI_FUNCTION_TRACE(ev_remove_sci_handler);

	/*                                                          */

	status =
	    acpi_os_remove_interrupt_handler((u32) acpi_gbl_FADT.sci_interrupt,
					     acpi_ev_sci_xrupt_handler);

	return_ACPI_STATUS(status);
}
Exemplo n.º 6
0
static acpi_status
acpi_ev_delete_gpe_xrupt(struct acpi_gpe_xrupt_info *gpe_xrupt)
{
    acpi_status status;
    acpi_cpu_flags flags;

    ACPI_FUNCTION_TRACE(ev_delete_gpe_xrupt);

    /* We never want to remove the SCI interrupt handler */

    if (gpe_xrupt->interrupt_number == acpi_gbl_FADT.sci_interrupt) {
        gpe_xrupt->gpe_block_list_head = NULL;
        return_ACPI_STATUS(AE_OK);
    }

    /* Disable this interrupt */

    status =
        acpi_os_remove_interrupt_handler(gpe_xrupt->interrupt_number,
                         acpi_ev_gpe_xrupt_handler);
    if (ACPI_FAILURE(status)) {
        return_ACPI_STATUS(status);
    }

    /* Unlink the interrupt block with lock */

    flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock);
    if (gpe_xrupt->previous) {
        gpe_xrupt->previous->next = gpe_xrupt->next;
    } else {
        /* No previous, update list head */

        acpi_gbl_gpe_xrupt_list_head = gpe_xrupt->next;
    }

    if (gpe_xrupt->next) {
        gpe_xrupt->next->previous = gpe_xrupt->previous;
    }
    acpi_os_release_lock(acpi_gbl_gpe_lock, flags);

    /* Free the block */

    ACPI_FREE(gpe_xrupt);
    return_ACPI_STATUS(AE_OK);
}
Exemplo n.º 7
0
acpi_status acpi_os_terminate(void)
{
	if (acpi_irq_handler) {
		acpi_os_remove_interrupt_handler(acpi_gbl_FADT.sci_interrupt,
						 acpi_irq_handler);
	}

	acpi_os_unmap_generic_address(&acpi_gbl_FADT.xgpe1_block);
	acpi_os_unmap_generic_address(&acpi_gbl_FADT.xgpe0_block);
	acpi_os_unmap_generic_address(&acpi_gbl_FADT.xpm1b_event_block);
	acpi_os_unmap_generic_address(&acpi_gbl_FADT.xpm1a_event_block);

	destroy_workqueue(kacpid_wq);
	destroy_workqueue(kacpi_notify_wq);
	destroy_workqueue(kacpi_hotplug_wq);

	return AE_OK;
}
acpi_status acpi_ev_delete_gpe_xrupt(struct acpi_gpe_xrupt_info *gpe_xrupt)
{
	acpi_status status;
	acpi_cpu_flags flags;

	ACPI_FUNCTION_TRACE(ev_delete_gpe_xrupt);

	

	if (gpe_xrupt->interrupt_number == acpi_gbl_FADT.sci_interrupt) {
		gpe_xrupt->gpe_block_list_head = NULL;
		return_ACPI_STATUS(AE_OK);
	}

	

	status =
	    acpi_os_remove_interrupt_handler(gpe_xrupt->interrupt_number,
					     acpi_ev_gpe_xrupt_handler);
	if (ACPI_FAILURE(status)) {
		return_ACPI_STATUS(status);
	}

	

	flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock);
	if (gpe_xrupt->previous) {
		gpe_xrupt->previous->next = gpe_xrupt->next;
	} else {
		

		acpi_gbl_gpe_xrupt_list_head = gpe_xrupt->next;
	}

	if (gpe_xrupt->next) {
		gpe_xrupt->next->previous = gpe_xrupt->previous;
	}
	acpi_os_release_lock(acpi_gbl_gpe_lock, flags);

	

	ACPI_FREE(gpe_xrupt);
	return_ACPI_STATUS(AE_OK);
}
Exemplo n.º 9
0
static acpi_status
acpi_ev_delete_gpe_xrupt (
	struct acpi_gpe_xrupt_info      *gpe_xrupt)
{
	acpi_status                     status;


	ACPI_FUNCTION_TRACE ("ev_delete_gpe_xrupt");


	/* We never want to remove the SCI interrupt handler */

	if (gpe_xrupt->interrupt_level == acpi_gbl_FADT->sci_int) {
		gpe_xrupt->gpe_block_list_head = NULL;
		return_ACPI_STATUS (AE_OK);
	}

	/* Disable this interrupt */

	status = acpi_os_remove_interrupt_handler (gpe_xrupt->interrupt_level,
			   acpi_ev_gpe_xrupt_handler);
	if (ACPI_FAILURE (status)) {
		return_ACPI_STATUS (status);
	}

	/* Unlink the interrupt block with lock */

	acpi_os_acquire_lock (acpi_gbl_gpe_lock, ACPI_NOT_ISR);
	if (gpe_xrupt->previous) {
		gpe_xrupt->previous->next = gpe_xrupt->next;
	}

	if (gpe_xrupt->next) {
		gpe_xrupt->next->previous = gpe_xrupt->previous;
	}
	acpi_os_release_lock (acpi_gbl_gpe_lock, ACPI_NOT_ISR);

	/* Free the block */

	ACPI_MEM_FREE (gpe_xrupt);
	return_ACPI_STATUS (AE_OK);
}