diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /arch/ia64/kernel/time.c | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'arch/ia64/kernel/time.c')
-rw-r--r-- | arch/ia64/kernel/time.c | 32 |
1 files changed, 9 insertions, 23 deletions
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c index ed6f22eb5b12..85118dfe9bb5 100644 --- a/arch/ia64/kernel/time.c +++ b/arch/ia64/kernel/time.c | |||
@@ -36,7 +36,7 @@ | |||
36 | static cycle_t itc_get_cycles(struct clocksource *cs); | 36 | static cycle_t itc_get_cycles(struct clocksource *cs); |
37 | 37 | ||
38 | struct fsyscall_gtod_data_t fsyscall_gtod_data = { | 38 | struct fsyscall_gtod_data_t fsyscall_gtod_data = { |
39 | .lock = SEQLOCK_UNLOCKED, | 39 | .lock = __SEQLOCK_UNLOCKED(fsyscall_gtod_data.lock), |
40 | }; | 40 | }; |
41 | 41 | ||
42 | struct itc_jitter_data_t itc_jitter_data; | 42 | struct itc_jitter_data_t itc_jitter_data; |
@@ -73,8 +73,6 @@ static struct clocksource clocksource_itc = { | |||
73 | .rating = 350, | 73 | .rating = 350, |
74 | .read = itc_get_cycles, | 74 | .read = itc_get_cycles, |
75 | .mask = CLOCKSOURCE_MASK(64), | 75 | .mask = CLOCKSOURCE_MASK(64), |
76 | .mult = 0, /*to be calculated*/ | ||
77 | .shift = 16, | ||
78 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 76 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
79 | #ifdef CONFIG_PARAVIRT | 77 | #ifdef CONFIG_PARAVIRT |
80 | .resume = paravirt_clocksource_resume, | 78 | .resume = paravirt_clocksource_resume, |
@@ -168,7 +166,7 @@ timer_interrupt (int irq, void *dev_id) | |||
168 | { | 166 | { |
169 | unsigned long new_itm; | 167 | unsigned long new_itm; |
170 | 168 | ||
171 | if (unlikely(cpu_is_offline(smp_processor_id()))) { | 169 | if (cpu_is_offline(smp_processor_id())) { |
172 | return IRQ_HANDLED; | 170 | return IRQ_HANDLED; |
173 | } | 171 | } |
174 | 172 | ||
@@ -190,19 +188,10 @@ timer_interrupt (int irq, void *dev_id) | |||
190 | 188 | ||
191 | new_itm += local_cpu_data->itm_delta; | 189 | new_itm += local_cpu_data->itm_delta; |
192 | 190 | ||
193 | if (smp_processor_id() == time_keeper_id) { | 191 | if (smp_processor_id() == time_keeper_id) |
194 | /* | 192 | xtime_update(1); |
195 | * Here we are in the timer irq handler. We have irqs locally | 193 | |
196 | * disabled, but we don't know if the timer_bh is running on | 194 | local_cpu_data->itm_next = new_itm; |
197 | * another CPU. We need to avoid to SMP race by acquiring the | ||
198 | * xtime_lock. | ||
199 | */ | ||
200 | write_seqlock(&xtime_lock); | ||
201 | do_timer(1); | ||
202 | local_cpu_data->itm_next = new_itm; | ||
203 | write_sequnlock(&xtime_lock); | ||
204 | } else | ||
205 | local_cpu_data->itm_next = new_itm; | ||
206 | 195 | ||
207 | if (time_after(new_itm, ia64_get_itc())) | 196 | if (time_after(new_itm, ia64_get_itc())) |
208 | break; | 197 | break; |
@@ -222,7 +211,7 @@ skip_process_time_accounting: | |||
222 | * comfort, we increase the safety margin by | 211 | * comfort, we increase the safety margin by |
223 | * intentionally dropping the next tick(s). We do NOT | 212 | * intentionally dropping the next tick(s). We do NOT |
224 | * update itm.next because that would force us to call | 213 | * update itm.next because that would force us to call |
225 | * do_timer() which in turn would let our clock run | 214 | * xtime_update() which in turn would let our clock run |
226 | * too fast (with the potentially devastating effect | 215 | * too fast (with the potentially devastating effect |
227 | * of losing monotony of time). | 216 | * of losing monotony of time). |
228 | */ | 217 | */ |
@@ -374,11 +363,8 @@ ia64_init_itm (void) | |||
374 | ia64_cpu_local_tick(); | 363 | ia64_cpu_local_tick(); |
375 | 364 | ||
376 | if (!itc_clocksource) { | 365 | if (!itc_clocksource) { |
377 | /* Sort out mult/shift values: */ | 366 | clocksource_register_hz(&clocksource_itc, |
378 | clocksource_itc.mult = | 367 | local_cpu_data->itc_freq); |
379 | clocksource_hz2mult(local_cpu_data->itc_freq, | ||
380 | clocksource_itc.shift); | ||
381 | clocksource_register(&clocksource_itc); | ||
382 | itc_clocksource = &clocksource_itc; | 368 | itc_clocksource = &clocksource_itc; |
383 | } | 369 | } |
384 | } | 370 | } |