Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 1485aaf8 authored by Davidlohr Bueso's avatar Davidlohr Bueso Committed by Greg Kroah-Hartman
Browse files

drivers/hv: Replace binary semaphore with mutex



[ Upstream commit 8aea7f82153d6f292add3eb4bd7ba8edcae5c7f7 ]

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>
Stable-dep-of: 73fe9073c0cc ("Drivers: hv: vmbus: Don't release fb_mmio resource in vmbus_free_mmio()")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 6a3c34e8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment