aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/apic_64.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2007-10-12 17:04:07 -0400
committerThomas Gleixner <tglx@inhelltoy.tec.linutronix.de>2007-10-12 17:04:07 -0400
commitc4d58cbd158dc9b30c55c0e3881ae7c6b8843d5a (patch)
tree8c1fc586db6bf531323a485d8390cba45d4d31f3 /arch/x86/kernel/apic_64.c
parentabc63fcd3cc61876b2d6f5b0d08021bd1538385c (diff)
x86_64: remove nested irq disables
setup_APIC_timer disables interrupts anyway. So no need to do the same in setup_boot_APIC_clock and setup_secondary_APIC_clock. Disable interrupts explicit in the calibration code. 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/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)