[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] x86: Small APIC timer initialisation cleanup



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1275893250 -3600
# Node ID fea30506900b6069a548400d2beae9d5453809d5
# Parent  0251bbc0a9a879126bce65e47e4410575cfa73de
x86: Small APIC timer initialisation cleanup

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/apic.c    |   16 ++++++----------
 xen/arch/x86/smpboot.c |    2 +-
 2 files changed, 7 insertions(+), 11 deletions(-)

diff -r 0251bbc0a9a8 -r fea30506900b xen/arch/x86/apic.c
--- a/xen/arch/x86/apic.c       Mon Jun 07 07:38:09 2010 +0100
+++ b/xen/arch/x86/apic.c       Mon Jun 07 07:47:30 2010 +0100
@@ -1064,11 +1064,11 @@ static void __setup_APIC_LVTT(unsigned i
     apic_write_around(APIC_TMICT, clocks/APIC_DIVISOR);
 }
 
-static void __devinit setup_APIC_timer(unsigned int clocks)
+static void __devinit setup_APIC_timer(void)
 {
     unsigned long flags;
     local_irq_save(flags);
-    __setup_APIC_LVTT(clocks);
+    __setup_APIC_LVTT(0);
     local_irq_restore(flags);
 }
 
@@ -1159,8 +1159,6 @@ static int __init calibrate_APIC_clock(v
     return result;
 }
 
-static unsigned int calibration_result;
-
 void __init setup_boot_APIC_clock(void)
 {
     unsigned long flags;
@@ -1169,18 +1167,16 @@ void __init setup_boot_APIC_clock(void)
 
     local_irq_save(flags);
 
-    calibration_result = calibrate_APIC_clock();
-    /*
-     * Now set up the timer for real.
-     */
-    setup_APIC_timer(calibration_result);
+    calibrate_APIC_clock();
+
+    setup_APIC_timer();
     
     local_irq_restore(flags);
 }
 
 void __devinit setup_secondary_APIC_clock(void)
 {
-    setup_APIC_timer(calibration_result);
+    setup_APIC_timer();
 }
 
 void disable_APIC_timer(void)
diff -r 0251bbc0a9a8 -r fea30506900b xen/arch/x86/smpboot.c
--- a/xen/arch/x86/smpboot.c    Mon Jun 07 07:38:09 2010 +0100
+++ b/xen/arch/x86/smpboot.c    Mon Jun 07 07:47:30 2010 +0100
@@ -348,7 +348,7 @@ void start_secondary(void *unused)
     construct_percpu_idt(cpu);
 
     setup_secondary_APIC_clock();
-    enable_APIC_timer();
+
     /*
      * low-memory mappings have been cleared, flush them from
      * the local TLBs too.

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.