Skip to content
Commit 8aea7f82 authored by Davidlohr Bueso's avatar Davidlohr Bueso Committed by Sasha Levin
Browse files

drivers/hv: Replace binary semaphore with mutex



At a slight footprint cost (24 vs 32 bytes), mutexes are more optimal
than semaphores; it's also a nicer interface for mutual exclusion,
which is why they are encouraged over binary semaphores, when possible.

Replace the hyperv_mmio_lock, its semantics implies traditional lock
ownership; that is, the lock owner is the same for both lock/unlock
operations. Therefore it is safe to convert.

Signed-off-by: default avatarDavidlohr Bueso <dbueso@suse.de>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent d7f0b2e4
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment