diff options
Diffstat (limited to 'include/linux/clocksource.h')
-rw-r--r-- | include/linux/clocksource.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index d4646b48dc4a..139c4db55f17 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h | |||
@@ -22,6 +22,10 @@ | |||
22 | typedef u64 cycle_t; | 22 | typedef u64 cycle_t; |
23 | struct clocksource; | 23 | struct clocksource; |
24 | 24 | ||
25 | #ifdef CONFIG_ARCH_CLOCKSOURCE_DATA | ||
26 | #include <asm/clocksource.h> | ||
27 | #endif | ||
28 | |||
25 | /** | 29 | /** |
26 | * struct cyclecounter - hardware abstraction for a free running counter | 30 | * struct cyclecounter - hardware abstraction for a free running counter |
27 | * Provides completely state-free accessors to the underlying hardware. | 31 | * Provides completely state-free accessors to the underlying hardware. |
@@ -153,7 +157,7 @@ extern u64 timecounter_cyc2time(struct timecounter *tc, | |||
153 | * @shift: cycle to nanosecond divisor (power of two) | 157 | * @shift: cycle to nanosecond divisor (power of two) |
154 | * @max_idle_ns: max idle time permitted by the clocksource (nsecs) | 158 | * @max_idle_ns: max idle time permitted by the clocksource (nsecs) |
155 | * @flags: flags describing special properties | 159 | * @flags: flags describing special properties |
156 | * @vread: vsyscall based read | 160 | * @archdata: arch-specific data |
157 | * @suspend: suspend function for the clocksource, if necessary | 161 | * @suspend: suspend function for the clocksource, if necessary |
158 | * @resume: resume function for the clocksource, if necessary | 162 | * @resume: resume function for the clocksource, if necessary |
159 | */ | 163 | */ |
@@ -169,16 +173,13 @@ struct clocksource { | |||
169 | u32 shift; | 173 | u32 shift; |
170 | u64 max_idle_ns; | 174 | u64 max_idle_ns; |
171 | 175 | ||
172 | #ifdef CONFIG_IA64 | 176 | #ifdef CONFIG_ARCH_CLOCKSOURCE_DATA |
173 | void *fsys_mmio; /* used by fsyscall asm code */ | 177 | struct arch_clocksource_data archdata; |
174 | #define CLKSRC_FSYS_MMIO_SET(mmio, addr) ((mmio) = (addr)) | ||
175 | #else | ||
176 | #define CLKSRC_FSYS_MMIO_SET(mmio, addr) do { } while (0) | ||
177 | #endif | 178 | #endif |
179 | |||
178 | const char *name; | 180 | const char *name; |
179 | struct list_head list; | 181 | struct list_head list; |
180 | int rating; | 182 | int rating; |
181 | cycle_t (*vread)(void); | ||
182 | int (*enable)(struct clocksource *cs); | 183 | int (*enable)(struct clocksource *cs); |
183 | void (*disable)(struct clocksource *cs); | 184 | void (*disable)(struct clocksource *cs); |
184 | unsigned long flags; | 185 | unsigned long flags; |
@@ -188,6 +189,7 @@ struct clocksource { | |||
188 | #ifdef CONFIG_CLOCKSOURCE_WATCHDOG | 189 | #ifdef CONFIG_CLOCKSOURCE_WATCHDOG |
189 | /* Watchdog related data, used by the framework */ | 190 | /* Watchdog related data, used by the framework */ |
190 | struct list_head wd_list; | 191 | struct list_head wd_list; |
192 | cycle_t cs_last; | ||
191 | cycle_t wd_last; | 193 | cycle_t wd_last; |
192 | #endif | 194 | #endif |
193 | } ____cacheline_aligned; | 195 | } ____cacheline_aligned; |