Commit 81608f3c authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Ingo Molnar

x86: apic - unify APIC_DIVISOR

Use APIC_DIVISOR being set to 16 for both 32/64bit
mode. To escape APIC timer underflow during calibration
set it to the maximum possible value.

Also typo error (CONFG instead of proper CONFIG) fixed.
The error was caught by Venkatesh Pallipadi, thanks a lot Venkatesh!

See details on http://lkml.org/lkml/2008/10/9/425Reported-by: default avatarVenkatesh Pallipad <venkatesh.pallipadi@intel.com>
Signed-off-by: default avatarCyrill Gorcunov <gorcunov@gmail.com>
Acked-by: default avatar"Maciej W. Rozycki" <macro@linux-mips.org>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 4c66a73f
...@@ -332,11 +332,7 @@ int lapic_get_maxlvt(void) ...@@ -332,11 +332,7 @@ int lapic_get_maxlvt(void)
*/ */
/* Clock divisor */ /* Clock divisor */
#ifdef CONFG_X86_64
#define APIC_DIVISOR 1
#else
#define APIC_DIVISOR 16 #define APIC_DIVISOR 16
#endif
/* /*
* This function sets up the local APIC timer, with a timeout of * This function sets up the local APIC timer, with a timeout of
...@@ -592,10 +588,10 @@ static int __init calibrate_APIC_clock(void) ...@@ -592,10 +588,10 @@ static int __init calibrate_APIC_clock(void)
global_clock_event->event_handler = lapic_cal_handler; global_clock_event->event_handler = lapic_cal_handler;
/* /*
* Setup the APIC counter to 1e9. There is no way the lapic * Setup the APIC counter to maximum. There is no way the lapic
* can underflow in the 100ms detection time frame * can underflow in the 100ms detection time frame
*/ */
__setup_APIC_LVTT(1000000000, 0, 0); __setup_APIC_LVTT(0xffffffff, 0, 0);
/* Let the interrupts run */ /* Let the interrupts run */
local_irq_enable(); local_irq_enable();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment