Re: [PATCH 1/3] acpi: add real mutex function calls

Daniel Walker
2008-07-21T13:59:37Z

On Mon, 2008-07-21 at 11:17 +0200, Andi Kleen wrote:
> Peter Zijlstra wrote:
> > On Mon, 2008-07-21 at 09:51 +0800, Zhao Yakui wrote:
> >> On Sat, 2008-07-19 at 11:16 -0700, Daniel Walker wrote:
> >>> Instead of re-using semaphores for the mutex operation, I've
> >>> added usage of the kernel mutex for the os mutex implementation.
> >>>
> >> What is the advantage that the kernel mutex is used for the ACPI mutex
> >> implementation instead of using semaphore?
> >> And it seems that too much ACPICA source code is touched.
> >
> > You get help from lockdep, and also our goal is to fully eradicate
> > semaphore usage.
>
> Issue is that ACPICA is shared with other OS source code and to replace
> a major interface like this would mean replacing it for everyone. It
> might end up with ACPICA just reimplementing a semaphore like wrapper if
> semaphores really go away, but I don't really see that coming anyways.

For other OS's the "completion" interface would just be connected to the
semaphore .. I could even remove my rename, but still connect ACPI
"semaphores" to completions . Of course you can always attach the mutex
interface to a semaphore, that's how it currently is in Linux ACPI.

Daniel