aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/i386/kernel/hpet.c2
-rw-r--r--arch/i386/kernel/i8253.c2
-rw-r--r--arch/i386/kernel/tsc.c4
-rw-r--r--drivers/clocksource/acpi_pm.c2
-rw-r--r--drivers/clocksource/cyclone.c2
-rw-r--r--include/linux/clocksource.h14
-rw-r--r--kernel/time/clocksource.c16
-rw-r--r--kernel/time/jiffies.c2
-rw-r--r--kernel/timer.c20
9 files changed, 32 insertions, 32 deletions
diff --git a/arch/i386/kernel/hpet.c b/arch/i386/kernel/hpet.c
index 91a5bdd9f604..23e7d2c5d253 100644
--- a/arch/i386/kernel/hpet.c
+++ b/arch/i386/kernel/hpet.c
@@ -61,7 +61,7 @@ static int __init init_hpet_clocksource(void)
61 do_div(tmp, FSEC_PER_NSEC); 61 do_div(tmp, FSEC_PER_NSEC);
62 clocksource_hpet.mult = (u32)tmp; 62 clocksource_hpet.mult = (u32)tmp;
63 63
64 return register_clocksource(&clocksource_hpet); 64 return clocksource_register(&clocksource_hpet);
65} 65}
66 66
67module_init(init_hpet_clocksource); 67module_init(init_hpet_clocksource);
diff --git a/arch/i386/kernel/i8253.c b/arch/i386/kernel/i8253.c
index a276bceade68..5b13739a7ff4 100644
--- a/arch/i386/kernel/i8253.c
+++ b/arch/i386/kernel/i8253.c
@@ -80,6 +80,6 @@ static int __init init_pit_clocksource(void)
80 return 0; 80 return 0;
81 81
82 clocksource_pit.mult = clocksource_hz2mult(CLOCK_TICK_RATE, 20); 82 clocksource_pit.mult = clocksource_hz2mult(CLOCK_TICK_RATE, 20);
83 return register_clocksource(&clocksource_pit); 83 return clocksource_register(&clocksource_pit);
84} 84}
85module_init(init_pit_clocksource); 85module_init(init_pit_clocksource);
diff --git a/arch/i386/kernel/tsc.c b/arch/i386/kernel/tsc.c
index 7713f86389af..1c3c927755de 100644
--- a/arch/i386/kernel/tsc.c
+++ b/arch/i386/kernel/tsc.c
@@ -351,7 +351,7 @@ static int tsc_update_callback(void)
351 /* check to see if we should switch to the safe clocksource: */ 351 /* check to see if we should switch to the safe clocksource: */
352 if (clocksource_tsc.rating != 50 && check_tsc_unstable()) { 352 if (clocksource_tsc.rating != 50 && check_tsc_unstable()) {
353 clocksource_tsc.rating = 50; 353 clocksource_tsc.rating = 50;
354 reselect_clocksource(); 354 clocksource_reselect();
355 change = 1; 355 change = 1;
356 } 356 }
357 357
@@ -469,7 +469,7 @@ static int __init init_tsc_clocksource(void)
469 jiffies + msecs_to_jiffies(TSC_FREQ_CHECK_INTERVAL); 469 jiffies + msecs_to_jiffies(TSC_FREQ_CHECK_INTERVAL);
470 add_timer(&verify_tsc_freq_timer); 470 add_timer(&verify_tsc_freq_timer);
471 471
472 return register_clocksource(&clocksource_tsc); 472 return clocksource_register(&clocksource_tsc);
473 } 473 }
474 474
475 return 0; 475 return 0;
diff --git a/drivers/clocksource/acpi_pm.c b/drivers/clocksource/acpi_pm.c
index a0e5cde2fa71..9217be5048d5 100644
--- a/drivers/clocksource/acpi_pm.c
+++ b/drivers/clocksource/acpi_pm.c
@@ -171,7 +171,7 @@ static int __init init_acpi_pm_clocksource(void)
171 return -ENODEV; 171 return -ENODEV;
172 172
173pm_good: 173pm_good:
174 return register_clocksource(&clocksource_acpi_pm); 174 return clocksource_register(&clocksource_acpi_pm);
175} 175}
176 176
177module_init(init_acpi_pm_clocksource); 177module_init(init_acpi_pm_clocksource);
diff --git a/drivers/clocksource/cyclone.c b/drivers/clocksource/cyclone.c
index 444eb11b9b4f..5906a0af825d 100644
--- a/drivers/clocksource/cyclone.c
+++ b/drivers/clocksource/cyclone.c
@@ -113,7 +113,7 @@ static int __init init_cyclone_clocksource(void)
113 clocksource_cyclone.mult = clocksource_hz2mult(CYCLONE_TIMER_FREQ, 113 clocksource_cyclone.mult = clocksource_hz2mult(CYCLONE_TIMER_FREQ,
114 clocksource_cyclone.shift); 114 clocksource_cyclone.shift);
115 115
116 return register_clocksource(&clocksource_cyclone); 116 return clocksource_register(&clocksource_cyclone);
117} 117}
118 118
119module_init(init_cyclone_clocksource); 119module_init(init_cyclone_clocksource);
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h
index c4739c4e3039..5f4a7f72f3ee 100644
--- a/include/linux/clocksource.h
+++ b/include/linux/clocksource.h
@@ -118,12 +118,12 @@ static inline u32 clocksource_hz2mult(u32 hz, u32 shift_constant)
118} 118}
119 119
120/** 120/**
121 * read_clocksource: - Access the clocksource's current cycle value 121 * clocksource_read: - Access the clocksource's current cycle value
122 * @cs: pointer to clocksource being read 122 * @cs: pointer to clocksource being read
123 * 123 *
124 * Uses the clocksource to return the current cycle_t value 124 * Uses the clocksource to return the current cycle_t value
125 */ 125 */
126static inline cycle_t read_clocksource(struct clocksource *cs) 126static inline cycle_t clocksource_read(struct clocksource *cs)
127{ 127{
128 return cs->read(); 128 return cs->read();
129} 129}
@@ -145,7 +145,7 @@ static inline s64 cyc2ns(struct clocksource *cs, cycle_t cycles)
145} 145}
146 146
147/** 147/**
148 * calculate_clocksource_interval - Calculates a clocksource interval struct 148 * clocksource_calculate_interval - Calculates a clocksource interval struct
149 * 149 *
150 * @c: Pointer to clocksource. 150 * @c: Pointer to clocksource.
151 * @length_nsec: Desired interval length in nanoseconds. 151 * @length_nsec: Desired interval length in nanoseconds.
@@ -155,7 +155,7 @@ static inline s64 cyc2ns(struct clocksource *cs, cycle_t cycles)
155 * 155 *
156 * Unless you're the timekeeping code, you should not be using this! 156 * Unless you're the timekeeping code, you should not be using this!
157 */ 157 */
158static inline void calculate_clocksource_interval(struct clocksource *c, 158static inline void clocksource_calculate_interval(struct clocksource *c,
159 unsigned long length_nsec) 159 unsigned long length_nsec)
160{ 160{
161 u64 tmp; 161 u64 tmp;
@@ -271,8 +271,8 @@ static inline s64 make_ntp_adj(struct clocksource *clock,
271 271
272 272
273/* used to install a new clocksource */ 273/* used to install a new clocksource */
274int register_clocksource(struct clocksource*); 274int clocksource_register(struct clocksource*);
275void reselect_clocksource(void); 275void clocksource_reselect(void);
276struct clocksource* get_next_clocksource(void); 276struct clocksource* clocksource_get_next(void);
277 277
278#endif /* _LINUX_CLOCKSOURCE_H */ 278#endif /* _LINUX_CLOCKSOURCE_H */
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index a9f387ea83b0..74eca5939bd9 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -65,10 +65,10 @@ static int __init clocksource_done_booting(void)
65late_initcall(clocksource_done_booting); 65late_initcall(clocksource_done_booting);
66 66
67/** 67/**
68 * get_next_clocksource - Returns the selected clocksource 68 * clocksource_get_next - Returns the selected clocksource
69 * 69 *
70 */ 70 */
71struct clocksource *get_next_clocksource(void) 71struct clocksource *clocksource_get_next(void)
72{ 72{
73 unsigned long flags; 73 unsigned long flags;
74 74
@@ -142,12 +142,12 @@ static int is_registered_source(struct clocksource *c)
142} 142}
143 143
144/** 144/**
145 * register_clocksource - Used to install new clocksources 145 * clocksource_register - Used to install new clocksources
146 * @t: clocksource to be registered 146 * @t: clocksource to be registered
147 * 147 *
148 * Returns -EBUSY if registration fails, zero otherwise. 148 * Returns -EBUSY if registration fails, zero otherwise.
149 */ 149 */
150int register_clocksource(struct clocksource *c) 150int clocksource_register(struct clocksource *c)
151{ 151{
152 int ret = 0; 152 int ret = 0;
153 unsigned long flags; 153 unsigned long flags;
@@ -167,17 +167,16 @@ int register_clocksource(struct clocksource *c)
167 spin_unlock_irqrestore(&clocksource_lock, flags); 167 spin_unlock_irqrestore(&clocksource_lock, flags);
168 return ret; 168 return ret;
169} 169}
170 170EXPORT_SYMBOL(clocksource_register);
171EXPORT_SYMBOL(register_clocksource);
172 171
173/** 172/**
174 * reselect_clocksource - Rescan list for next clocksource 173 * clocksource_reselect - Rescan list for next clocksource
175 * 174 *
176 * A quick helper function to be used if a clocksource changes its 175 * A quick helper function to be used if a clocksource changes its
177 * rating. Forces the clocksource list to be re-scanned for the best 176 * rating. Forces the clocksource list to be re-scanned for the best
178 * clocksource. 177 * clocksource.
179 */ 178 */
180void reselect_clocksource(void) 179void clocksource_reselect(void)
181{ 180{
182 unsigned long flags; 181 unsigned long flags;
183 182
@@ -185,6 +184,7 @@ void reselect_clocksource(void)
185 next_clocksource = select_clocksource(); 184 next_clocksource = select_clocksource();
186 spin_unlock_irqrestore(&clocksource_lock, flags); 185 spin_unlock_irqrestore(&clocksource_lock, flags);
187} 186}
187EXPORT_SYMBOL(clocksource_reselect);
188 188
189/** 189/**
190 * sysfs_show_current_clocksources - sysfs interface for current clocksource 190 * sysfs_show_current_clocksources - sysfs interface for current clocksource
diff --git a/kernel/time/jiffies.c b/kernel/time/jiffies.c
index 1fe8376e717b..126bb30c4afe 100644
--- a/kernel/time/jiffies.c
+++ b/kernel/time/jiffies.c
@@ -67,7 +67,7 @@ struct clocksource clocksource_jiffies = {
67 67
68static int __init init_jiffies_clocksource(void) 68static int __init init_jiffies_clocksource(void)
69{ 69{
70 return register_clocksource(&clocksource_jiffies); 70 return clocksource_register(&clocksource_jiffies);
71} 71}
72 72
73module_init(init_jiffies_clocksource); 73module_init(init_jiffies_clocksource);
diff --git a/kernel/timer.c b/kernel/timer.c
index e5adb9e2e7a7..890a56937cfa 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -810,7 +810,7 @@ static inline s64 __get_nsec_offset(void)
810 s64 ns_offset; 810 s64 ns_offset;
811 811
812 /* read clocksource: */ 812 /* read clocksource: */
813 cycle_now = read_clocksource(clock); 813 cycle_now = clocksource_read(clock);
814 814
815 /* calculate the delta since the last update_wall_time: */ 815 /* calculate the delta since the last update_wall_time: */
816 cycle_delta = (cycle_now - last_clock_cycle) & clock->mask; 816 cycle_delta = (cycle_now - last_clock_cycle) & clock->mask;
@@ -845,7 +845,7 @@ static inline void __get_realtime_clock_ts(struct timespec *ts)
845} 845}
846 846
847/** 847/**
848 * get_realtime_clock_ts - Returns the time of day in a timespec 848 * getnstimeofday - Returns the time of day in a timespec
849 * @ts: pointer to the timespec to be set 849 * @ts: pointer to the timespec to be set
850 * 850 *
851 * Returns the time of day in a timespec. 851 * Returns the time of day in a timespec.
@@ -920,9 +920,9 @@ static int change_clocksource(void)
920 struct clocksource *new; 920 struct clocksource *new;
921 cycle_t now; 921 cycle_t now;
922 u64 nsec; 922 u64 nsec;
923 new = get_next_clocksource(); 923 new = clocksource_get_next();
924 if (clock != new) { 924 if (clock != new) {
925 now = read_clocksource(new); 925 now = clocksource_read(new);
926 nsec = __get_nsec_offset(); 926 nsec = __get_nsec_offset();
927 timespec_add_ns(&xtime, nsec); 927 timespec_add_ns(&xtime, nsec);
928 928
@@ -966,9 +966,9 @@ void __init timekeeping_init(void)
966 unsigned long flags; 966 unsigned long flags;
967 967
968 write_seqlock_irqsave(&xtime_lock, flags); 968 write_seqlock_irqsave(&xtime_lock, flags);
969 clock = get_next_clocksource(); 969 clock = clocksource_get_next();
970 calculate_clocksource_interval(clock, tick_nsec); 970 clocksource_calculate_interval(clock, tick_nsec);
971 last_clock_cycle = read_clocksource(clock); 971 last_clock_cycle = clocksource_read(clock);
972 ntp_clear(); 972 ntp_clear();
973 write_sequnlock_irqrestore(&xtime_lock, flags); 973 write_sequnlock_irqrestore(&xtime_lock, flags);
974} 974}
@@ -988,7 +988,7 @@ static int timekeeping_resume(struct sys_device *dev)
988 988
989 write_seqlock_irqsave(&xtime_lock, flags); 989 write_seqlock_irqsave(&xtime_lock, flags);
990 /* restart the last cycle value */ 990 /* restart the last cycle value */
991 last_clock_cycle = read_clocksource(clock); 991 last_clock_cycle = clocksource_read(clock);
992 write_sequnlock_irqrestore(&xtime_lock, flags); 992 write_sequnlock_irqrestore(&xtime_lock, flags);
993 return 0; 993 return 0;
994} 994}
@@ -1028,7 +1028,7 @@ static void update_wall_time(void)
1028 snsecs_per_sec = (s64)NSEC_PER_SEC << clock->shift; 1028 snsecs_per_sec = (s64)NSEC_PER_SEC << clock->shift;
1029 remainder_snsecs += (s64)xtime.tv_nsec << clock->shift; 1029 remainder_snsecs += (s64)xtime.tv_nsec << clock->shift;
1030 1030
1031 now = read_clocksource(clock); 1031 now = clocksource_read(clock);
1032 offset = (now - last_clock_cycle)&clock->mask; 1032 offset = (now - last_clock_cycle)&clock->mask;
1033 1033
1034 /* normally this loop will run just once, however in the 1034 /* normally this loop will run just once, however in the
@@ -1069,7 +1069,7 @@ static void update_wall_time(void)
1069 if (change_clocksource()) { 1069 if (change_clocksource()) {
1070 error = 0; 1070 error = 0;
1071 remainder_snsecs = 0; 1071 remainder_snsecs = 0;
1072 calculate_clocksource_interval(clock, tick_nsec); 1072 clocksource_calculate_interval(clock, tick_nsec);
1073 } 1073 }
1074} 1074}
1075 1075