Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp898717ybt; Fri, 10 Jul 2020 15:35:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx17+qHUp7u1/Y6KrG9Nk0AbYJSkyNeC5vY1rc66lwtgTi4Ws+buQcmk77ikBWI24KplLsC X-Received: by 2002:a05:6402:ca1:: with SMTP id cn1mr66717039edb.223.1594420522333; Fri, 10 Jul 2020 15:35:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594420522; cv=none; d=google.com; s=arc-20160816; b=OzgPa12XjEE06oCjVUI4pZ+5tKUMmNj81pyT2n3ZVzDnrgbn2cXEV4Sm98b4sOBxTM 9K4efykeF8CMEN45X9qavf6m8mscu0qtpzb1/5fV0/b5/qi0TmxUba5eaBjVHaCyctLi 3N21eXpzCnvneNN8S3gfGAkKUV0ZNUMsSvEuScelg29QpUVo1gBi4sQfH84U4LNaC0HF O/QTJuAhVUVezbAAmTy26O90ie95zBgrXX3fRZaa9+2/ULVthkYe4xsXtWLgtLFmhTPW b/gqDoFjw3RlMOhZS2vjW+B9HRpHHEOR0EAZfrbDAux/7U4syMDS1FG/HuErDoM3SkDR rRVw== 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=ft3pKwxohWBbqj4yG6hO8ajSIUZS20bOg1oKdzutFxI=; b=LtNdlK1Mvt2/7Y+E0Rsp1feepM9aczAjsiY4XUPQBWlp0V9aOyMFyj69qRlfIPgMq/ cyT8Vohcdb0heGttc3+02DzykhPjVA4Vpit2Ow0XLJKeO1CTm24+AhOfGWID10SmDYhj BEfWV+wDDsVyyvowziIZYh98gtrH67fQOmROoiHP143uV29M7e2sOTj2BGkcSTtHjD3Q StsO1Mr9rhLWBeYeQ1dF81XosAZMSqhGOYFKIgyYwSfDWwuaTwC8xjS31oZZKdHHV669 Dys7eyHAeEBEjhw/ajscouq6myUOAlhpyy6l1lyvIpzzCjt08xUOqNqZeBc3JrOr27fA F7qQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ZkosITiJ; 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 d18si4846489edy.194.2020.07.10.15.34.58; Fri, 10 Jul 2020 15:35:22 -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=ZkosITiJ; 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 S1726843AbgGJWej (ORCPT + 99 others); Fri, 10 Jul 2020 18:34:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:45984 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726780AbgGJWec (ORCPT ); Fri, 10 Jul 2020 18:34:32 -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 C8DA7207FC; Fri, 10 Jul 2020 22:34:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1594420472; bh=sMYkMYitD6sPj0ukCknVdpCgnLmfr5vqpCBV7xeRxnc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZkosITiJ48CQikhlYJWkeZGIhGG+eMgl8OaoZ/kNTsCH+/33DkflrU7cSBOMfzdUq bPWXlCXKKhcKjExNrnFg2SReGONdaI3jhfncDja5w3vlNRiOu2aF0upucK00xtmOYQ ITCaHzvbzVF33GKpwDOLggZY96Jh0H46k5ZQLxfY= 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, hch@infradead.org, Stefano Stabellini Subject: [PATCH v3 06/11] swiotlb-xen: add struct device * parameter to xen_dma_sync_for_device Date: Fri, 10 Jul 2020 15:34:22 -0700 Message-Id: <20200710223427.6897-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 No functional changes. The parameter is unused in this patch but will be used by next patches. Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky Tested-by: Corey Minyard Tested-by: Roman Shaposhnik --- Changes in v3: - add whitespace in title - improve commit message --- 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 d04b7a15124f..8a3a7bcc5ec0 100644 --- a/drivers/xen/swiotlb-xen.c +++ b/drivers/xen/swiotlb-xen.c @@ -408,7 +408,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; } @@ -458,7 +458,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