[PATCH] kill mutex in lis
werner at openmoko.org
Sat Oct 11 19:50:36 CEST 2008
Sean McNeil wrote:
> This brings up a question I have about the original changes: why
> convert the mutex to a spin lock? What is the benefit?
This was an attempt to solve the problem of trying to grab a mutex
while interrupts were turned off. There seem to be two correct ways
to do all this:
- either use mutexes and a work queue (or equivalent), which was how
the driver worked in the old days, or
- use spinlocks or similar (*) and take control of handling the low-level
SPI operations, so that they don't sleep. This is what Andy's
(*) Tasklets may actually be a good choice here, since they're pretty
efficient and allow the "hard" interrupt handler to return quickly.
More information about the openmoko-kernel