From patchwork Sat Jan 21 04:19:03 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 137148 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 836581007D1 for ; Sat, 21 Jan 2012 15:20:57 +1100 (EST) Received: from localhost ([::1]:57040 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoSRe-0000Xy-2l for incoming@patchwork.ozlabs.org; Fri, 20 Jan 2012 23:20:50 -0500 Received: from eggs.gnu.org ([140.186.70.92]:56498) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoSQI-0007Or-Nq for qemu-devel@nongnu.org; Fri, 20 Jan 2012 23:19:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RoSQA-0001T8-HY for qemu-devel@nongnu.org; Fri, 20 Jan 2012 23:19:25 -0500 Received: from cantor2.suse.de ([195.135.220.15]:57139 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RoSQA-0001SX-6p; Fri, 20 Jan 2012 23:19:18 -0500 Received: from relay1.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 3545F90B96; Sat, 21 Jan 2012 05:19:17 +0100 (CET) From: Alexander Graf To: qemu-ppc@nongnu.org Date: Sat, 21 Jan 2012 05:19:03 +0100 Message-Id: <1327119551-29674-19-git-send-email-agraf@suse.de> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1327119551-29674-1-git-send-email-agraf@suse.de> References: <1327119551-29674-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: Blue Swirl , qemu-devel Developers , Aurelien Jarno , David Gibson Subject: [Qemu-devel] [PATCH 18/26] Correct types in bmdma_addr_{read, write} 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: David Gibson Back when I made patches introducing dma_addr_t and various PCI DMA wrapper functions, I made a mistake. The bmdma_addr_{read,write} functions need to take target_phys_addr_t not dma_addr_t, since they are assigned to MemoryRegionOps callbacks. This patch corrects my error. Signed-off-by: David Gibson Signed-off-by: Alexander Graf --- hw/ide/pci.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ide/pci.c b/hw/ide/pci.c index cb3de65..246dd57 100644 --- a/hw/ide/pci.c +++ b/hw/ide/pci.c @@ -327,7 +327,7 @@ void bmdma_cmd_writeb(BMDMAState *bm, uint32_t val) bm->cmd = val & 0x09; } -static uint64_t bmdma_addr_read(void *opaque, dma_addr_t addr, +static uint64_t bmdma_addr_read(void *opaque, target_phys_addr_t addr, unsigned width) { BMDMAState *bm = opaque; @@ -341,7 +341,7 @@ static uint64_t bmdma_addr_read(void *opaque, dma_addr_t addr, return data; } -static void bmdma_addr_write(void *opaque, dma_addr_t addr, +static void bmdma_addr_write(void *opaque, target_phys_addr_t addr, uint64_t data, unsigned width) { BMDMAState *bm = opaque;