Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp868808ybg; Wed, 3 Jun 2020 16:15:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYvKgHrOzJ0iIKEU0Gj5gAXIbIpaQ64NL1U3KVULyA//zKHzkn9oTOYwKC4H4/nWI6pGfL X-Received: by 2002:a50:a365:: with SMTP id 92mr1779313edn.220.1591226124388; Wed, 03 Jun 2020 16:15:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591226124; cv=none; d=google.com; s=arc-20160816; b=VZ7m6z8Qmnsdnjc8PEq65mLW2Iviqd9Zjvj56BqtibpgsMaVHPLtjbHCULdlwHirkC iUPliBTzIvsnnQtqMt4uZxIX4w2pgL4s9+C6aGRRMs/6juRXjtQAYc274YtIXZ932ioo 5aiDLGqpmyNEznS/3QrROl2CLPClqxcentwPNGYE4jPXxKe6AUlpD6vW7Bs6F+ehTBgG SML+5rCGTEVlCsIvfWWJkdJs/hCEiVIDbjAtTUYkrNjmm1RKxbiTHnRA6161VVFBaiyu qD1ck1Kli4pimh4CEk/NK2CvPkP032f/vDj/poB1cCxHrEWCQNucpfbJ/W683VpelAJc pwBg== 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=1CUsnVZO+HN9EIx9y6Fh9KEtQOi/UYgpmUMNVz9tgH8=; b=orqvCEiqnToV09s3E6QBQNQ5OOcvq2POme1GwCEDod5ltXAhWrCqvDAcbScqPKLES4 EVehBgUvcEycLhTmrg0Sa23LYFvltd+wbHlgTQb39kIGVIyrDGXyhuzEenXe0fnXv3Vt IGa44G36quBv914U5EidurizYGIAIS4+2mXMb8pfpqYGmlHi1vp8Okwa23NgFp/Y/9U2 aVPa9E0mqvgQ+pHuPwd2o3kS4Rs4W7rKe5LTUtjfULMZ5W3P/clzeYyL06SRC4AhO2WG uSemg4mAXJYoc2vOMNvxC7WRdZmkrV1HcXyT5grmlOujnulTvxhp1qNjsg0/IaZ5LGDx molA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="UMkfTrY/"; 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 dp1si790574ejc.505.2020.06.03.16.15.01; Wed, 03 Jun 2020 16:15:24 -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="UMkfTrY/"; 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 S1726904AbgFCWWy (ORCPT + 99 others); Wed, 3 Jun 2020 18:22:54 -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 S1726441AbgFCWWv (ORCPT ); Wed, 3 Jun 2020 18:22:51 -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 6AE2320810; 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=1591222970; bh=9EMRvn5Dc8JT3MH0CrfmZw6otCxJqhqF6+OrT0rmyo4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UMkfTrY//kEo3frQh5UBqXlCY9gFA+q6O15I10yf40UHEg4tU61PHkQsi8VdYPfSO xsOTh7eIQ4IPEZPYj3ZapuGsrb9NoQ7wtwIaS1B35AciFYGS+Ad43u6D+yn07Q0fQN barpbM44FRjfXKV+ngWD+/yMJGKIZKzXQEoDlbe4= 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 04/11] swiotlb-xen: add struct device* parameter to xen_bus_to_phys Date: Wed, 3 Jun 2020 15:22:40 -0700 Message-Id: <20200603222247.11681-4-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 --- drivers/xen/swiotlb-xen.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c index 1c44dbc69b70..e38a1cce4100 100644 --- a/drivers/xen/swiotlb-xen.c +++ b/drivers/xen/swiotlb-xen.c @@ -67,7 +67,7 @@ static inline dma_addr_t xen_phys_to_bus(struct device *dev, phys_addr_t paddr) return dma; } -static inline phys_addr_t xen_bus_to_phys(dma_addr_t baddr) +static inline phys_addr_t xen_bus_to_phys(struct device *dev, dma_addr_t baddr) { unsigned long xen_pfn = bfn_to_pfn(XEN_PFN_DOWN(baddr)); dma_addr_t dma = (dma_addr_t)xen_pfn << XEN_PAGE_SHIFT; @@ -339,7 +339,7 @@ xen_swiotlb_free_coherent(struct device *hwdev, size_t size, void *vaddr, /* do not use virt_to_phys because on ARM it doesn't return you the * physical address */ - phys = xen_bus_to_phys(dev_addr); + phys = xen_bus_to_phys(hwdev, dev_addr); /* Convert the size to actually allocated. */ size = 1UL << (order + XEN_PAGE_SHIFT); @@ -420,7 +420,7 @@ static dma_addr_t xen_swiotlb_map_page(struct device *dev, struct page *page, static void xen_swiotlb_unmap_page(struct device *hwdev, dma_addr_t dev_addr, size_t size, enum dma_data_direction dir, unsigned long attrs) { - phys_addr_t paddr = xen_bus_to_phys(dev_addr); + phys_addr_t paddr = xen_bus_to_phys(hwdev, dev_addr); BUG_ON(dir == DMA_NONE); @@ -436,7 +436,7 @@ static void xen_swiotlb_sync_single_for_cpu(struct device *dev, dma_addr_t dma_addr, size_t size, enum dma_data_direction dir) { - phys_addr_t paddr = xen_bus_to_phys(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); @@ -449,7 +449,7 @@ static void xen_swiotlb_sync_single_for_device(struct device *dev, dma_addr_t dma_addr, size_t size, enum dma_data_direction dir) { - phys_addr_t paddr = xen_bus_to_phys(dma_addr); + phys_addr_t paddr = xen_bus_to_phys(dev, dma_addr); if (is_xen_swiotlb_buffer(dma_addr)) swiotlb_tbl_sync_single(dev, paddr, size, dir, SYNC_FOR_DEVICE); -- 2.17.1