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

[Xen-changelog] [xen-unstable] x86: Fix the build.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1253625069 -3600
# Node ID 4ad29157dcd73f76999b4046518f26d79f4067b6
# Parent  5094980f9e167fddf6f714fd73d6a248f1f4cd9a
x86: Fix the build.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/hvm/vmx/vpmu_core2.c |    8 ++++----
 xen/arch/x86/tboot.c              |   22 +++++++++++-----------
 2 files changed, 15 insertions(+), 15 deletions(-)

diff -r 5094980f9e16 -r 4ad29157dcd7 xen/arch/x86/hvm/vmx/vpmu_core2.c
--- a/xen/arch/x86/hvm/vmx/vpmu_core2.c Tue Sep 22 09:18:25 2009 +0100
+++ b/xen/arch/x86/hvm/vmx/vpmu_core2.c Tue Sep 22 14:11:09 2009 +0100
@@ -421,23 +421,23 @@ static int core2_vpmu_do_wrmsr(struct cp
     core2_vpmu_save_msr_context(v, type, index, msr_content);
     if ( type != MSR_TYPE_GLOBAL )
     {
-        unsigned long mask;
+        u64 mask;
         int inject_gp = 0;
         switch ( type )
         {
         case MSR_TYPE_ARCH_CTRL:      /* MSR_P6_EVNTSEL[0,...] */
-            mask = ~((1L << 32) - 1);
+            mask = ~((1ull << 32) - 1);
             if (msr_content & mask)
                 inject_gp = 1;
             break;
         case MSR_TYPE_CTRL:           /* IA32_FIXED_CTR_CTRL */
             /* 4 bits per counter, currently 3 fixed counters implemented. */
-            mask = ~((1L << (3 * 4)) - 1);
+            mask = ~((1ull << (3 * 4)) - 1);
             if (msr_content & mask)
                 inject_gp = 1;
             break;
         case MSR_TYPE_COUNTER:        /* IA32_FIXED_CTR[0-2] */
-            mask = ~((1L << core2_get_bitwidth_fix_count()) - 1);
+            mask = ~((1ull << core2_get_bitwidth_fix_count()) - 1);
             if (msr_content & mask)
                 inject_gp = 1;
             break;
diff -r 5094980f9e16 -r 4ad29157dcd7 xen/arch/x86/tboot.c
--- a/xen/arch/x86/tboot.c      Tue Sep 22 09:18:25 2009 +0100
+++ b/xen/arch/x86/tboot.c      Tue Sep 22 14:11:09 2009 +0100
@@ -72,19 +72,19 @@ static void tboot_copy_memory(unsigned c
 static void tboot_copy_memory(unsigned char *va, uint32_t size,
                               unsigned long pa)
 {
-    uint32_t map_base;
-    unsigned long map_addr;
-    int i;
-
-    map_base = 0;
-    for (i = 0; i < size; i++) {
-        if ( map_base != PFN_DOWN(pa + i) ) {
+    unsigned long map_base = 0;
+    unsigned char *map_addr = NULL;
+    unsigned int i;
+
+    for ( i = 0; i < size; i++ )
+    {
+        if ( map_base != PFN_DOWN(pa + i) )
+        {
             map_base = PFN_DOWN(pa + i);
             set_fixmap(FIX_TBOOT_MAP_ADDRESS, map_base << PAGE_SHIFT);
-            map_addr = (unsigned long)fix_to_virt(FIX_TBOOT_MAP_ADDRESS);
-        }
-        *(va + i) = *(unsigned char *)(map_addr + pa + i
-                                       - (map_base << PAGE_SHIFT));
+            map_addr = (unsigned char *)fix_to_virt(FIX_TBOOT_MAP_ADDRESS);
+        }
+        va[i] = map_addr[pa + i - (map_base << PAGE_SHIFT)];
     }
 }
 

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