From: Mathieu Desnoyers Date: Wed, 16 Jul 2014 21:05:21 +0000 (+0000) Subject: seqcount: Add raw_write_seqcount_latch() X-Git-Tag: omap-for-v3.17/fixes-against-rc2~152^2~7 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b0fd802e8c0545148324916055e7b40d97963fa;p=pandora-kernel.git seqcount: Add raw_write_seqcount_latch() For NMI safe access to clock monotonic we use the seqcount LSB as index of a timekeeper array. The update sequence looks like this: smp_wmb(); <- prior stores to a[1] seq++; smp_wmb(); <- seq increment before update of a[0] update(a[0]); smp_wmb(); <- update of a[0] seq++; smp_wmb(); <- seq increment before update of a[1] update(a[1]); To avoid open coded barriers, provide a helper function. [ tglx: Split out of a combo patch against the first implementation of the NMI safe accessor ] Signed-off-by: Mathieu Desnoyers Cc: John Stultz Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Steven Rostedt Signed-off-by: Thomas Gleixner Signed-off-by: John Stultz --- Reading git-diff-tree failed