From patchwork Mon Nov 10 16:14:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 40514 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D48A8218DE for ; Mon, 10 Nov 2014 16:20:01 +0000 (UTC) Received: by mail-lb0-f199.google.com with SMTP id n15sf4242257lbi.10 for ; Mon, 10 Nov 2014 08:20:00 -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=3bphfB99BsIKYxvYORIXn8bMZ9jy4Ny7QbU5prKANGg=; b=T/IJckDBP20cb79xgCexRc0cImnH4lBI9uxrRSVHdYcfy7ie6R1o/LdbvOb3ck3xBR IRE9aAh5/4hPkz1TTR5f3Pf9ncwj0ApYEe9+F54uGaNVtvQXQdqYWG9Vk7z7UYTWnpnD SA6FTz0vS/4sqaD7uwTJc1FRXlum8p0vWt7qJU/4MDKuHM772Gjr/ukh95zXIWTB8QCR 4yKveN+Eb7KrHMuE293tVatUNTO7MmP3X+qlECBzUVMHtkqjt8prqRTT0Vv7vtAzgD/W TYcwD3Tibz+Uug5CTRd6G4DvF+rGURAwD7Ll8LRDr+pXatQXI0obNavuoNEKHf1LYrnN d30A== X-Gm-Message-State: ALoCoQkJgOYTpnfdQ8rB/LENIpUMmveX7K/Oid89ltwGvaHDz0XhhFM9Uaq/UEk1mw5vigrzLcKs X-Received: by 10.152.30.66 with SMTP id q2mr5521317lah.2.1415636400830; Mon, 10 Nov 2014 08:20:00 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.8.227 with SMTP id u3ls224972laa.8.gmail; Mon, 10 Nov 2014 08:20:00 -0800 (PST) X-Received: by 10.112.219.3 with SMTP id pk3mr30367240lbc.18.1415636400522; Mon, 10 Nov 2014 08:20:00 -0800 (PST) Received: from mail-lb0-f179.google.com (mail-lb0-f179.google.com. [209.85.217.179]) by mx.google.com with ESMTPS id ci10si7564176lad.20.2014.11.10.08.20.00 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Nov 2014 08:20:00 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.179 as permitted sender) client-ip=209.85.217.179; Received: by mail-lb0-f179.google.com with SMTP id l4so6148224lbv.10 for ; Mon, 10 Nov 2014 08:20:00 -0800 (PST) X-Received: by 10.152.29.8 with SMTP id f8mr30371029lah.56.1415636400382; Mon, 10 Nov 2014 08:20:00 -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 ew9csp116973lbc; Mon, 10 Nov 2014 08:19:59 -0800 (PST) X-Received: by 10.68.136.226 with SMTP id qd2mr33385104pbb.55.1415636398846; Mon, 10 Nov 2014 08:19:58 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ph6si1942707pdb.16.2014.11.10.08.19.41 for ; Mon, 10 Nov 2014 08:19:58 -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 S1753774AbaKJQTT (ORCPT + 25 others); Mon, 10 Nov 2014 11:19:19 -0500 Received: from smtp02.citrix.com ([66.165.176.63]:12530 "EHLO SMTP02.CITRIX.COM" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753756AbaKJQTO (ORCPT ); Mon, 10 Nov 2014 11:19:14 -0500 X-IronPort-AV: E=Sophos;i="5.07,353,1413244800"; d="scan'208";a="191239981" Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.79) with Microsoft SMTP Server id 14.3.181.6; Mon, 10 Nov 2014 11:18: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 1Xnrbe-0000Mx-6A; Mon, 10 Nov 2014 16:14:18 +0000 From: Stefano Stabellini To: CC: , , , , , , , Stefano Stabellini Subject: [PATCH v8 12/13] swiotlb-xen: pass dev_addr to xen_dma_unmap_page and xen_dma_sync_single_for_cpu Date: Mon, 10 Nov 2014 16:14:04 +0000 Message-ID: <1415636045-24669-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.179 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 --- 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;