aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/apic_64.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/apic_64.c')
-rw-r--r--arch/x86/kernel/apic_64.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/x86/kernel/apic_64.c b/arch/x86/kernel/apic_64.c
index f74b1c20e5c0..40938ef99dc2 100644
--- a/arch/x86/kernel/apic_64.c
+++ b/arch/x86/kernel/apic_64.c
@@ -826,6 +826,9 @@ static void __init calibrate_APIC_clock(void)
826 unsigned apic, apic_start; 826 unsigned apic, apic_start;
827 unsigned long tsc, tsc_start; 827 unsigned long tsc, tsc_start;
828 int result; 828 int result;
829
830 local_irq_disable();
831
829 /* 832 /*
830 * Put whatever arbitrary (but long enough) timeout 833 * Put whatever arbitrary (but long enough) timeout
831 * value into the APIC clock, we just want to get the 834 * value into the APIC clock, we just want to get the
@@ -855,6 +858,9 @@ static void __init calibrate_APIC_clock(void)
855 result = (apic_start - apic) * 1000L * tsc_khz / 858 result = (apic_start - apic) * 1000L * tsc_khz /
856 (tsc - tsc_start); 859 (tsc - tsc_start);
857 } 860 }
861
862 local_irq_enable();
863
858 printk(KERN_DEBUG "APIC timer calibration result %d\n", result); 864 printk(KERN_DEBUG "APIC timer calibration result %d\n", result);
859 865
860 printk(KERN_INFO "Detected %d.%03d MHz APIC timer.\n", 866 printk(KERN_INFO "Detected %d.%03d MHz APIC timer.\n",
@@ -873,22 +879,16 @@ void __init setup_boot_APIC_clock (void)
873 printk(KERN_INFO "Using local APIC timer interrupts.\n"); 879 printk(KERN_INFO "Using local APIC timer interrupts.\n");
874 using_apic_timer = 1; 880 using_apic_timer = 1;
875 881
876 local_irq_disable();
877
878 calibrate_APIC_clock(); 882 calibrate_APIC_clock();
879 /* 883 /*
880 * Now set up the timer for real. 884 * Now set up the timer for real.
881 */ 885 */
882 setup_APIC_timer(); 886 setup_APIC_timer();
883
884 local_irq_enable();
885} 887}
886 888
887void __cpuinit setup_secondary_APIC_clock(void) 889void __cpuinit setup_secondary_APIC_clock(void)
888{ 890{
889 local_irq_disable(); /* FIXME: Do we need this? --RR */
890 setup_APIC_timer(); 891 setup_APIC_timer();
891 local_irq_enable();
892} 892}
893 893
894void disable_APIC_timer(void) 894void disable_APIC_timer(void)