diff options
author | Dimitri Sivanich <sivanich@sgi.com> | 2009-10-14 10:18:48 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-10-14 12:27:10 -0400 |
commit | 8c28de4d011f37b2893ecfcec9a985c0e9bd786f (patch) | |
tree | 6c5e4a3e454c1f63beec662607fe8f24019014f5 /arch | |
parent | e47938b1faaf9e9041ae842a878901001ce20ea1 (diff) |
x86: UV RTC: Add clocksource only boot option
Add clocksource only boot option for UV RTC.
Signed-off-by: Dimitri Sivanich <sivanich@sgi.com>
LKML-Reference: <20091014141848.GC11048@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/uv_time.c | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/arch/x86/kernel/uv_time.c b/arch/x86/kernel/uv_time.c index ec14889628e0..c6324ad7c0d9 100644 --- a/arch/x86/kernel/uv_time.c +++ b/arch/x86/kernel/uv_time.c | |||
@@ -75,6 +75,7 @@ struct uv_rtc_timer_head { | |||
75 | static struct uv_rtc_timer_head **blade_info __read_mostly; | 75 | static struct uv_rtc_timer_head **blade_info __read_mostly; |
76 | 76 | ||
77 | static int uv_rtc_enable; | 77 | static int uv_rtc_enable; |
78 | static int uv_rtc_evt_enable; | ||
78 | 79 | ||
79 | /* | 80 | /* |
80 | * Hardware interface routines | 81 | * Hardware interface routines |
@@ -342,6 +343,14 @@ static int __init uv_enable_rtc(char *str) | |||
342 | } | 343 | } |
343 | __setup("uvrtc", uv_enable_rtc); | 344 | __setup("uvrtc", uv_enable_rtc); |
344 | 345 | ||
346 | static int __init uv_enable_evt_rtc(char *str) | ||
347 | { | ||
348 | uv_rtc_evt_enable = 1; | ||
349 | |||
350 | return 1; | ||
351 | } | ||
352 | __setup("uvrtcevt", uv_enable_evt_rtc); | ||
353 | |||
345 | static __init void uv_rtc_register_clockevents(struct work_struct *dummy) | 354 | static __init void uv_rtc_register_clockevents(struct work_struct *dummy) |
346 | { | 355 | { |
347 | struct clock_event_device *ced = &__get_cpu_var(cpu_ced); | 356 | struct clock_event_device *ced = &__get_cpu_var(cpu_ced); |
@@ -358,16 +367,20 @@ static __init int uv_rtc_setup_clock(void) | |||
358 | if (!uv_rtc_enable || !is_uv_system() || generic_interrupt_extension) | 367 | if (!uv_rtc_enable || !is_uv_system() || generic_interrupt_extension) |
359 | return -ENODEV; | 368 | return -ENODEV; |
360 | 369 | ||
361 | generic_interrupt_extension = uv_rtc_interrupt; | ||
362 | |||
363 | clocksource_uv.mult = clocksource_hz2mult(sn_rtc_cycles_per_second, | 370 | clocksource_uv.mult = clocksource_hz2mult(sn_rtc_cycles_per_second, |
364 | clocksource_uv.shift); | 371 | clocksource_uv.shift); |
365 | 372 | ||
366 | rc = clocksource_register(&clocksource_uv); | 373 | rc = clocksource_register(&clocksource_uv); |
367 | if (rc) { | 374 | if (rc) |
368 | generic_interrupt_extension = NULL; | 375 | printk(KERN_INFO "UV RTC clocksource failed rc %d\n", rc); |
376 | else | ||
377 | printk(KERN_INFO "UV RTC clocksource registered freq %lu MHz\n", | ||
378 | sn_rtc_cycles_per_second/(unsigned long)1E6); | ||
379 | |||
380 | if (rc || !uv_rtc_evt_enable) | ||
369 | return rc; | 381 | return rc; |
370 | } | 382 | |
383 | generic_interrupt_extension = uv_rtc_interrupt; | ||
371 | 384 | ||
372 | /* Setup and register clockevents */ | 385 | /* Setup and register clockevents */ |
373 | rc = uv_rtc_allocate_timers(); | 386 | rc = uv_rtc_allocate_timers(); |