aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/clocksource.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/clocksource.h')
-rw-r--r--include/linux/clocksource.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h
index 65602d395a52..e315d04a2fd9 100644
--- a/include/linux/clocksource.h
+++ b/include/linux/clocksource.h
@@ -75,8 +75,8 @@ struct module;
75 * structure. 75 * structure.
76 */ 76 */
77struct clocksource { 77struct clocksource {
78 cycle_t (*read)(struct clocksource *cs); 78 u64 (*read)(struct clocksource *cs);
79 cycle_t mask; 79 u64 mask;
80 u32 mult; 80 u32 mult;
81 u32 shift; 81 u32 shift;
82 u64 max_idle_ns; 82 u64 max_idle_ns;
@@ -98,8 +98,8 @@ struct clocksource {
98#ifdef CONFIG_CLOCKSOURCE_WATCHDOG 98#ifdef CONFIG_CLOCKSOURCE_WATCHDOG
99 /* Watchdog related data, used by the framework */ 99 /* Watchdog related data, used by the framework */
100 struct list_head wd_list; 100 struct list_head wd_list;
101 cycle_t cs_last; 101 u64 cs_last;
102 cycle_t wd_last; 102 u64 wd_last;
103#endif 103#endif
104 struct module *owner; 104 struct module *owner;
105}; 105};
@@ -117,7 +117,7 @@ struct clocksource {
117#define CLOCK_SOURCE_RESELECT 0x100 117#define CLOCK_SOURCE_RESELECT 0x100
118 118
119/* simplify initialization of mask field */ 119/* simplify initialization of mask field */
120#define CLOCKSOURCE_MASK(bits) (cycle_t)((bits) < 64 ? ((1ULL<<(bits))-1) : -1) 120#define CLOCKSOURCE_MASK(bits) (u64)((bits) < 64 ? ((1ULL<<(bits))-1) : -1)
121 121
122static inline u32 clocksource_freq2mult(u32 freq, u32 shift_constant, u64 from) 122static inline u32 clocksource_freq2mult(u32 freq, u32 shift_constant, u64 from)
123{ 123{
@@ -176,7 +176,7 @@ static inline u32 clocksource_hz2mult(u32 hz, u32 shift_constant)
176 * 176 *
177 * XXX - This could use some mult_lxl_ll() asm optimization 177 * XXX - This could use some mult_lxl_ll() asm optimization
178 */ 178 */
179static inline s64 clocksource_cyc2ns(cycle_t cycles, u32 mult, u32 shift) 179static inline s64 clocksource_cyc2ns(u64 cycles, u32 mult, u32 shift)
180{ 180{
181 return ((u64) cycles * mult) >> shift; 181 return ((u64) cycles * mult) >> shift;
182} 182}
@@ -236,13 +236,13 @@ static inline void __clocksource_update_freq_khz(struct clocksource *cs, u32 khz
236 236
237extern int timekeeping_notify(struct clocksource *clock); 237extern int timekeeping_notify(struct clocksource *clock);
238 238
239extern cycle_t clocksource_mmio_readl_up(struct clocksource *); 239extern u64 clocksource_mmio_readl_up(struct clocksource *);
240extern cycle_t clocksource_mmio_readl_down(struct clocksource *); 240extern u64 clocksource_mmio_readl_down(struct clocksource *);
241extern cycle_t clocksource_mmio_readw_up(struct clocksource *); 241extern u64 clocksource_mmio_readw_up(struct clocksource *);
242extern cycle_t clocksource_mmio_readw_down(struct clocksource *); 242extern u64 clocksource_mmio_readw_down(struct clocksource *);
243 243
244extern int clocksource_mmio_init(void __iomem *, const char *, 244extern int clocksource_mmio_init(void __iomem *, const char *,
245 unsigned long, int, unsigned, cycle_t (*)(struct clocksource *)); 245 unsigned long, int, unsigned, u64 (*)(struct clocksource *));
246 246
247extern int clocksource_i8253_init(void); 247extern int clocksource_i8253_init(void);
248 248