lkml.org 
[lkml]   [2013]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 5/7] clocksource: add latch to clocksource
Date
Add latch for data used by clock read operations. This is in preparation
for the clock latch synchronization scheme. "cycle_last" rely on
timekeeper seqlock synchronization, and will therefore need to be
latched.

Add:
- cycle_last_latch (array of 2 elements),
- read_latch(),
- update_latch().

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
---
include/linux/clocksource.h | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h
index dbbf8aa..ef9c2e5 100644
--- a/include/linux/clocksource.h
+++ b/include/linux/clocksource.h
@@ -180,6 +180,10 @@ struct clocksource {
#ifdef CONFIG_ARCH_CLOCKSOURCE_DATA
struct arch_clocksource_data archdata;
#endif
+ cycle_t (*read_latch)(struct clocksource *cs, int index);
+ void (*update_latch)(struct clocksource *cs, int oldindex,
+ int newindex);
+ cycle_t cycle_last_latch[2];

const char *name;
struct list_head list;
--
1.7.10.4


\
 
 \ /
  Last update: 2013-09-14 22:01    [W:0.057 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site