summaryrefslogtreecommitdiff
path: root/Documentation/input
diff options
context:
space:
mode:
authorDave Martin <dave.martin@linaro.org>2012-08-17 16:07:01 +0100
committerNicolas Pitre <nicolas.pitre@linaro.org>2013-04-24 10:37:01 -0400
commit9762f12d3e05c8d6a0651f4c7e76ae72ce27fc3a (patch)
tree68627b66f296acbdd23fcb50300c1bf10d9a4ae6 /Documentation/input
parent7fe31d28e839f9565c8176ec584676a045970802 (diff)
ARM: mcpm: Add baremetal voting mutexes
This patch adds a simple low-level voting mutex implementation to be used to arbitrate during first man selection when no load/store exclusive instructions are usable. For want of a better name, these are called "vlocks". (I was tempted to call them ballot locks, but "block" is way too confusing an abbreviation...) There is no function to wait for the lock to be released, and no vlock_lock() function since we don't need these at the moment. These could straightforwardly be added if vlocks get used for other purposes. For architectural correctness even Strongly-Ordered memory accesses require barriers in order to guarantee that multiple CPUs have a coherent view of the ordering of memory accesses. Whether or not this matters depends on hardware implementation details of the memory system. Since the purpose of this code is to provide a clean, generic locking mechanism with no platform-specific dependencies the barriers should be present to avoid unpleasant surprises on future platforms. Note: * When taking the lock, we don't care about implicit background memory operations and other signalling which may be pending, because those are not part of the critical section anyway. A DMB is sufficient to ensure correctly observed ordering if the explicit memory accesses in vlock_trylock. * No barrier is required after checking the election result, because the result is determined by the store to VLOCK_OWNER_OFFSET and is already globally observed due to the barriers in voting_end. This means that global agreement on the winner is guaranteed, even before the winner is known locally. Signed-off-by: Dave Martin <dave.martin@linaro.org> Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org> Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Reviewed-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'Documentation/input')
0 files changed, 0 insertions, 0 deletions