Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79696
b: refs/heads/master
c: 316da3b
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Gleixner authored and Ingo Molnar committed Jan 30, 2008
1 parent 1506c9b commit 2896e06
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: df619e6bafeb8e129aba3173d384544d7fa6e3c2
refs/heads/master: 316da3b3fc8efa9a5d2c99e0d449f01ff38c6aba
10 changes: 9 additions & 1 deletion trunk/arch/x86/kernel/i8253.c
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,15 @@ static struct clocksource clocksource_pit = {

static int __init init_pit_clocksource(void)
{
if (num_possible_cpus() > 1) /* PIT does not scale! */
/*
* Several reasons not to register PIT as a clocksource:
*
* - On SMP PIT does not scale due to i8253_lock
* - when HPET is enabled
* - when local APIC timer is active (PIT is switched off)
*/
if (num_possible_cpus() > 1 || is_hpet_enabled() ||
pit_clockevent.mode != CLOCK_EVT_MODE_PERIODIC)
return 0;

clocksource_pit.mult = clocksource_hz2mult(CLOCK_TICK_RATE, 20);
Expand Down

0 comments on commit 2896e06

Please sign in to comment.