x86: move some APIC related macros to apicdef.h
authorFeng Wu <feng.wu@intel.com>
Tue, 17 Nov 2015 12:21:52 +0000 (13:21 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 17 Nov 2015 12:21:52 +0000 (13:21 +0100)
Move some APIC related macros to apicdef.h, so they can be used
outside of vlapic.c.

Signed-off-by: Feng Wu <feng.wu@intel.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/hvm/vlapic.c
xen/include/asm-x86/apicdef.h

index b893b4035b94584169889470ad0ec8d6122659eb..9b7c87148439a56aeadfab40bd498cffa184999b 100644 (file)
@@ -65,11 +65,6 @@ static const unsigned int vlapic_lvt_mask[VLAPIC_LVT_NUM] =
      LVT_MASK
 };
 
-/* Following could belong in apicdef.h */
-#define APIC_SHORT_MASK                  0xc0000
-#define APIC_DEST_NOSHORT                0x0
-#define APIC_DEST_MASK                   0x800
-
 #define vlapic_lvt_vector(vlapic, lvt_type)                     \
     (vlapic_get_reg(vlapic, lvt_type) & APIC_VECTOR_MASK)
 
index 6069fce33158ef13942bd84457d68aba10d5fc32..875228713fe2426ac3ef29d36abda04b27305806 100644 (file)
 #define                        APIC_ESR_RECVILL        0x00040
 #define                        APIC_ESR_ILLREGA        0x00080
 #define                APIC_ICR        0x300
+#define                        APIC_DEST_NOSHORT       0x00000
 #define                        APIC_DEST_SELF          0x40000
 #define                        APIC_DEST_ALLINC        0x80000
 #define                        APIC_DEST_ALLBUT        0xC0000
+#define                        APIC_SHORT_MASK         0xC0000
 #define                        APIC_ICR_RR_MASK        0x30000
 #define                        APIC_ICR_RR_INVALID     0x00000
 #define                        APIC_ICR_RR_INPROG      0x10000
@@ -64,6 +66,7 @@
 #define                        APIC_INT_LEVELTRIG      0x08000
 #define                        APIC_INT_ASSERT         0x04000
 #define                        APIC_ICR_BUSY           0x01000
+#define                        APIC_DEST_MASK          0x00800
 #define                        APIC_DEST_LOGICAL       0x00800
 #define                        APIC_DEST_PHYSICAL      0x00000
 #define                        APIC_DM_FIXED           0x00000