x86/tsc: Remodel cyc2ns to use seqcount_latch()
authorPeter Zijlstra <peterz@infradead.org>
Tue, 2 May 2017 11:22:07 +0000 (13:22 +0200)
committerIngo Molnar <mingo@kernel.org>
Mon, 15 May 2017 08:15:15 +0000 (10:15 +0200)
commit59eaef78bfea88fcbbd7b9b48ccf513aae1522c3
treeeb668f47caa16eab8c3ac280654a28d25890ddee
parent8309f86cd41e8714526867177facf7a316d9be53
x86/tsc: Remodel cyc2ns to use seqcount_latch()

Replace the custom multi-value scheme with the more regular
seqcount_latch() scheme. Along with scrapping a lot of lines, the latch
scheme is better documented and used in more places.

The immediate benefit however is not being limited on the update side.
The current code has a limit where the writers block which is hit by
future changes.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/events/core.c
arch/x86/include/asm/timer.h
arch/x86/kernel/tsc.c
arch/x86/platform/uv/tlb_uv.c