diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2007-07-21 11:10:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-21 21:37:09 -0400 |
commit | 2618f86e0010fc6703e77af3613bac7ade46efc6 (patch) | |
tree | 745df37a76bba2126eded3d4022ddc2dd38868dd /arch/x86_64/kernel/time.c | |
parent | 6935d1f922e5f676ebe98fac700da9c5bf6acfca (diff) |
x86_64: time.c white space wreckage cleanup
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/x86_64/kernel/time.c')
-rw-r--r-- | arch/x86_64/kernel/time.c | 90 |
1 files changed, 45 insertions, 45 deletions
diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c index 8dc6f2173597..3c34e8def89d 100644 --- a/arch/x86_64/kernel/time.c +++ b/arch/x86_64/kernel/time.c | |||
@@ -220,7 +220,7 @@ unsigned long read_persistent_clock(void) | |||
220 | /* | 220 | /* |
221 | * We know that x86-64 always uses BCD format, no need to check the | 221 | * We know that x86-64 always uses BCD format, no need to check the |
222 | * config register. | 222 | * config register. |
223 | */ | 223 | */ |
224 | 224 | ||
225 | BCD_TO_BIN(sec); | 225 | BCD_TO_BIN(sec); |
226 | BCD_TO_BIN(min); | 226 | BCD_TO_BIN(min); |
@@ -233,11 +233,11 @@ unsigned long read_persistent_clock(void) | |||
233 | BCD_TO_BIN(century); | 233 | BCD_TO_BIN(century); |
234 | year += century * 100; | 234 | year += century * 100; |
235 | printk(KERN_INFO "Extended CMOS year: %d\n", century * 100); | 235 | printk(KERN_INFO "Extended CMOS year: %d\n", century * 100); |
236 | } else { | 236 | } else { |
237 | /* | 237 | /* |
238 | * x86-64 systems only exists since 2002. | 238 | * x86-64 systems only exists since 2002. |
239 | * This will work up to Dec 31, 2100 | 239 | * This will work up to Dec 31, 2100 |
240 | */ | 240 | */ |
241 | year += 2000; | 241 | year += 2000; |
242 | } | 242 | } |
243 | 243 | ||
@@ -249,45 +249,45 @@ unsigned long read_persistent_clock(void) | |||
249 | #define TICK_COUNT 100000000 | 249 | #define TICK_COUNT 100000000 |
250 | static unsigned int __init tsc_calibrate_cpu_khz(void) | 250 | static unsigned int __init tsc_calibrate_cpu_khz(void) |
251 | { | 251 | { |
252 | int tsc_start, tsc_now; | 252 | int tsc_start, tsc_now; |
253 | int i, no_ctr_free; | 253 | int i, no_ctr_free; |
254 | unsigned long evntsel3 = 0, pmc3 = 0, pmc_now = 0; | 254 | unsigned long evntsel3 = 0, pmc3 = 0, pmc_now = 0; |
255 | unsigned long flags; | 255 | unsigned long flags; |
256 | 256 | ||
257 | for (i = 0; i < 4; i++) | 257 | for (i = 0; i < 4; i++) |
258 | if (avail_to_resrv_perfctr_nmi_bit(i)) | 258 | if (avail_to_resrv_perfctr_nmi_bit(i)) |
259 | break; | 259 | break; |
260 | no_ctr_free = (i == 4); | 260 | no_ctr_free = (i == 4); |
261 | if (no_ctr_free) { | 261 | if (no_ctr_free) { |
262 | i = 3; | 262 | i = 3; |
263 | rdmsrl(MSR_K7_EVNTSEL3, evntsel3); | 263 | rdmsrl(MSR_K7_EVNTSEL3, evntsel3); |
264 | wrmsrl(MSR_K7_EVNTSEL3, 0); | 264 | wrmsrl(MSR_K7_EVNTSEL3, 0); |
265 | rdmsrl(MSR_K7_PERFCTR3, pmc3); | 265 | rdmsrl(MSR_K7_PERFCTR3, pmc3); |
266 | } else { | 266 | } else { |
267 | reserve_perfctr_nmi(MSR_K7_PERFCTR0 + i); | 267 | reserve_perfctr_nmi(MSR_K7_PERFCTR0 + i); |
268 | reserve_evntsel_nmi(MSR_K7_EVNTSEL0 + i); | 268 | reserve_evntsel_nmi(MSR_K7_EVNTSEL0 + i); |
269 | } | 269 | } |
270 | local_irq_save(flags); | 270 | local_irq_save(flags); |
271 | /* start meauring cycles, incrementing from 0 */ | 271 | /* start meauring cycles, incrementing from 0 */ |
272 | wrmsrl(MSR_K7_PERFCTR0 + i, 0); | 272 | wrmsrl(MSR_K7_PERFCTR0 + i, 0); |
273 | wrmsrl(MSR_K7_EVNTSEL0 + i, 1 << 22 | 3 << 16 | 0x76); | 273 | wrmsrl(MSR_K7_EVNTSEL0 + i, 1 << 22 | 3 << 16 | 0x76); |
274 | rdtscl(tsc_start); | 274 | rdtscl(tsc_start); |
275 | do { | 275 | do { |
276 | rdmsrl(MSR_K7_PERFCTR0 + i, pmc_now); | 276 | rdmsrl(MSR_K7_PERFCTR0 + i, pmc_now); |
277 | tsc_now = get_cycles_sync(); | 277 | tsc_now = get_cycles_sync(); |
278 | } while ((tsc_now - tsc_start) < TICK_COUNT); | 278 | } while ((tsc_now - tsc_start) < TICK_COUNT); |
279 | 279 | ||
280 | local_irq_restore(flags); | 280 | local_irq_restore(flags); |
281 | if (no_ctr_free) { | 281 | if (no_ctr_free) { |
282 | wrmsrl(MSR_K7_EVNTSEL3, 0); | 282 | wrmsrl(MSR_K7_EVNTSEL3, 0); |
283 | wrmsrl(MSR_K7_PERFCTR3, pmc3); | 283 | wrmsrl(MSR_K7_PERFCTR3, pmc3); |
284 | wrmsrl(MSR_K7_EVNTSEL3, evntsel3); | 284 | wrmsrl(MSR_K7_EVNTSEL3, evntsel3); |
285 | } else { | 285 | } else { |
286 | release_perfctr_nmi(MSR_K7_PERFCTR0 + i); | 286 | release_perfctr_nmi(MSR_K7_PERFCTR0 + i); |
287 | release_evntsel_nmi(MSR_K7_EVNTSEL0 + i); | 287 | release_evntsel_nmi(MSR_K7_EVNTSEL0 + i); |
288 | } | 288 | } |
289 | 289 | ||
290 | return pmc_now * tsc_khz / (tsc_now - tsc_start); | 290 | return pmc_now * tsc_khz / (tsc_now - tsc_start); |
291 | } | 291 | } |
292 | 292 | ||
293 | /* | 293 | /* |
@@ -315,7 +315,7 @@ static unsigned int __init pit_calibrate_tsc(void) | |||
315 | end = get_cycles_sync(); | 315 | end = get_cycles_sync(); |
316 | 316 | ||
317 | spin_unlock_irqrestore(&i8253_lock, flags); | 317 | spin_unlock_irqrestore(&i8253_lock, flags); |
318 | 318 | ||
319 | return (end - start) / 50; | 319 | return (end - start) / 50; |
320 | } | 320 | } |
321 | 321 | ||
@@ -360,7 +360,7 @@ static struct irqaction irq0 = { | |||
360 | .handler = timer_interrupt, | 360 | .handler = timer_interrupt, |
361 | .flags = IRQF_DISABLED | IRQF_IRQPOLL, | 361 | .flags = IRQF_DISABLED | IRQF_IRQPOLL, |
362 | .mask = CPU_MASK_NONE, | 362 | .mask = CPU_MASK_NONE, |
363 | .name = "timer" | 363 | .name = "timer" |
364 | }; | 364 | }; |
365 | 365 | ||
366 | void __init time_init(void) | 366 | void __init time_init(void) |
@@ -373,7 +373,7 @@ void __init time_init(void) | |||
373 | 373 | ||
374 | if (hpet_use_timer) { | 374 | if (hpet_use_timer) { |
375 | /* set tick_nsec to use the proper rate for HPET */ | 375 | /* set tick_nsec to use the proper rate for HPET */ |
376 | tick_nsec = TICK_NSEC_HPET; | 376 | tick_nsec = TICK_NSEC_HPET; |
377 | tsc_khz = hpet_calibrate_tsc(); | 377 | tsc_khz = hpet_calibrate_tsc(); |
378 | timename = "HPET"; | 378 | timename = "HPET"; |
379 | } else { | 379 | } else { |