diff options
author | Dimitri Sivanich <sivanich@sgi.com> | 2009-11-20 16:48:26 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-11-23 13:41:30 -0500 |
commit | 581f202bcd60acbc3af1f5faa429e570c512f8a3 (patch) | |
tree | ce54e18f1f77eb43b8e79730e72247b3c97a999b | |
parent | 4a4de9c7d7111ce4caf422b856756125d8304f9d (diff) |
x86: UV RTC: Always enable RTC clocksource
Always enable the RTC clocksource on UV systems.
Signed-off-by: Dimitri Sivanich <sivanich@sgi.com>
LKML-Reference: <20091120214826.GA20016@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r-- | arch/x86/kernel/uv_time.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/arch/x86/kernel/uv_time.c b/arch/x86/kernel/uv_time.c index 3da7b1d8bfd3..3c84aa001c11 100644 --- a/arch/x86/kernel/uv_time.c +++ b/arch/x86/kernel/uv_time.c | |||
@@ -74,7 +74,6 @@ struct uv_rtc_timer_head { | |||
74 | */ | 74 | */ |
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; | ||
78 | static int uv_rtc_evt_enable; | 77 | static int uv_rtc_evt_enable; |
79 | 78 | ||
80 | /* | 79 | /* |
@@ -335,14 +334,6 @@ static void uv_rtc_interrupt(void) | |||
335 | ced->event_handler(ced); | 334 | ced->event_handler(ced); |
336 | } | 335 | } |
337 | 336 | ||
338 | static int __init uv_enable_rtc(char *str) | ||
339 | { | ||
340 | uv_rtc_enable = 1; | ||
341 | |||
342 | return 1; | ||
343 | } | ||
344 | __setup("uvrtc", uv_enable_rtc); | ||
345 | |||
346 | static int __init uv_enable_evt_rtc(char *str) | 337 | static int __init uv_enable_evt_rtc(char *str) |
347 | { | 338 | { |
348 | uv_rtc_evt_enable = 1; | 339 | uv_rtc_evt_enable = 1; |
@@ -364,12 +355,16 @@ static __init int uv_rtc_setup_clock(void) | |||
364 | { | 355 | { |
365 | int rc; | 356 | int rc; |
366 | 357 | ||
367 | if (!uv_rtc_enable || !is_uv_system() || x86_platform_ipi_callback) | 358 | if (!is_uv_system()) |
368 | return -ENODEV; | 359 | return -ENODEV; |
369 | 360 | ||
370 | clocksource_uv.mult = clocksource_hz2mult(sn_rtc_cycles_per_second, | 361 | clocksource_uv.mult = clocksource_hz2mult(sn_rtc_cycles_per_second, |
371 | clocksource_uv.shift); | 362 | clocksource_uv.shift); |
372 | 363 | ||
364 | /* If single blade, prefer tsc */ | ||
365 | if (uv_num_possible_blades() == 1) | ||
366 | clocksource_uv.rating = 250; | ||
367 | |||
373 | rc = clocksource_register(&clocksource_uv); | 368 | rc = clocksource_register(&clocksource_uv); |
374 | if (rc) | 369 | if (rc) |
375 | printk(KERN_INFO "UV RTC clocksource failed rc %d\n", rc); | 370 | printk(KERN_INFO "UV RTC clocksource failed rc %d\n", rc); |
@@ -377,7 +372,7 @@ static __init int uv_rtc_setup_clock(void) | |||
377 | printk(KERN_INFO "UV RTC clocksource registered freq %lu MHz\n", | 372 | printk(KERN_INFO "UV RTC clocksource registered freq %lu MHz\n", |
378 | sn_rtc_cycles_per_second/(unsigned long)1E6); | 373 | sn_rtc_cycles_per_second/(unsigned long)1E6); |
379 | 374 | ||
380 | if (rc || !uv_rtc_evt_enable) | 375 | if (rc || !uv_rtc_evt_enable || x86_platform_ipi_callback) |
381 | return rc; | 376 | return rc; |
382 | 377 | ||
383 | /* Setup and register clockevents */ | 378 | /* Setup and register clockevents */ |