From patchwork Wed Nov 12 11:40:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 40663 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ee0-f72.google.com (mail-ee0-f72.google.com [74.125.83.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CC529206A5 for ; Wed, 12 Nov 2014 11:48:21 +0000 (UTC) Received: by mail-ee0-f72.google.com with SMTP id d17sf7981302eek.11 for ; Wed, 12 Nov 2014 03:48:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=eoaN2CRErEbEOY6kM48l7UU6nnRjmcAJ2t4UnANkDSc=; b=ePyhGHB03jN9wZmMiMkL53BK5dYDQMEotth6ai8IBDhRMboxiVBQx08JaF+w1d/Yhx PqiRVBOCA43s50QfR/R99rtuLUsIR0pJgo11H2HTc1QVhl5qQAigBc9+uuLoYahtwwWi qcIQM7DjMFphtg4zeZtx8VXYw8yRRMm5dgnkUmZ3JJT3GjjXu/7InWU9GtAePCV2Gb/a taPpej7iI3+QprYZ3P4zz+LTiwdyduoQ0SbQsM35mA6PagM/U2DNJr/lg0u671W34/gh 3KMBhBbVusv90CokuzavIzksknwvLGakrlM5PqKTrjLYazJKQ8dTihQcOli+YjqC9Qsv mb4A== X-Gm-Message-State: ALoCoQkIuc0syStElXvZOgoYjIQrfiPbYL7qJf8mrapWNKL39/nT4C6Bp/vDYfSkYBbGcD5AM90B X-Received: by 10.112.159.199 with SMTP id xe7mr183853lbb.21.1415792901075; Wed, 12 Nov 2014 03:48:21 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.10.39 with SMTP id f7ls643443lab.75.gmail; Wed, 12 Nov 2014 03:48:20 -0800 (PST) X-Received: by 10.112.157.194 with SMTP id wo2mr41685005lbb.55.1415792900556; Wed, 12 Nov 2014 03:48:20 -0800 (PST) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com. [209.85.217.173]) by mx.google.com with ESMTPS id yg7si34484795lbb.133.2014.11.12.03.48.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Nov 2014 03:48:20 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) client-ip=209.85.217.173; Received: by mail-lb0-f173.google.com with SMTP id n15so9323816lbi.18 for ; Wed, 12 Nov 2014 03:48:20 -0800 (PST) X-Received: by 10.112.62.166 with SMTP id z6mr14723193lbr.74.1415792900441; Wed, 12 Nov 2014 03:48:20 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp408857lbc; Wed, 12 Nov 2014 03:48:19 -0800 (PST) X-Received: by 10.66.156.41 with SMTP id wb9mr46911643pab.27.1415792898980; Wed, 12 Nov 2014 03:48:18 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cd14si13216036pdb.251.2014.11.12.03.48.18 for ; Wed, 12 Nov 2014 03:48:18 -0800 (PST) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752872AbaKLLsN (ORCPT + 25 others); Wed, 12 Nov 2014 06:48:13 -0500 Received: from smtp02.citrix.com ([66.165.176.63]:11796 "EHLO SMTP02.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752799AbaKLLsJ (ORCPT ); Wed, 12 Nov 2014 06:48:09 -0500 X-IronPort-AV: E=Sophos;i="5.07,368,1413244800"; d="scan'208";a="191922266" Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.78) with Microsoft SMTP Server id 14.3.181.6; Wed, 12 Nov 2014 06:48:08 -0500 Received: from kaball.uk.xensource.com ([10.80.2.59]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1XoWIP-0003Gl-53; Wed, 12 Nov 2014 11:41:09 +0000 From: Stefano Stabellini To: CC: , , , , , , , Stefano Stabellini Subject: [PATCH v9 12/13] swiotlb-xen: pass dev_addr to xen_dma_unmap_page and xen_dma_sync_single_for_cpu Date: Wed, 12 Nov 2014 11:40:53 +0000 Message-ID: <1415792454-23161-12-git-send-email-stefano.stabellini@eu.citrix.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: MIME-Version: 1.0 X-DLP: MIA1 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: stefano.stabellini@eu.citrix.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.173 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , xen_dma_unmap_page and xen_dma_sync_single_for_cpu take a dma_addr_t handle as argument, not a physical address. Signed-off-by: Stefano Stabellini Reviewed-by: Catalin Marinas --- drivers/xen/swiotlb-xen.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c index 3725ee4..498b654 100644 --- a/drivers/xen/swiotlb-xen.c +++ b/drivers/xen/swiotlb-xen.c @@ -449,7 +449,7 @@ static void xen_unmap_single(struct device *hwdev, dma_addr_t dev_addr, BUG_ON(dir == DMA_NONE); - xen_dma_unmap_page(hwdev, paddr, size, dir, attrs); + xen_dma_unmap_page(hwdev, dev_addr, size, dir, attrs); /* NOTE: We use dev_addr here, not paddr! */ if (is_xen_swiotlb_buffer(dev_addr)) { @@ -497,14 +497,14 @@ xen_swiotlb_sync_single(struct device *hwdev, dma_addr_t dev_addr, BUG_ON(dir == DMA_NONE); if (target == SYNC_FOR_CPU) - xen_dma_sync_single_for_cpu(hwdev, paddr, size, dir); + xen_dma_sync_single_for_cpu(hwdev, dev_addr, size, dir); /* NOTE: We use dev_addr here, not paddr! */ if (is_xen_swiotlb_buffer(dev_addr)) swiotlb_tbl_sync_single(hwdev, paddr, size, dir, target); if (target == SYNC_FOR_DEVICE) - xen_dma_sync_single_for_cpu(hwdev, paddr, size, dir); + xen_dma_sync_single_for_cpu(hwdev, dev_addr, size, dir); if (dir != DMA_FROM_DEVICE) return;