Skip to content

Commit

Permalink
x86: preset apic clockevents multiplicator
Browse files Browse the repository at this point in the history
The check for an unitialized clock event device triggers, when the local
apic timer is registered as a dummy clock event device for broadcasting.
Preset the multiplicator to avoid a false positive.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Thomas Gleixner authored and Ingo Molnar committed Jan 30, 2008
1 parent c2b84b3 commit 9d09951
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion arch/x86/kernel/apic_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,10 @@ void __init setup_boot_APIC_clock(void)
*/
if (local_apic_timer_disabled) {
/* No broadcast on UP ! */
if (num_possible_cpus() > 1)
if (num_possible_cpus() > 1) {
lapic_clockevent.mult = 1;
setup_APIC_timer();
}
return;
}

Expand Down
4 changes: 3 additions & 1 deletion arch/x86/kernel/apic_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -375,8 +375,10 @@ void __init setup_boot_APIC_clock(void)
if (disable_apic_timer) {
printk(KERN_INFO "Disabling APIC timer\n");
/* No broadcast on UP ! */
if (num_possible_cpus() > 1)
if (num_possible_cpus() > 1) {
lapic_clockevent.mult = 1;
setup_APIC_timer();
}
return;
}

Expand Down

0 comments on commit 9d09951

Please sign in to comment.