Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp953956ybk; Wed, 20 May 2020 16:48:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfMyd9xi+u2+mDh+m6KwCcAzAmXmrIv/2VjAulV424k2iC3TQrdDRu6+yTfB0f8ywjLx7E X-Received: by 2002:a50:9f88:: with SMTP id c8mr516142edf.20.1590018487934; Wed, 20 May 2020 16:48:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590018487; cv=none; d=google.com; s=arc-20160816; b=GSNiDd/Rm0iZ90vRxXtav+aKagvmBKUv675qVJfkNsriGd5sDFf3f3gqI2Xp4Lshrn Rv0lr6EdDLGP7DNQggFSyoHKvcAU+M3XTgxY3rp6IdGirtMt92n64jTRpW0hthV9rZla wHNVI8QcAJaDjE8E1I15J9M+koEpHJYo/J5p1Ly2+8axpBEnxhgeA5iel6tq7zVzSiP6 evDVk3yG/OcoZIFhiG9iHtcH4p/wn2bI3RAhmnbGUQNDnWsbDq2bFdm1Lshd7GL1NyT4 iYMwU/aqCgvTImGIz6nRhbgtZtsZR5f00l6tK0ZMOiDgl098MXDQsb9veCpsN54uuTt7 IT2w== 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=CVomCEPTBjT3NslkYfzJqGoboZvspzqD2Ek0LP58dXg=; b=pHidf6QWkoLUKISe1ubHxgh6fhNuZkXSVT1vXMkGjYZYQS+NfvikBq8YpOhAnYE6Sq IYeUxJ10ao7qCaeI3XW4GwSm/rVsceYXAlods14Sj7UPJ0BxOogHZS+OUI68jCtUocso iIZMsE1ujCM1EP4HTZOtWBL36HE7WS+oVbeTbQoJgj4SwpWacV9a/6UmybU/HclICkDk CGlWOcO2E24hGwy002sQq7LoceXUs5N0ju+zVER2NpzMkocFKUzo3DJyxJR2OF2OOq8E wfX5+MUtgqQm5CUyTuZJBtZ4+zVPGlYrhfWXO5znFrrC3N/AkMIO9O2fQTSznWAKHn1y O2KA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pnTOgRAh; 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 o14si2418313eja.223.2020.05.20.16.47.45; Wed, 20 May 2020 16:48: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=pnTOgRAh; 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 S1726812AbgETXpn (ORCPT + 99 others); Wed, 20 May 2020 19:45:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:36934 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726845AbgETXpY (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 30682208B3; Wed, 20 May 2020 23:45:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590018324; bh=L20gKWj8zlek7VJV9PmfeUsnev8ccHkezeGqO5r/j0c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pnTOgRAhyAKhhIqmhcyTNxvwKS7YZkziiXSq2B8Bf3L2jwD/2wcYZFCXYaLBTB/H3 a5SP8AwC6k1h40imuvELO7bRpU77mncT/fN5LRmTcW8ndOxsBdcFDJtcHDYQ+ee4yM Rw5m1CKwyl4TbFieBldPA5YNa+ZIT6x9HG5pDjsw= 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 06/10] swiotlb-xen: add struct device* parameter to xen_dma_sync_for_device Date: Wed, 20 May 2020 16:45:16 -0700 Message-Id: <20200520234520.22563-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 --- 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 f9aa932973dd..ef58f05ae445 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