Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp842194ybg; Wed, 3 Jun 2020 15:25:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxky3ABjg++Ggqs6Hp6b2v9/f/52DV2pTxq+KfXICnGkv78jc+ASfm8h2ye7QnD5IEviWxM X-Received: by 2002:a50:934e:: with SMTP id n14mr1610245eda.88.1591223111338; Wed, 03 Jun 2020 15:25:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591223111; cv=none; d=google.com; s=arc-20160816; b=Q32laxVLgqxCm6hxTsS3nHo4uTxTChSrHaofbq+Eop9F+mYByW7VMCMMivNaQhV4ai 26x9duWUIUr2msxJ2uja+HHN8GcG5Igm4ebbroxmBxeXDVOfKkLYfJELGRntjXdFfX0K VlFE1q1wm2GLTBlYv3y0lCXeSFrMFvYEY5c9kcJWQc/LncbyR6TfSide92IvjLqfCeYx MMBPll786QfIYygjfenlhcMEGxIRlAuOUiZC+Zaj3m7VUAUG/GkVSZcOO+8CQKfsJRYq o3LLEIPd6FrL9LAazJ0aDgIEfQFV66T1tiBmuREfcuXuMn45bNRYJEiS9KHp4HOKSnC/ BweQ== 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=YUz0eUHASB2/odv9eeZuGIPTyYSwMOPDOm+wOy7yOlw=; b=wLYIxluHFvpe8CpRAH7p3B58zCV0uOkrv1F2a3Q9jchlXk7zz2DzNXAXz6hH4yAlbo NDqLFvsoaHsypl6D1pMuYHgVHNfBrBWExeZxADd+QWHLze83MGt8soVpnNp80UuevMkU l5JHwEsrw/48przWCKTUtC/WomlNPWoz/SkLDJo3wUCbLmqpEqhZL/fc7mhfgI5j1oB6 IUn0FACBsCf2cCLOuIhn5wAjhyxxevr5SvIY1fWCgI40vzx9TFPslQzfEA3U5BLvBf3x QsHRSB8P3fGJ5LfcdU8entfQlCcYzEzG+ngy5ZFpDopzH4SJ4myWdaF5kaDDS229gPC5 h+wQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZVoeRa4O; 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 om21si516499ejb.101.2020.06.03.15.24.45; Wed, 03 Jun 2020 15:25:11 -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=ZVoeRa4O; 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 S1726916AbgFCWWz (ORCPT + 99 others); Wed, 3 Jun 2020 18:22:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:56598 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726883AbgFCWWw (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 6D2EF20829; Wed, 3 Jun 2020 22:22:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591222971; bh=nFPjt4xgM/UfJuFdimg7/s4ZMaLcT6FSSZOQ40J3kTw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZVoeRa4O3eMIypf/td9dPsshZyL3824CEB0vUz9dxYjRwAY2AY0cyFWPcNa8PZvNk Q0mogU5QtAE7AI0+UjtnixCEXyEj9GvIesGSo1aXychYg/UTS6AzKd5+SMogSZT5To MqxGPMv56WACn0tKs1AS8IJKC7RTUH29U/81d5qI= 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 06/11] swiotlb-xen: add struct device* parameter to xen_dma_sync_for_device Date: Wed, 3 Jun 2020 15:22:42 -0700 Message-Id: <20200603222247.11681-6-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 1a00e8003c64..f2414ea40a79 100644 --- a/arch/arm/xen/mm.c +++ b/arch/arm/xen/mm.c @@ -81,8 +81,9 @@ void xen_dma_sync_for_cpu(struct device *dev, dma_addr_t handle, dma_cache_maint(handle, size, GNTTAB_CACHE_INVAL); } -void xen_dma_sync_for_device(dma_addr_t handle, phys_addr_t paddr, size_t size, - enum dma_data_direction dir) +void xen_dma_sync_for_device(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_device(paddr, size, dir); diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c index d9b3d9f2a7d1..9b846c143c90 100644 --- a/drivers/xen/swiotlb-xen.c +++ b/drivers/xen/swiotlb-xen.c @@ -405,7 +405,7 @@ static dma_addr_t xen_swiotlb_map_page(struct device *dev, struct page *page, done: if (!dev_is_dma_coherent(dev) && !(attrs & DMA_ATTR_SKIP_CPU_SYNC)) - xen_dma_sync_for_device(dev_addr, phys, size, dir); + xen_dma_sync_for_device(dev, dev_addr, phys, size, dir); return dev_addr; } @@ -455,7 +455,7 @@ xen_swiotlb_sync_single_for_device(struct device *dev, dma_addr_t dma_addr, swiotlb_tbl_sync_single(dev, paddr, size, dir, SYNC_FOR_DEVICE); if (!dev_is_dma_coherent(dev)) - xen_dma_sync_for_device(dma_addr, paddr, size, dir); + xen_dma_sync_for_device(dev, dma_addr, paddr, size, dir); } /* diff --git a/include/xen/swiotlb-xen.h b/include/xen/swiotlb-xen.h index f62d1854780b..6d235fe2b92d 100644 --- a/include/xen/swiotlb-xen.h +++ b/include/xen/swiotlb-xen.h @@ -7,8 +7,9 @@ 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); +void xen_dma_sync_for_device(struct device *dev, dma_addr_t handle, + phys_addr_t paddr, size_t size, + enum dma_data_direction dir); extern int xen_swiotlb_init(int verbose, bool early); extern const struct dma_map_ops xen_swiotlb_dma_ops; -- 2.17.1