On 20/05/18(Sun) 11:28, Mark Kettenis wrote: > > Date: Sun, 20 May 2018 10:44:49 +0200 > > From: Martin Pieuchot <m...@openbsd.org> > > > > On 19/05/18(Sat) 21:39, Mark Kettenis wrote: > > > Without the wakeup, the event doesn't get scheduled until some other > > > event wakes up the acpi thread. On one of my machines the gpio event > > > reads a status byte over i2c in repsonse of a gpio event. Without the > > > wakeup that status byte has often been cleared/overwritten by the time > > > the event gets scheduled. > > > > > > ok? > > > > ok mpi@ > > > > Then why not make acpi_addtask() call acpi_wakeup() if it could enqueue > > a task? This is how task_add(9) work. Most of the code paths already > > use the pattern your suggesting. > > I was thinking the same thing. It seems acpi_interrupt() schedules a > couple of tasks and does a single wakeup. There are also some > scheduling sleep-related tasks that don't have an acpi_wakeup() > associated with them. I don't see a fundamental reason why we can't > do this though. But maybe I'm missing something?
I don't see any reason either.