Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp802764ybe; Thu, 5 Sep 2019 06:15:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqwunb/UTmtSCHvJY+LFfnWprWR1jNxSZwzpuC60DTKDoVUfkQmv2IUlZRX4o/YKMLpdNFbA X-Received: by 2002:a17:90a:f83:: with SMTP id 3mr3779037pjz.90.1567689306278; Thu, 05 Sep 2019 06:15:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567689306; cv=none; d=google.com; s=arc-20160816; b=a31pzdcZLDoMQXxZUuPOlrj46gUN86CAd+2pa8a4JgWpx5RadIooe5HaUdE+T004i0 gXEdWSoB9rWdy2DxlJKrZB47n0uvG+VYYz5/A77LD8/dJ1lob7SNlu0GpXNMQZA7FeMt OOnsgBsPsWxJQFwcgd3FhztrmyBYynwIE33bW3nfW/WbRjhDENbS8Jg30azPyXO+yHiM 9WiNyz5neRhMZVeyw+CVi+aupiyFcXliOS5v688ldoLz3eenNcDripuEP/17SInWpiy1 osodk9s8KUw66B5tYt+3x0lc4y04pl9DxlGJN4BcyYhYvZa2GXQyjSWG78XU3Mijq3ss PYyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=nKfAd6kn7o0OFMdVf0qLOsCzeZUMPjFVUBcPofF+5Rg=; b=on30hRWkLe16oucHcS19iG66P3Vafgc5+xiVTwB59ezwux4+rCKTpUhXAgKLuhulza IwdBjxklza2gY9FGX6Siqr9UcB6tqflxURMJFVPy7rBBAcaLkWHLvTtY/5dCrRt2WS6t SRxkVNv8/EAWL1aLl/5/g0BS1U4obPbcLrNnM8lf250sQi1Jd7QPqlKnlnFWJuE3sAaD BQP2VbGc76B0A4d9+1d6mvUXUTxLkOB6ytzF9txpL+4R4piLHXsQhDj4tZFRsqQvPGod FhVUFlOpvky9AouSeb4ww0mhrXltqsTIq+iAZSUM4ertzVYdq0nfdmosfi09OjpycLXh f95A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=jCyEr776; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t1si1844878plo.8.2019.09.05.06.14.50; Thu, 05 Sep 2019 06:15:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=jCyEr776; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388772AbfIELlR (ORCPT + 99 others); Thu, 5 Sep 2019 07:41:17 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:52386 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725921AbfIELlQ (ORCPT ); Thu, 5 Sep 2019 07:41:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=nKfAd6kn7o0OFMdVf0qLOsCzeZUMPjFVUBcPofF+5Rg=; b=jCyEr776D3nxSkDU85Kvr2nKrg apvn3y/CKNNzAYALPDIhVibSrHwWiZptPpAvFHGSmsyoqFLiX4JOxzMmjvsnEdzvmTBhW0K3gvYYy faYTytyZvmYvLzHN0CgJoMZklGXamvbnhN1tdDhr8YRwmKKMmH4OUhgB/bOBtwKPERKdaB0Aabgw9 slt55H8YrhCei0l6wdNevU1pcA9/535gVuWS3mxqV5D1PkQFcq1mjavOgPlTa57Un66VTXCAU2GIe xb5r/0Dik7Is4JYGc9OQSTYZuR/syJrQKielTJvaTZr66ooXXiQI/8JOletIyEfbFMTTqq80k4avj pCxcwslg==; Received: from [2001:4bb8:18c:1755:a4b2:9562:6bf1:4bb9] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1i5q8V-0005BS-QT; Thu, 05 Sep 2019 11:41:12 +0000 From: Christoph Hellwig To: Stefano Stabellini , Konrad Rzeszutek Wilk , gross@suse.com, boris.ostrovsky@oracle.com Cc: x86@kernel.org, linux-arm-kernel@lists.infradead.org, xen-devel@lists.xenproject.org, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: [PATCH 10/11] swiotlb-xen: merge xen_unmap_single into xen_swiotlb_unmap_page Date: Thu, 5 Sep 2019 13:34:07 +0200 Message-Id: <20190905113408.3104-11-hch@lst.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190905113408.3104-1-hch@lst.de> References: <20190905113408.3104-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org No need for a no-op wrapper. Signed-off-by: Christoph Hellwig Reviewed-by: Stefano Stabellini --- drivers/xen/swiotlb-xen.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/drivers/xen/swiotlb-xen.c b/drivers/xen/swiotlb-xen.c index f81031f0c1c7..1190934098eb 100644 --- a/drivers/xen/swiotlb-xen.c +++ b/drivers/xen/swiotlb-xen.c @@ -418,9 +418,8 @@ static dma_addr_t xen_swiotlb_map_page(struct device *dev, struct page *page, * After this call, reads by the cpu to the buffer are guaranteed to see * whatever the device wrote there. */ -static void xen_unmap_single(struct device *hwdev, dma_addr_t dev_addr, - size_t size, enum dma_data_direction dir, - unsigned long attrs) +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); @@ -434,13 +433,6 @@ static void xen_unmap_single(struct device *hwdev, dma_addr_t dev_addr, swiotlb_tbl_unmap_single(hwdev, paddr, size, dir, attrs); } -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) -{ - xen_unmap_single(hwdev, dev_addr, size, dir, attrs); -} - static void xen_swiotlb_sync_single_for_cpu(struct device *dev, dma_addr_t dma_addr, size_t size, enum dma_data_direction dir) @@ -481,7 +473,8 @@ xen_swiotlb_unmap_sg(struct device *hwdev, struct scatterlist *sgl, int nelems, BUG_ON(dir == DMA_NONE); for_each_sg(sgl, sg, nelems, i) - xen_unmap_single(hwdev, sg->dma_address, sg_dma_len(sg), dir, attrs); + xen_swiotlb_unmap_page(hwdev, sg->dma_address, sg_dma_len(sg), + dir, attrs); } -- 2.20.1