diff options
Diffstat (limited to 'include/linux/clocksource.h')
-rw-r--r-- | include/linux/clocksource.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index 7279b94c01da..2f39a4911668 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h | |||
@@ -21,6 +21,7 @@ | |||
21 | /* clocksource cycle base type */ | 21 | /* clocksource cycle base type */ |
22 | typedef u64 cycle_t; | 22 | typedef u64 cycle_t; |
23 | struct clocksource; | 23 | struct clocksource; |
24 | struct module; | ||
24 | 25 | ||
25 | #ifdef CONFIG_ARCH_CLOCKSOURCE_DATA | 26 | #ifdef CONFIG_ARCH_CLOCKSOURCE_DATA |
26 | #include <asm/clocksource.h> | 27 | #include <asm/clocksource.h> |
@@ -162,6 +163,7 @@ extern u64 timecounter_cyc2time(struct timecounter *tc, | |||
162 | * @suspend: suspend function for the clocksource, if necessary | 163 | * @suspend: suspend function for the clocksource, if necessary |
163 | * @resume: resume function for the clocksource, if necessary | 164 | * @resume: resume function for the clocksource, if necessary |
164 | * @cycle_last: most recent cycle counter value seen by ::read() | 165 | * @cycle_last: most recent cycle counter value seen by ::read() |
166 | * @owner: module reference, must be set by clocksource in modules | ||
165 | */ | 167 | */ |
166 | struct clocksource { | 168 | struct clocksource { |
167 | /* | 169 | /* |
@@ -195,6 +197,7 @@ struct clocksource { | |||
195 | cycle_t cs_last; | 197 | cycle_t cs_last; |
196 | cycle_t wd_last; | 198 | cycle_t wd_last; |
197 | #endif | 199 | #endif |
200 | struct module *owner; | ||
198 | } ____cacheline_aligned; | 201 | } ____cacheline_aligned; |
199 | 202 | ||
200 | /* | 203 | /* |
@@ -279,7 +282,7 @@ static inline s64 clocksource_cyc2ns(cycle_t cycles, u32 mult, u32 shift) | |||
279 | 282 | ||
280 | 283 | ||
281 | extern int clocksource_register(struct clocksource*); | 284 | extern int clocksource_register(struct clocksource*); |
282 | extern void clocksource_unregister(struct clocksource*); | 285 | extern int clocksource_unregister(struct clocksource*); |
283 | extern void clocksource_touch_watchdog(void); | 286 | extern void clocksource_touch_watchdog(void); |
284 | extern struct clocksource* clocksource_get_next(void); | 287 | extern struct clocksource* clocksource_get_next(void); |
285 | extern void clocksource_change_rating(struct clocksource *cs, int rating); | 288 | extern void clocksource_change_rating(struct clocksource *cs, int rating); |
@@ -321,7 +324,7 @@ static inline void __clocksource_updatefreq_khz(struct clocksource *cs, u32 khz) | |||
321 | } | 324 | } |
322 | 325 | ||
323 | 326 | ||
324 | extern void timekeeping_notify(struct clocksource *clock); | 327 | extern int timekeeping_notify(struct clocksource *clock); |
325 | 328 | ||
326 | extern cycle_t clocksource_mmio_readl_up(struct clocksource *); | 329 | extern cycle_t clocksource_mmio_readl_up(struct clocksource *); |
327 | extern cycle_t clocksource_mmio_readl_down(struct clocksource *); | 330 | extern cycle_t clocksource_mmio_readl_down(struct clocksource *); |