Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp953476ybk; Wed, 20 May 2020 16:47:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwIrwd4zwSbM0KmpR8m/SoDvqXIOeecvTgarxtSD3tNiU7kHaTFSREYV3Tkio4UAKWdaDza X-Received: by 2002:a17:906:704c:: with SMTP id r12mr1300681ejj.308.1590018427781; Wed, 20 May 2020 16:47:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590018427; cv=none; d=google.com; s=arc-20160816; b=PMPqV+4Y0RS+DIIOq6YjKznsEJS8alyU8f2vCRU0FS5TOzABIH7fxpS0tz+8UGEa8O rFcjqiwj9RfljGzTUbNXvSGLPOWy/tlCoT2GOXTqfPkSSTCFuZaCxWrYWCaENwElO3uc OodcMCqFonmii/LyRPO7DbMncfoBt/ECyhlp3zIZS2SoAo9ac6UEoTyNAFaMMo3uuNs6 EN/W/oLvX2QUT4ZcN27dES1u/lZn2zNiuWTXl764R6oHZI6hq7ac4ouiwHn9fgk9zhJB ydZUOaNa9sJ/w+xMcVeknafywAMUhv345WqPx5XDGUiHNkTmqRz0xKI58FIwbmJqfGuO 0wPA== 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=H8bZq1iTpDW3wUxLWaRgTcNG6KV8cjJatrQT622Z/Xg=; b=KG8+8640614isLz0qSMzZJcqL26KDzqy8QF+S7/pBMH9SZqakbkX+bZ4qwddqShueg hhzXToDktRNO1faGnjRDMk4f/LcG//fibsYfzTraivMG3xU9d3V/CFGj+eaT7dnFh+PY 6cx37yUBE7s6cIyKkRAF1pI8MNntn6ZcfufZwRhUjuTyMBwNocGM/R+Dk/yVumXIE2Td NqtPBuOotdAwMJi+9PNzVClQB10XUtXtvDkOBXXYrwMU8NTE1YSoThHwqfTFGTyOMkIX 7pVsobDC5OgJRHAWuKyr044+EbmBmx/zri5WzSer/R5nPXUvpMPsg0H6UgAPdDNietAU r+yA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=2oXurw69; 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 mh1si2401137ejb.621.2020.05.20.16.46.45; Wed, 20 May 2020 16:47:07 -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=2oXurw69; 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 S1727062AbgETXpZ (ORCPT + 99 others); Wed, 20 May 2020 19:45:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:36984 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726999AbgETXpY (ORCPT ); Wed, 20 May 2020 19:45:24 -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 BBBC1208A7; Wed, 20 May 2020 23:45:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590018324; bh=z/oPKkIs7NsKHsXBE6reDZxADwxVNC/gQhCGPLiNSNk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2oXurw69UIZ3DM7uqS/KV3kmKOp8Qp47Zmwn2iXz8fUjXTUv6facvM2OBXrQxMwcv Nkp327Rz7XzXGLqJyesuWLPsCW/lNQZWMTpkPb/ip3gXO/vBlpjekfJspk7tfZGPiN RBi6Jz59yYEMA40jGdjvJ4BWqbtoLvc+3biQ3IHY= 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, Stefano Stabellini Subject: [PATCH 05/10] swiotlb-xen: add struct device* parameter to xen_dma_sync_for_cpu Date: Wed, 20 May 2020 16:45:15 -0700 Message-Id: <20200520234520.22563-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 --- 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 9b4306a56feb..f9aa932973dd 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