Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2959599ybl; Thu, 29 Aug 2019 15:50:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqw5MS0Ttuq4oKGYiXsGZIMDuFtMJr493vyUwm4R5uInxL59Fd10bQsSG5asZtqPq/Ctg8if X-Received: by 2002:aa7:81c1:: with SMTP id c1mr13984412pfn.78.1567119038069; Thu, 29 Aug 2019 15:50:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567119038; cv=none; d=google.com; s=arc-20160816; b=vx+62d04qFbDhdyeCUDgY1N2RxQIfqrf+ELuhzNUuPrP/XkWTl9BbJw92xuVdUi4LO DJciVM+0MFXCv+jvmfo7U0UJOgRRz7aQ02StBNX2q8Gmd0JAYz2MoQvPiQK3k0KenJAs 3KS+SQk060CZ44fWk/J27uQG5QReMs5lv/DGVCwvbSv1QUlRkrIdOPFaDgJxcH+kYqbC ceNFF3KI/4FujjdutM6L7oXvgijbVQncUKRa8SYLrWd1CAfoOhxwIUCqL++EP2UUpvIj vjxCvVOSJN9+Ac9R+HyBYOl/IdHtBF3Nj0GkgoOjWyAUooQTYc2dJP0gyDStLFd7X0GM zbDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature; bh=je8GDPNjUyWNXknBrDgVOiQaRxdi85JWFup5kSzxeRU=; b=u98as2M7XOHsx7fRrxwRy9JmasUBPpVPwJrvBw9z97Sy4CkmfbWoYJYi1p9JaYZPkD 8BevdMDoiCEiN1gJXgoCHGmsbx7N2PnglNJMVEaLKD+bYEi3kiRzny/OX2t2GFm3Jnmv a3rmAPOlr0nwaPk4XWn0NSJJ1o77yP90W7CuupdujbEUW1cbZEeaL0IHmmBk8rhbHDHv PXloDrynd1NZ3PYl3YRW/23SEAppGLORDIsv3FB4F6oKQ9z2KjYSao7YKpLeRwLdkcWH wGVwMekynRzL5chJxDbZNiCETsuSDCnExLqstbt9zhIz5ektTaKOISSODvPpkceilu7P ZbtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="lox9/f+o"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b5si3157084pla.342.2019.08.29.15.50.23; Thu, 29 Aug 2019 15:50:38 -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=pass header.i=@kernel.org header.s=default header.b="lox9/f+o"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728602AbfH2WsN (ORCPT + 99 others); Thu, 29 Aug 2019 18:48:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:60782 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728023AbfH2WsN (ORCPT ); Thu, 29 Aug 2019 18:48:13 -0400 Received: from localhost (c-67-164-102-47.hsd1.ca.comcast.net [67.164.102.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A476C21874; Thu, 29 Aug 2019 22:48:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567118892; bh=qahLSZidWBqyiJ9KPLWGgOnki/Ohn0lpoN98VUjbdJo=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=lox9/f+oJeZihIIKB+HOTjYdPrpnsEmbhUNTlvyPbLyIuqorYqCD/5ugnctXNXr5S h9zmT10Nj3xoPfMfmjrctVtlI6lWBTjpTEDIPjzV13CX8jSzyEDs3QtOFIQ8vJWNJn iP9g2neD8o6CjtcvfTYgSj6BBKHMbvfVJOT8Yk/g= Date: Thu, 29 Aug 2019 15:48:11 -0700 (PDT) From: Stefano Stabellini X-X-Sender: sstabellini@sstabellini-ThinkPad-T480s To: Christoph Hellwig cc: Stefano Stabellini , Konrad Rzeszutek Wilk , 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: Re: [PATCH 10/11] swiotlb-xen: merge xen_unmap_single into xen_swiotlb_unmap_page In-Reply-To: <20190826121944.515-11-hch@lst.de> Message-ID: References: <20190826121944.515-1-hch@lst.de> <20190826121944.515-11-hch@lst.de> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 26 Aug 2019, Christoph Hellwig wrote: > 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 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 >