diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2007-10-12 17:04:06 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@inhelltoy.tec.linutronix.de> | 2007-10-12 17:04:06 -0400 |
commit | b58eb00df7f7f80b7f456bf8fb740fddf14408ba (patch) | |
tree | b13160a5f0bafe870abb74e7a927c18008993fe0 /arch | |
parent | d03030e917047cf7f475e641cd2d6e83647392b0 (diff) |
x86_64: Remove APIC_DIVISOR
APIC_DIVISOR is rather useless. It makes the calibration result more
accurate in the first place, but we discard this later when we write
the value to the APIC timer by dividing the calibration value by
APIC_DIVISOR.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/apic_64.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/x86/kernel/apic_64.c b/arch/x86/kernel/apic_64.c index b08c08ed36a7..f746f9dc8ced 100644 --- a/arch/x86/kernel/apic_64.c +++ b/arch/x86/kernel/apic_64.c | |||
@@ -759,8 +759,6 @@ void __init init_apic_mappings(void) | |||
759 | * P5 APIC double write bug. | 759 | * P5 APIC double write bug. |
760 | */ | 760 | */ |
761 | 761 | ||
762 | #define APIC_DIVISOR 16 | ||
763 | |||
764 | static void __setup_APIC_LVTT(unsigned int clocks, int oneshot, int irqen) | 762 | static void __setup_APIC_LVTT(unsigned int clocks, int oneshot, int irqen) |
765 | { | 763 | { |
766 | unsigned int lvtt_value, tmp_value; | 764 | unsigned int lvtt_value, tmp_value; |
@@ -782,7 +780,7 @@ static void __setup_APIC_LVTT(unsigned int clocks, int oneshot, int irqen) | |||
782 | | APIC_TDR_DIV_16); | 780 | | APIC_TDR_DIV_16); |
783 | 781 | ||
784 | if (!oneshot) | 782 | if (!oneshot) |
785 | apic_write(APIC_TMICT, clocks/APIC_DIVISOR); | 783 | apic_write(APIC_TMICT, clocks); |
786 | } | 784 | } |
787 | 785 | ||
788 | static void setup_APIC_timer(unsigned int clocks) | 786 | static void setup_APIC_timer(unsigned int clocks) |
@@ -835,7 +833,7 @@ static void __init calibrate_APIC_clock(void) | |||
835 | * | 833 | * |
836 | * No interrupt enable ! | 834 | * No interrupt enable ! |
837 | */ | 835 | */ |
838 | __setup_APIC_LVTT(4000000000, 0, 0); | 836 | __setup_APIC_LVTT(250000000, 0, 0); |
839 | 837 | ||
840 | apic_start = apic_read(APIC_TMCCT); | 838 | apic_start = apic_read(APIC_TMCCT); |
841 | #ifdef CONFIG_X86_PM_TIMER | 839 | #ifdef CONFIG_X86_PM_TIMER |
@@ -862,7 +860,7 @@ static void __init calibrate_APIC_clock(void) | |||
862 | printk(KERN_INFO "Detected %d.%03d MHz APIC timer.\n", | 860 | printk(KERN_INFO "Detected %d.%03d MHz APIC timer.\n", |
863 | result / 1000 / 1000, result / 1000 % 1000); | 861 | result / 1000 / 1000, result / 1000 % 1000); |
864 | 862 | ||
865 | calibration_result = result * APIC_DIVISOR / HZ; | 863 | calibration_result = result / HZ; |
866 | } | 864 | } |
867 | 865 | ||
868 | void __init setup_boot_APIC_clock (void) | 866 | void __init setup_boot_APIC_clock (void) |