Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp843074ybg; Wed, 3 Jun 2020 15:26:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJybI4PdHt5egyFsJQFZpe7Iw+4NUsfKibIyHRBwYud3SOCOEgSvJ/2zRIim8jAmo3Cjb2vx X-Received: by 2002:a05:6402:417:: with SMTP id q23mr1564613edv.139.1591223215935; Wed, 03 Jun 2020 15:26:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591223215; cv=none; d=google.com; s=arc-20160816; b=iCZMg2vPGoTjjXqWKdmC94E7+c+w+e6zb7VTxhuclHbex9Dm67/pBYYJaI2/QR8FsP cy+lRd2ShOy85eX0dN9o3aTdkoMIEseezYGlyt8YQYdzql1KQq48dT9nrzwQrlT1p2Zd Zyp6RmpAyorQl0nR9CoXlZfxv53q5qfaYc72bpCO+Z/KZOPzOiFfz3CGyUV1rQ1YfSMh nHYRiXEPPNoDz923BVwEiu8HNqTcs3jy3Jhu5mUfOQPoxb9yEdo5YhTlaZ+AfR5l2t28 A9CYKkt9z8BjclKqnPbVAG25b0l2tWjEHk9vr538bsrLKecL+Vyeo7RTcv9Vxt0hz0hY B+Kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=4K7tXfZZBB6dtlNDWYtR0A8rthH+pHpOCSL+3/y6SyI=; b=C65YsqBWXsPoyse4Hi0SdDinSiUlnfO4GgwwBycJIEbdgrQDP9SAqX8EptYGZLGtCB ShEHbUbk7WA1x/NA93iwQnsf6hTcJQvA6A7KVJYKM9Kzp5fcXgJQu9lEJYt2DYD742zn Yy7eP0YBryzY25gF1s6iP4DtRaG4F/7BHJjyDY5lxIgCKFr+cd3glAtw0q+RRS+rq2Wg FULv5mumXIFpJSVesmSUfEpdz0hqHNhviwy3GZv5qNw2VarfiJRIWUp7hsCLaNkbZuEE Gy9STcbz5NnTmXEws8v6oL2d2nsJH+FoLiXAFU26pIaPKN4MwoT/4UTggTwSSMs1hOys tLpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=H48sy6PR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f20si512027ejx.646.2020.06.03.15.26.33; Wed, 03 Jun 2020 15:26:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=H48sy6PR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727013AbgFCWXW (ORCPT + 99 others); Wed, 3 Jun 2020 18:23:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:56584 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726842AbgFCWWw (ORCPT ); Wed, 3 Jun 2020 18:22:52 -0400 Received: from sstabellini-ThinkPad-T480s.hsd1.ca.comcast.net (c-67-164-102-47.hsd1.ca.comcast.net [67.164.102.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E818620825; Wed, 3 Jun 2020 22:22:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591222971; bh=hleYg6Qbw/sbGMUlPa36xrs33ic7PVU17RkZWi4JSOc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H48sy6PRrexnpig6zg/Ifh30welmOW/RgCZvJE24bKzptkLnoHxe6CD3XtYznJR1Z g/7vTXEThsmDhDcUXgnxo/kYi4ETQVwDvUV+okySRzaDfRNfrGuv1spo860JgzG17Y 2jGkWt59KGDd6Ii1SepySY0X9yhSSXtlJcc+dhQ8= From: Stefano Stabellini To: jgross@suse.com, boris.ostrovsky@oracle.com, konrad.wilk@oracle.com Cc: sstabellini@kernel.org, xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, tamas@tklengyel.com, roman@zededa.com, Stefano Stabellini Subject: [PATCH v2 05/11] swiotlb-xen: add struct device* parameter to xen_dma_sync_for_cpu Date: Wed, 3 Jun 2020 15:22:41 -0700 Message-Id: <20200603222247.11681-5-sstabellini@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stefano Stabellini The parameter is unused in this patch. No functional changes. Signed-off-by: Stefano Stabellini Tested-by: Corey Minyard Tested-by: Roman Shaposhnik --- arch/arm/xen/mm.c | 5 +++-- drivers/xen/swiotlb-xen.c | 4 ++-- include/xen/swiotlb-xen.h | 5 +++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/arch/arm/xen/mm.c b/arch/arm/xen/mm.c index d40e9e5fc52b..1a00e8003c64 100644 --- a/arch/arm/xen/mm.c +++ b/arch/arm/xen/mm.c @@ -71,8 +71,9 @@ static void dma_cache_maint(dma_addr_t handle, size_t size, u32 op) * pfn_valid returns true the pages is local and we can use the native * dma-direct functions, otherwise we call the Xen specific version. */ -void xen_dma_sync_for_cpu(dma_addr_t handle, phys_addr_t paddr, size_t size, - enum dma_data_direction dir) +void xen_dma_sync_for_cpu(struct device *dev, dma_addr_t handle, + phys_addr_t paddr, size_t size, + enum dma_data_direction dir) { if (pfn_valid(PFN_DOWN(handle))) arch_sync_dma_for_cpu(paddr, size, dir); diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c index e38a1cce4100..d9b3d9f2a7d1 100644 --- a/drivers/xen/swiotlb-xen.c +++ b/drivers/xen/swiotlb-xen.c @@ -425,7 +425,7 @@ static void xen_swiotlb_unmap_page(struct device *hwdev, dma_addr_t dev_addr, BUG_ON(dir == DMA_NONE); if (!dev_is_dma_coherent(hwdev) && !(attrs & DMA_ATTR_SKIP_CPU_SYNC)) - xen_dma_sync_for_cpu(dev_addr, paddr, size, dir); + xen_dma_sync_for_cpu(hwdev, dev_addr, paddr, size, dir); /* NOTE: We use dev_addr here, not paddr! */ if (is_xen_swiotlb_buffer(dev_addr)) @@ -439,7 +439,7 @@ xen_swiotlb_sync_single_for_cpu(struct device *dev, dma_addr_t dma_addr, phys_addr_t paddr = xen_bus_to_phys(dev, dma_addr); if (!dev_is_dma_coherent(dev)) - xen_dma_sync_for_cpu(dma_addr, paddr, size, dir); + xen_dma_sync_for_cpu(dev, dma_addr, paddr, size, dir); if (is_xen_swiotlb_buffer(dma_addr)) swiotlb_tbl_sync_single(dev, paddr, size, dir, SYNC_FOR_CPU); diff --git a/include/xen/swiotlb-xen.h b/include/xen/swiotlb-xen.h index ffc0d3902b71..f62d1854780b 100644 --- a/include/xen/swiotlb-xen.h +++ b/include/xen/swiotlb-xen.h @@ -4,8 +4,9 @@ #include -void xen_dma_sync_for_cpu(dma_addr_t handle, phys_addr_t paddr, size_t size, - enum dma_data_direction dir); +void xen_dma_sync_for_cpu(struct device *dev, dma_addr_t handle, + phys_addr_t paddr, size_t size, + enum dma_data_direction dir); void xen_dma_sync_for_device(dma_addr_t handle, phys_addr_t paddr, size_t size, enum dma_data_direction dir); -- 2.17.1