exec.c: Use ram_addr_t in cpu_physical_memory_rw(...).
authorAnthony PERARD <anthony.perard@citrix.com>
Fri, 15 Jul 2011 04:32:53 +0000 (04:32 +0000)
committerAlexander Graf <agraf@suse.de>
Tue, 26 Jul 2011 04:43:10 +0000 (06:43 +0200)
As the variable pd and addr1 inside the function cpu_physical_memory_rw
are mean to handle a RAM address, they should be of the ram_addr_t type
instead of unsigned long.

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
exec.c

diff --git a/exec.c b/exec.c
index 2160ded4017f9f3f820360cb5a388bb5facdc8c2..0393d399981eb95540443d0f9cb8cc8bcb21bd85 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -3858,7 +3858,7 @@ void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf,
     uint8_t *ptr;
     uint32_t val;
     target_phys_addr_t page;
-    unsigned long pd;
+    ram_addr_t pd;
     PhysPageDesc *p;
 
     while (len > 0) {
@@ -3898,7 +3898,7 @@ void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf,
                     l = 1;
                 }
             } else {
-                unsigned long addr1;
+                ram_addr_t addr1;
                 addr1 = (pd & TARGET_PAGE_MASK) + (addr & ~TARGET_PAGE_MASK);
                 /* RAM case */
                 ptr = qemu_get_ram_ptr(addr1);