Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 67755
b: refs/heads/master
c: d03030e
h: refs/heads/master
i:
  67753: 9e33cf2
  67751: 76c97dd
v: v3
  • Loading branch information
Thomas Gleixner authored and Thomas Gleixner committed Oct 12, 2007
1 parent 3a1c6ed commit b1d38a6
Show file tree
Hide file tree
Showing 2 changed files with 7 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: 500ff08b76878a45391fffc7a4c972883503050e
refs/heads/master: d03030e917047cf7f475e641cd2d6e83647392b0
15 changes: 6 additions & 9 deletions trunk/arch/x86/kernel/apic_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ static struct resource lapic_resource = {
.flags = IORESOURCE_MEM | IORESOURCE_BUSY,
};

static unsigned int calibration_result;

/*
* cpu_mask that denotes the CPUs that needs timer interrupt coming in as
* IPIs in place of local APIC timers
Expand Down Expand Up @@ -821,7 +823,7 @@ static void setup_APIC_timer(unsigned int clocks)

#define TICK_COUNT 100000000

static int __init calibrate_APIC_clock(void)
static void __init calibrate_APIC_clock(void)
{
unsigned apic, apic_start;
unsigned long tsc, tsc_start;
Expand Down Expand Up @@ -855,17 +857,14 @@ static int __init calibrate_APIC_clock(void)
result = (apic_start - apic) * 1000L * tsc_khz /
(tsc - tsc_start);
}
printk("result %d\n", result);

printk(KERN_DEBUG "APIC timer calibration result %d\n", result);

printk(KERN_INFO "Detected %d.%03d MHz APIC timer.\n",
result / 1000 / 1000, result / 1000 % 1000);

return result * APIC_DIVISOR / HZ;
calibration_result = result * APIC_DIVISOR / HZ;
}

static unsigned int calibration_result;

void __init setup_boot_APIC_clock (void)
{
if (disable_apic_timer) {
Expand All @@ -878,7 +877,7 @@ void __init setup_boot_APIC_clock (void)

local_irq_disable();

calibration_result = calibrate_APIC_clock();
calibrate_APIC_clock();
/*
* Now set up the timer for real.
*/
Expand Down Expand Up @@ -985,8 +984,6 @@ void setup_APIC_extended_lvt(unsigned char lvt_off, unsigned char vector,
apic_write(reg, v);
}

#undef APIC_DIVISOR

/*
* Local timer interrupt handler. It does both profiling and
* process statistics/rescheduling.
Expand Down

0 comments on commit b1d38a6

Please sign in to comment.