Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp954075ybk; Wed, 20 May 2020 16:48:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz8sGZclHdHv+mNO+76XshHigvt6F3PwGQkrqNPSKt9Bl/EmlPDZI+8K/6biy3t+D7M28Qc X-Received: by 2002:a05:6402:21cc:: with SMTP id bi12mr5703028edb.294.1590018503688; Wed, 20 May 2020 16:48:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590018503; cv=none; d=google.com; s=arc-20160816; b=bI/OrLsNkGyu0L9TSL+vCmHSF7tFAG/yOkk0/7IpJWY8JHySlZy679pIhLi4ZqhvhT QP8dfUvbt1sQhdCONXavfff84I5mgoybjqDPGpzYK0yKtBT6ORNeLwYAHLMSUKdFIaVU +3G2RsZopS3Msgs6BBscETkYaNcyPtg97YXsb+ltVKNJjCIzeRh71ob5hgTV7yQBIp09 gLvw+iXOAWvSZOD5YkzF3+ONhDLUH2F7UlalVTTcdpk34Zi3/xSFABqXbJKmkoWK83Hd Ynz5JkAs9p0yN3e5QjcEqAorSZuYe1HK3I3IE2zSHRHlpsfxhegPowqdSfz6dZTx1+pD hbUw== 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=OzyI6G+q2TJou2G6O+Hx90kcuctojB3jybWcCVJjEjk=; b=XS8wsBWrhURokEwpv2WW+ej/cXZ+vHCp/C4ltT5rb1I0eRqPaskanukVk08cWFefxW s8zYnOgdYkl5kbp3Nb67M5fYfi6P8H+Q0ZWscKCJlDzpNJJpM7XDSFi9MTE/UYsekKoU 6f8GKFFOTXuthhr7eBu2+0DlIlPSwsL/fcrrKw+xcNeBwXyPiZVxTnPo+5VfjWqFB0qY 8aEphBvTqxOzU3Cuo7J8Rj7Zf57Hyx3KyDJNrfAOD5Ja+ozD3U4+DTx5mRSIZSN8rVgV QpKlL9kt/Syq8cw6WBtopvJ7pHoQMv9BmRrS7Do+qigYHjYRkBkqTWUOM69WjvUEUTIA UkUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Zrzyv7dw; 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 23si2525910edx.48.2020.05.20.16.48.01; Wed, 20 May 2020 16:48:23 -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=Zrzyv7dw; 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 S1728243AbgETXpo (ORCPT + 99 others); Wed, 20 May 2020 19:45:44 -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 S1726938AbgETXpY (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 58CB720899; 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=1590018323; bh=KOZVKoHc4nwdfLj2dJHT6a8axx8miTwmLiOrwBfDB1k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Zrzyv7dwGOoZVOjzN/lI6uRiajVHs9Vwy9l2vAnumI9ByScLvTFwCz0GbKgQGL6mH nHTux0QWT9tRMSYP25Dz44CDAsqapcfHK1zzX6Jz+gOjOGZU9NJy7LnunoCzzI+fz8 hdxrCpqYM0hQY5MHAQFgGUEtfwix69+Jsu+d9KVs= 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 04/10] swiotlb-xen: add struct device* parameter to xen_bus_to_phys Date: Wed, 20 May 2020 16:45:14 -0700 Message-Id: <20200520234520.22563-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 --- 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 958ee5517e0b..9b4306a56feb 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