]> git.baikalelectronics.ru Git - kernel.git/commit
clarify usage expectations for cnt32_to_63()
authorNicolas Pitre <nico@cam.org>
Sun, 9 Nov 2008 05:27:53 +0000 (00:27 -0500)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 9 Nov 2008 19:17:33 +0000 (11:17 -0800)
commit63aee3f7e21f0833a5055c221a000511804582b6
tree2261c23bf8c77e51628310057b4dde718e487c53
parenta4c78db1d5658de2ea6ad365c85f73b36e97e354
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: Nicolas Pitre <nico@marvell.com>
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/cnt32_to_63.h