Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 104331
b: refs/heads/master
c: 89b3b1f
h: refs/heads/master
i:
  104329: d93917a
  104327: 914a2f8
v: v3
  • Loading branch information
Cyrill Gorcunov authored and Ingo Molnar committed Jul 18, 2008
1 parent 42cc443 commit c32118e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 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: 593f4a788e5d09e9f00182561437461b0b564de4
refs/heads/master: 89b3b1f41bd94085da2f08dcb719bdbf7e8e9d57
22 changes: 13 additions & 9 deletions trunk/arch/x86/kernel/apic_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ static void setup_APIC_timer(void)

#define TICK_COUNT 100000000

static void __init calibrate_APIC_clock(void)
static int __init calibrate_APIC_clock(void)
{
unsigned apic, apic_start;
unsigned long tsc, tsc_start;
Expand Down Expand Up @@ -368,6 +368,17 @@ static void __init calibrate_APIC_clock(void)
clockevent_delta2ns(0xF, &lapic_clockevent);

calibration_result = result / HZ;

/*
* Do a sanity check on the APIC calibration result
*/
if (calibration_result < (1000000 / HZ)) {
printk(KERN_WARNING
"APIC frequency too slow, disabling apic timer\n");
return -1;
}

return 0;
}

/*
Expand All @@ -394,14 +405,7 @@ void __init setup_boot_APIC_clock(void)
}

printk(KERN_INFO "Using local APIC timer interrupts.\n");
calibrate_APIC_clock();

/*
* Do a sanity check on the APIC calibration result
*/
if (calibration_result < (1000000 / HZ)) {
printk(KERN_WARNING
"APIC frequency too slow, disabling apic timer\n");
if (calibrate_APIC_clock()) {
/* No broadcast on UP ! */
if (num_possible_cpus() > 1)
setup_APIC_timer();
Expand Down

0 comments on commit c32118e

Please sign in to comment.