Skip to content
Commit 058e3739 authored by Nicolas Pitre's avatar Nicolas Pitre Committed by Linus Torvalds
Browse files

clarify usage expectations for cnt32_to_63()



Currently, all existing users of cnt32_to_63() are fine since the CPU
architectures where it is used don't do read access reordering, and user
mode preemption is disabled already.  It is nevertheless a good idea to
better elaborate usage requirements wrt preemption, and use an explicit
memory barrier on SMP to avoid different CPUs accessing the counter
value in the wrong order.  On UP a simple compiler barrier is
sufficient.

Signed-off-by: default avatarNicolas Pitre <nico@marvell.com>
Acked-by: default avatarMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 02cabab4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment