Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp4153318ybl; Mon, 26 Aug 2019 06:20:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqwuVegfOxuKy/+3qMMrtl5JNVNXUGxOGmtlDvX1y6cf3CNaJuH77rgJQXA3QaM0EKQGHb2l X-Received: by 2002:a65:5144:: with SMTP id g4mr16441605pgq.202.1566825652221; Mon, 26 Aug 2019 06:20:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566825652; cv=none; d=google.com; s=arc-20160816; b=PO1ZlpLTudTgdbRXxSznvZYtQ1nnLu92TverIB0FksSZPP1b6J7SBDrXMw5fwGet5b Xi64PMeue7lK++BPulEY9G1oeOohbjlFtwkn6wmIy2c4aDAQVqDd5NvtiAUZfjkKNI7k 1qbZsFbC63aOTnNZxIDcshY+SPW+j9JKX36ba9TVbchNQ39MSL/NK/Gsn1iT0nSCtKSH OHH5BxxLbGFPL1rudb2IcvoQt0j3gd8f6MRr5EHDsrgRMr6OpojT2UQy+9mJwljYE3zR UM0THCktPnC/kW7kF67qhNnYtGN676pLRUC6HfaYHE86JSdvq1h40UZNU6F/SkJp7gYo o3Dw== 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=0tSMllic9oVfu0f4xPvD0IBZHN0oierJ545FtJepfzM=; b=TaTq8cqC/wZ1fapbSMCAxMBDo/CEHG0hrulq9PBiyuI68GtoF4215fCl50PcacyNPO 07DQQ2WWyQ9eEYOb+L99UyxNj319+4joFpnsCejgfI+WZ//KMSdgvEyBkkhiM1DECpMr RqxwXmmOJfAFoJWtREYgeXeskgBy3GZWJyMHy427GFQezgElsBcrs1u9Zt5fVghX0on6 bo+y+/XQ5VU02Q8s30BaQqcYTYv6NcIw0UzB23ZSYaUVrNnNHieV18WtNlziXZX40cu4 hSrhq7rFSkAebZXIEfaSBmt5xiFQEKRstwRpp388FvsxipLLQyaLlt3LvWVZbaIVfHp3 b/Iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=S9JG0MNS; 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 21si8773470pgk.492.2019.08.26.06.20.36; Mon, 26 Aug 2019 06:20:52 -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=S9JG0MNS; 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 S1731884AbfHZMUU (ORCPT + 99 others); Mon, 26 Aug 2019 08:20:20 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:50312 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731854AbfHZMUS (ORCPT ); Mon, 26 Aug 2019 08:20:18 -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=0tSMllic9oVfu0f4xPvD0IBZHN0oierJ545FtJepfzM=; b=S9JG0MNSbTrudAqrn0zwmDRPQt Su8RWXxwch73jgR+SsMuz9mYimOy+KL3jFz26itZ92R1RfHD+3kin/Gt2pGSwrH/AAo58EcIn1u+I gcpyOpw4xb3vSr4PporXHCficdBlFfVw8QLIHaMiZyGM+l0VQwoYlWsk4/0BemZHmlb/WonqczrHh Z6EFlPcINmSnSX8TP6nkoP5kilyAPYSZM4YmFGKkZaljTTDdvmA/pPTwOLzlA/FR39iYHdjEdJ2Pl jg/6PVmQeCpHzx/fco4LqRaVM26ZJUMUAscDuM5ERRwyYN26gtosMS8Lzl7rTS2PgfDrZFu4hWT3x kgLQE2cg==; Received: from clnet-p19-102.ikbnet.co.at ([83.175.77.102] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1i2Dyo-0003os-VQ; Mon, 26 Aug 2019 12:20:15 +0000 From: Christoph Hellwig To: Stefano Stabellini , Konrad Rzeszutek Wilk 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: Mon, 26 Aug 2019 14:19:43 +0200 Message-Id: <20190826121944.515-11-hch@lst.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190826121944.515-1-hch@lst.de> References: <20190826121944.515-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 --- 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 95911ff9c11c..384304a77020 100644 --- a/drivers/xen/swiotlb-xen.c +++ b/drivers/xen/swiotlb-xen.c @@ -414,9 +414,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); @@ -430,13 +429,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) @@ -477,7 +469,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