*** /tmp/kernel-source-2.4.18/drivers/acpi/events/evsci.c Sun May 26 17:21:01 2002 --- linux/drivers/acpi/events/evsci.c Sun May 26 16:26:03 2002 *************** *** 29,34 **** --- 29,35 ---- #include "achware.h" #include "acevents.h" + #include #define _COMPONENT ACPI_EVENTS ACPI_MODULE_NAME ("evsci") *************** *** 85,90 **** --- 86,116 ---- return_VALUE (interrupt_handled); } + static int + kacpid(void *unused) + { + struct task_struct *tsk = current; + int unhandled; + + daemonize(); + strcpy(tsk->comm, "kacpid"); + sigfillset(&tsk->blocked); + + for(;;) { + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(HZ); + #ifdef CONFIG_SOFTWARE_SUSPEND + if(current->flags & PF_FREEZE) + refrigerator(PF_IOTHREAD); + #endif + set_current_state(TASK_RUNNING); + unhandled = acpi_ev_fixed_event_detect(); + unhandled |= acpi_ev_gpe_detect(); + if(unhandled) + printk("Detected lost ACPI interrupt\n"); + } + } + /****************************************************************************** * *************** *** 102,114 **** acpi_ev_install_sci_handler (void) { u32 status = AE_OK; ACPI_FUNCTION_TRACE ("Ev_install_sci_handler"); ! status = acpi_os_install_interrupt_handler ((u32) acpi_gbl_FADT->sci_int, ! acpi_ev_sci_handler, NULL); return_ACPI_STATUS (status); } --- 128,145 ---- acpi_ev_install_sci_handler (void) { u32 status = AE_OK; + int rc; ACPI_FUNCTION_TRACE ("Ev_install_sci_handler"); ! status = ! acpi_os_install_interrupt_handler ((u32) acpi_gbl_FADT->sci_int, ! acpi_ev_sci_handler, NULL); ! rc = kernel_thread(kacpid, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGNAL); ! if(rc < 0) ! printk("kernel_thread(kacpid) failed\n"); return_ACPI_STATUS (status); }