aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/clocksource.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h
index daa4940cc0f1..2665ca04cf8f 100644
--- a/include/linux/clocksource.h
+++ b/include/linux/clocksource.h
@@ -12,6 +12,7 @@
12#include <linux/timex.h> 12#include <linux/timex.h>
13#include <linux/time.h> 13#include <linux/time.h>
14#include <linux/list.h> 14#include <linux/list.h>
15#include <linux/cache.h>
15#include <linux/timer.h> 16#include <linux/timer.h>
16#include <asm/div64.h> 17#include <asm/div64.h>
17#include <asm/io.h> 18#include <asm/io.h>
@@ -52,6 +53,9 @@ struct clocksource;
52 * @xtime_interval: Used internally by timekeeping core, please ignore. 53 * @xtime_interval: Used internally by timekeeping core, please ignore.
53 */ 54 */
54struct clocksource { 55struct clocksource {
56 /*
57 * First part of structure is read mostly
58 */
55 char *name; 59 char *name;
56 struct list_head list; 60 struct list_head list;
57 int rating; 61 int rating;
@@ -63,8 +67,15 @@ struct clocksource {
63 cycle_t (*vread)(void); 67 cycle_t (*vread)(void);
64 68
65 /* timekeeping specific data, ignore */ 69 /* timekeeping specific data, ignore */
66 cycle_t cycle_last, cycle_interval; 70 cycle_t cycle_interval;
67 u64 xtime_nsec, xtime_interval; 71 u64 xtime_interval;
72 /*
73 * Second part is written at each timer interrupt
74 * Keep it in a different cache line to dirty no
75 * more than one cache line.
76 */
77 cycle_t cycle_last ____cacheline_aligned_in_smp;
78 u64 xtime_nsec;
68 s64 error; 79 s64 error;
69 80
70#ifdef CONFIG_CLOCKSOURCE_WATCHDOG 81#ifdef CONFIG_CLOCKSOURCE_WATCHDOG