sched_clock: Use seqcount instead of rolling our own
authorStephen Boyd <sboyd@codeaurora.org>
Thu, 18 Jul 2013 23:21:15 +0000 (16:21 -0700)
committerAjay Nandakumar <anandakumarm@nvidia.com>
Mon, 13 Jan 2014 06:33:38 +0000 (11:33 +0530)
commit960a26b631b402b13b83c22a2eaf263f4d16781b
treecda73bd2ecdeab93cbe7ad900187bf08466e680c
parent2acd351913e560b6e0db987cf536126b02ff415e
sched_clock: Use seqcount instead of rolling our own

We're going to increase the cyc value to 64 bits in the near
future. Doing that is going to break the custom seqcount
implementation in the sched_clock code because 64 bit numbers
aren't guaranteed to be atomic. Replace the cyc_copy with a
seqcount to avoid this problem.

Bug 1399318

Cc: Russell King <linux@arm.linux.org.uk>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
(cherry picked from commit 85c3d2dd15be4d577a37ffb8bbbd019fc8e3280a)
Signed-off-by: Ajay Nandakumar <anandakumarm@nvidia.com>
Change-Id: Iff7ec4aca829452c5b51576dae9437a37ed8f619
kernel/time/sched_clock.c