From patchwork Wed Jul 27 13:30:51 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 107091 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 6FC70B6F6B for ; Thu, 28 Jul 2011 00:32:40 +1000 (EST) Received: from localhost ([::1]:56698 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qm4DE-0003ZP-P9 for incoming@patchwork.ozlabs.org; Wed, 27 Jul 2011 09:31:48 -0400 Received: from eggs.gnu.org ([140.186.70.92]:40498) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qm4CZ-0001F7-SJ for qemu-devel@nongnu.org; Wed, 27 Jul 2011 09:31:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qm4CT-00044J-JC for qemu-devel@nongnu.org; Wed, 27 Jul 2011 09:31:07 -0400 Received: from cantor2.suse.de ([195.135.220.15]:52087 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qm4CT-00043s-Bm for qemu-devel@nongnu.org; Wed, 27 Jul 2011 09:31:01 -0400 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.221.2]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id DC11D8EFD4; Wed, 27 Jul 2011 15:31:00 +0200 (CEST) From: Alexander Graf To: QEMU-devel Developers Date: Wed, 27 Jul 2011 15:30:51 +0200 Message-Id: <1311773457-8842-4-git-send-email-agraf@suse.de> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1311773457-8842-1-git-send-email-agraf@suse.de> References: <1311773457-8842-1-git-send-email-agraf@suse.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 195.135.220.15 Cc: Anthony PERARD , Anthony Liguori Subject: [Qemu-devel] [PATCH 3/9] exec.c: Use ram_addr_t in cpu_physical_memory_rw(...). X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Anthony PERARD 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 Acked-by: Paolo Bonzini Signed-off-by: Alexander Graf --- exec.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/exec.c b/exec.c index 2160ded..0393d39 100644 --- 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);