diff options
author | John Stultz <john.stultz@linaro.org> | 2011-11-14 14:46:39 -0500 |
---|---|---|
committer | John Stultz <john.stultz@linaro.org> | 2012-01-26 22:44:16 -0500 |
commit | 8fcce546be16130865550136831f71097d7fc228 (patch) | |
tree | a7670612d8196da348842c7c8d83336aa7922e90 /kernel/time | |
parent | 01f71b47e08f2a062c4e77c94dfa9a7e0ae65fcb (diff) |
time: Cleanup global variables and move them to the top
Move global xtime_lock and timekeeping_suspended values up
to the top of timekeeping.c
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Eric Dumazet <eric.dumazet@gmail.com>
CC: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'kernel/time')
-rw-r--r-- | kernel/time/timekeeping.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index fbbc3c7ce7df..5df2e7e556ca 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c | |||
@@ -73,6 +73,18 @@ struct timekeeper { | |||
73 | 73 | ||
74 | static struct timekeeper timekeeper; | 74 | static struct timekeeper timekeeper; |
75 | 75 | ||
76 | /* | ||
77 | * This read-write spinlock protects us from races in SMP while | ||
78 | * playing with xtime. | ||
79 | */ | ||
80 | __cacheline_aligned_in_smp DEFINE_SEQLOCK(xtime_lock); | ||
81 | |||
82 | |||
83 | /* flag for if timekeeping is suspended */ | ||
84 | int __read_mostly timekeeping_suspended; | ||
85 | |||
86 | |||
87 | |||
76 | /** | 88 | /** |
77 | * timekeeper_setup_internals - Set up internals to use clocksource clock. | 89 | * timekeeper_setup_internals - Set up internals to use clocksource clock. |
78 | * | 90 | * |
@@ -157,18 +169,6 @@ static inline s64 timekeeping_get_ns_raw(void) | |||
157 | return clocksource_cyc2ns(cycle_delta, clock->mult, clock->shift); | 169 | return clocksource_cyc2ns(cycle_delta, clock->mult, clock->shift); |
158 | } | 170 | } |
159 | 171 | ||
160 | /* | ||
161 | * This read-write spinlock protects us from races in SMP while | ||
162 | * playing with xtime. | ||
163 | */ | ||
164 | __cacheline_aligned_in_smp DEFINE_SEQLOCK(xtime_lock); | ||
165 | |||
166 | |||
167 | |||
168 | |||
169 | /* flag for if timekeeping is suspended */ | ||
170 | int __read_mostly timekeeping_suspended; | ||
171 | |||
172 | /* must hold xtime_lock */ | 172 | /* must hold xtime_lock */ |
173 | void timekeeping_leap_insert(int leapsecond) | 173 | void timekeeping_leap_insert(int leapsecond) |
174 | { | 174 | { |