aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/clocksource.h4
-rw-r--r--include/linux/clocksource.h10
2 files changed, 12 insertions, 2 deletions
diff --git a/include/asm-generic/clocksource.h b/include/asm-generic/clocksource.h
new file mode 100644
index 000000000000..0a462d3fb05e
--- /dev/null
+++ b/include/asm-generic/clocksource.h
@@ -0,0 +1,4 @@
1/*
2 * Architectures should override this file to add private userspace
3 * clock magic if needed.
4 */
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h
index d4646b48dc4a..0fb83c224471 100644
--- a/include/linux/clocksource.h
+++ b/include/linux/clocksource.h
@@ -22,6 +22,8 @@
22typedef u64 cycle_t; 22typedef u64 cycle_t;
23struct clocksource; 23struct clocksource;
24 24
25#include <asm/clocksource.h>
26
25/** 27/**
26 * struct cyclecounter - hardware abstraction for a free running counter 28 * struct cyclecounter - hardware abstraction for a free running counter
27 * Provides completely state-free accessors to the underlying hardware. 29 * Provides completely state-free accessors to the underlying hardware.
@@ -153,7 +155,7 @@ extern u64 timecounter_cyc2time(struct timecounter *tc,
153 * @shift: cycle to nanosecond divisor (power of two) 155 * @shift: cycle to nanosecond divisor (power of two)
154 * @max_idle_ns: max idle time permitted by the clocksource (nsecs) 156 * @max_idle_ns: max idle time permitted by the clocksource (nsecs)
155 * @flags: flags describing special properties 157 * @flags: flags describing special properties
156 * @vread: vsyscall based read 158 * @archdata: arch-specific data
157 * @suspend: suspend function for the clocksource, if necessary 159 * @suspend: suspend function for the clocksource, if necessary
158 * @resume: resume function for the clocksource, if necessary 160 * @resume: resume function for the clocksource, if necessary
159 */ 161 */
@@ -175,10 +177,14 @@ struct clocksource {
175#else 177#else
176#define CLKSRC_FSYS_MMIO_SET(mmio, addr) do { } while (0) 178#define CLKSRC_FSYS_MMIO_SET(mmio, addr) do { } while (0)
177#endif 179#endif
180
181#ifdef __ARCH_HAS_CLOCKSOURCE_DATA
182 struct arch_clocksource_data archdata;
183#endif
184
178 const char *name; 185 const char *name;
179 struct list_head list; 186 struct list_head list;
180 int rating; 187 int rating;
181 cycle_t (*vread)(void);
182 int (*enable)(struct clocksource *cs); 188 int (*enable)(struct clocksource *cs);
183 void (*disable)(struct clocksource *cs); 189 void (*disable)(struct clocksource *cs);
184 unsigned long flags; 190 unsigned long flags;