aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/time/clocksource.c16
-rw-r--r--kernel/time/jiffies.c2
-rw-r--r--kernel/timer.c20
3 files changed, 19 insertions, 19 deletions
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