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

[Xen-changelog] [xen-unstable] x86: Define APIC_TIMER_MODE_xxx in apicdef.h



# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1292410534 0
# Node ID 4e93a604dafef84b7fc0ee0c6d87b51810f6dccd
# Parent  644c8d0d7aedbb49c587da5b812a2e76dfa5a128
x86: Define APIC_TIMER_MODE_xxx in apicdef.h

Signed-off-by: Wei Gang <gang.wei@xxxxxxxxx>
---
 xen/arch/x86/apic.c           |    7 +------
 xen/arch/x86/hvm/vlapic.c     |    4 ++--
 xen/include/asm-x86/apicdef.h |    5 ++++-
 3 files changed, 7 insertions(+), 9 deletions(-)

diff -r 644c8d0d7aed -r 4e93a604dafe xen/arch/x86/apic.c
--- a/xen/arch/x86/apic.c       Wed Dec 15 10:49:57 2010 +0000
+++ b/xen/arch/x86/apic.c       Wed Dec 15 10:55:34 2010 +0000
@@ -37,11 +37,6 @@
 #include <asm/asm_defns.h> /* for BUILD_SMP_INTERRUPT */
 #include <mach_apic.h>
 #include <io_ports.h>
-
-#define APIC_TIMER_MODE_ONESHOT         (0 << 17)
-#define APIC_TIMER_MODE_PERIODIC        (1 << 17)
-#define APIC_TIMER_MODE_TSC_DEADLINE    (2 << 17)
-#define APIC_TIMER_MODE_MASK            (3 << 17)
 
 static int tdt_enabled __read_mostly;
 static int tdt_enable __initdata = 1;
@@ -1163,7 +1158,7 @@ static void __setup_APIC_LVTT(unsigned i
 
     ver = GET_APIC_VERSION(apic_read(APIC_LVR));
     /* NB. Xen uses local APIC timer in one-shot mode. */
-    lvtt_value = /*APIC_LVT_TIMER_PERIODIC |*/ LOCAL_TIMER_VECTOR;
+    lvtt_value = /*APIC_TIMER_MODE_PERIODIC |*/ LOCAL_TIMER_VECTOR;
     if (!APIC_INTEGRATED(ver))
         lvtt_value |= SET_APIC_TIMER_BASE(APIC_TIMER_BASE_DIV);
 
diff -r 644c8d0d7aed -r 4e93a604dafe xen/arch/x86/hvm/vlapic.c
--- a/xen/arch/x86/hvm/vlapic.c Wed Dec 15 10:49:57 2010 +0000
+++ b/xen/arch/x86/hvm/vlapic.c Wed Dec 15 10:55:34 2010 +0000
@@ -56,7 +56,7 @@ static unsigned int vlapic_lvt_mask[VLAP
 static unsigned int vlapic_lvt_mask[VLAPIC_LVT_NUM] =
 {
      /* LVTT */
-     LVT_MASK | APIC_LVT_TIMER_PERIODIC,
+     LVT_MASK | APIC_TIMER_MODE_PERIODIC,
      /* LVTTHMR */
      LVT_MASK | APIC_MODE_MASK,
      /* LVTPC */
@@ -79,7 +79,7 @@ static unsigned int vlapic_lvt_mask[VLAP
     (vlapic_get_reg(vlapic, lvt_type) & APIC_MODE_MASK)
 
 #define vlapic_lvtt_period(vlapic)                              \
-    (vlapic_get_reg(vlapic, APIC_LVTT) & APIC_LVT_TIMER_PERIODIC)
+    (vlapic_get_reg(vlapic, APIC_LVTT) & APIC_TIMER_MODE_PERIODIC)
 
 
 /*
diff -r 644c8d0d7aed -r 4e93a604dafe xen/include/asm-x86/apicdef.h
--- a/xen/include/asm-x86/apicdef.h     Wed Dec 15 10:49:57 2010 +0000
+++ b/xen/include/asm-x86/apicdef.h     Wed Dec 15 10:55:34 2010 +0000
@@ -90,7 +90,10 @@
 #define                        APIC_TIMER_BASE_CLKIN           0x0
 #define                        APIC_TIMER_BASE_TMBASE          0x1
 #define                        APIC_TIMER_BASE_DIV             0x2
-#define                        APIC_LVT_TIMER_PERIODIC         (1<<17)
+#define                        APIC_TIMER_MODE_MASK            (0x3<<17)
+#define                        APIC_TIMER_MODE_ONESHOT         (0x0<<17)
+#define                        APIC_TIMER_MODE_PERIODIC        (0x1<<17)
+#define                        APIC_TIMER_MODE_TSC_DEADLINE    (0x2<<17)
 #define                        APIC_LVT_MASKED                 (1<<16)
 #define                        APIC_LVT_LEVEL_TRIGGER          (1<<15)
 #define                        APIC_LVT_REMOTE_IRR             (1<<14)

_______________________________________________
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®.