Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp844177ybg; Wed, 3 Jun 2020 15:28:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQx+j6ICMmFYX4cM9HRaYkUY+2SfkRJSmaNBaP/aHvbINQGGk7ElXDigFBW9V79ckWMZjM X-Received: by 2002:a17:906:5617:: with SMTP id f23mr1234445ejq.331.1591223331158; Wed, 03 Jun 2020 15:28:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591223331; cv=none; d=google.com; s=arc-20160816; b=nqIpJSow1kkspEz60cuZ5AxZNalVClKXmX4tTWu4czpvo9lI08H6nkuhRAkKoTxgZx sv/3+rt68bQoBSS/kViWkAZHPP0LWdVWmBAiCu6bg62fx06GmdzDp6o6nOx76a652FxS M9hXjMTLR510c5VeJAAv3SjIuXtdIGTIioMe3Cef/aY+yYO8B7T58HFkm4EF8lE+V0MV 6Tca+DJk8j24zLHSf5/41qGu4889+4kRHJnad2qC6lHqXgYil98xz7pC4HfCmC/T7qze /q+pm9gvuKx/WgVcNfcp4BA5QYvN7WEg57xngrvfdcfM/1SRcotUHP/+sdzpUoOZ4ruj yzEg== 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=cnU+iY+vMdWRNkLTXnQ4tw60kPsGNqQPSe87KahA6uQ=; b=JjvHczBMWbjSKlpRX47XPd+X7+rGFA6H3Ldte5ICNeLxHEGSA/mhVp3I4M5bN7dXLO qTPGLEr4fCzIZCvOf525cppAe8GyIU44qcr5gxmqvHLZF84E6kbmsDZLhXE79IQHMkKT 673c7hBfHV4NlgduoJZxSoz4W86YaLO6Xr7BAxMEjInshA7fS1OPZyztpxK6Qqa5w0wN QoRKYiSsEgcN5hsDOkk8uvfRSKwGZyokSczWMNC9MdMDvFJ5kyT8Q20lBvKqSm36z1TC 1Rs2iyqDDCYIVlyhs7tS4PYSlx7tsWPaAs60S9KUdHBR1Ks/qHgjNSTqdoah1xeZA84e KBRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=hu2DRe+T; 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 h2si477798ejp.341.2020.06.03.15.28.28; Wed, 03 Jun 2020 15:28:51 -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=hu2DRe+T; 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 S1726993AbgFCWXR (ORCPT + 99 others); Wed, 3 Jun 2020 18:23:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:56584 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726886AbgFCWWw (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 EA27C20872; 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=1591222972; bh=rOC8u/GP/YnBySLRTiNQTpMbuYdIjD0O7PCIgWG9wIE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hu2DRe+TkdcV+6abc7EOrpvaGRQAjn0UTkKID03ucjKZlicTCoUJ/0mOTE7Q0GdBn cpB8oj/ZrHJub+xseWoI3lPp1ARiFe+gh3jDJOUsq0PDZjjtAHyl1p6+aALT5p2pFL xgwEM8EVciiWcURbrwdY+NsDEdR1wLDmTAe8nRNc= 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 07/11] swiotlb-xen: add struct device* parameter to is_xen_swiotlb_buffer Date: Wed, 3 Jun 2020 15:22:43 -0700 Message-Id: <20200603222247.11681-7-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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c index 9b846c143c90..0a6cb67f0fc4 100644 --- a/drivers/xen/swiotlb-xen.c +++ b/drivers/xen/swiotlb-xen.c @@ -97,7 +97,7 @@ static inline int range_straddles_page_boundary(phys_addr_t p, size_t size) return 0; } -static int is_xen_swiotlb_buffer(dma_addr_t dma_addr) +static int is_xen_swiotlb_buffer(struct device *dev, dma_addr_t dma_addr) { unsigned long bfn = XEN_PFN_DOWN(dma_addr); unsigned long xen_pfn = bfn_to_local_pfn(bfn); @@ -428,7 +428,7 @@ static void xen_swiotlb_unmap_page(struct device *hwdev, dma_addr_t dev_addr, xen_dma_sync_for_cpu(hwdev, dev_addr, paddr, size, dir); /* NOTE: We use dev_addr here, not paddr! */ - if (is_xen_swiotlb_buffer(dev_addr)) + if (is_xen_swiotlb_buffer(hwdev, dev_addr)) swiotlb_tbl_unmap_single(hwdev, paddr, size, size, dir, attrs); } @@ -441,7 +441,7 @@ xen_swiotlb_sync_single_for_cpu(struct device *dev, dma_addr_t dma_addr, if (!dev_is_dma_coherent(dev)) xen_dma_sync_for_cpu(dev, dma_addr, paddr, size, dir); - if (is_xen_swiotlb_buffer(dma_addr)) + if (is_xen_swiotlb_buffer(dev, dma_addr)) swiotlb_tbl_sync_single(dev, paddr, size, dir, SYNC_FOR_CPU); } @@ -451,7 +451,7 @@ xen_swiotlb_sync_single_for_device(struct device *dev, dma_addr_t dma_addr, { phys_addr_t paddr = xen_bus_to_phys(dev, dma_addr); - if (is_xen_swiotlb_buffer(dma_addr)) + if (is_xen_swiotlb_buffer(dev, dma_addr)) swiotlb_tbl_sync_single(dev, paddr, size, dir, SYNC_FOR_DEVICE); if (!dev_is_dma_coherent(dev)) -- 2.17.1