From patchwork Fri Feb 24 03:27:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Gibson X-Patchwork-Id: 142739 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 EDD02B6F62 for ; Fri, 24 Feb 2012 15:08:20 +1100 (EST) Received: from localhost ([::1]:36954 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0lq6-00038V-Si for incoming@patchwork.ozlabs.org; Thu, 23 Feb 2012 22:28:58 -0500 Received: from eggs.gnu.org ([140.186.70.92]:41275) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0lpP-0001Xx-8F for qemu-devel@nongnu.org; Thu, 23 Feb 2012 22:28:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S0lpI-0001IE-SX for qemu-devel@nongnu.org; Thu, 23 Feb 2012 22:28:15 -0500 Received: from ozlabs.org ([203.10.76.45]:52692) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0lpI-0001Hc-Es for qemu-devel@nongnu.org; Thu, 23 Feb 2012 22:28:08 -0500 Received: by ozlabs.org (Postfix, from userid 1007) id 2FA46B6FBE; Fri, 24 Feb 2012 14:28:04 +1100 (EST) From: David Gibson To: anthony@codemonkey.ws Date: Fri, 24 Feb 2012 14:27:43 +1100 Message-Id: <1330054063-16860-9-git-send-email-david@gibson.dropbear.id.au> X-Mailer: git-send-email 1.7.9 In-Reply-To: <1330054063-16860-1-git-send-email-david@gibson.dropbear.id.au> References: <1330054063-16860-1-git-send-email-david@gibson.dropbear.id.au> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 203.10.76.45 Cc: qemu-devel@nongnu.org, David Gibson Subject: [Qemu-devel] [PATCH 8/8] Make dma_addr_t 64 bit always 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 --- dma.h | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/dma.h b/dma.h index b8cfd1d..ee540f4 100644 --- a/dma.h +++ b/dma.h @@ -18,10 +18,13 @@ typedef struct ScatterGatherEntry ScatterGatherEntry; #if defined(TARGET_PHYS_ADDR_BITS) -typedef target_phys_addr_t dma_addr_t; +/* Bus addresses can be different size from CPU physical addresses, + * and indeed they can be different on different busses. So make + * these always 64-bit which should handle every usual case */ +typedef uint64_t dma_addr_t; -#define DMA_ADDR_BITS TARGET_PHYS_ADDR_BITS -#define DMA_ADDR_FMT TARGET_FMT_plx +#define DMA_ADDR_BITS 64 +#define DMA_ADDR_FMT "%" PRIx64 typedef enum { DMA_DIRECTION_TO_DEVICE = 0,