Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2955225ybl; Thu, 29 Aug 2019 15:45:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqzEVx24HsEJ24yV5XeoBowAsCcXPWLYXB1aBOfUQsHdCkoNnUHUUKr9h7jaBY9RXvHimQu/ X-Received: by 2002:a17:902:3265:: with SMTP id y92mr11087419plb.343.1567118710745; Thu, 29 Aug 2019 15:45:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567118710; cv=none; d=google.com; s=arc-20160816; b=z1X4s6aVLJ3ksrGPsE0XA8LawhDYpH6O2qkcpQdKy09E2aaoIIEprr2NG51CypjSzD vgr8UW793GK/7w2V1X5pnheW3JqLOkKI2c4yBjkd5h2Olbq8Bd4ruEtrKGbBsAIEtYNZ 1nvzPhX+YESrVXG9oVWUcF5fGihd6HcUSn+g9Xy7xJatgRuazimw23xSDE0j2CQKCXdL znNjmZ4Ptx+dutl4XL8YniJohGIsAZlZvFt7Ntb3NWqzJ36VOhvTPiRY7sGvoOBwujp7 H3M35/ftaWyZSl0n5mMQcS5WBEhk5P/sIvWqtI6b7bWo/oHgFTyhUxqs3S/SnGFYIDKR jaAA== 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=6AIOTZdK/hN01GEQrxf04Ppmot3sMo56mvM57acoC5w=; b=s0XowGfycl2CB7L57sLWyJ01jOowVD9Qu8KgfuUk4MU6M0rRIQDvXJ7qRxfBQ9VdUa fQtafS2m5+4erN6sstb8xXbqnkAiMYtGAi0RFOzNuHih1DpfFxSVveg8bMXbSb0nToc8 rSrmJ6V664eqsMjm68tQDi0LraLnTyefyO6WaIQ+Nui7lPExWOzxsUblpXC3WlzKxfYr o4fMcwRU3HENKFqeYaw71O6gnJWB7A0NbXsEk/vTM/UPA83FuGDzj1iQRy6D46evlUBg MDyWUuOMvMvOc3c1NpR4vDN4foa//oWpeuSUjgEMCiCAHQ6EvOySp3n6d+5GxwJ0NtCF 91Ng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LG+7fN41; 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 z11si3319512pjq.102.2019.08.29.15.44.55; Thu, 29 Aug 2019 15:45:10 -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=LG+7fN41; 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 S1728679AbfH2WmM (ORCPT + 99 others); Thu, 29 Aug 2019 18:42:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:57956 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727826AbfH2WmM (ORCPT ); Thu, 29 Aug 2019 18:42:12 -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 A39D32189D; Thu, 29 Aug 2019 22:42:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1567118531; bh=xHkEUC70NyhQrdUtUwDNpqvFabXbH4FNTzDPXPE1tqY=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=LG+7fN41BbkQDRJj56NLA6759Otnvnf3nvVutDii10+eEzLBlDeRKXwPCpCclCsiA Cl7GH+XwZzjeaHNfXrbRV8R+5ceePqFPWCu9iGGxmTfFsCxbnOr/pXW9XZEEsWSbYn rrnwK2ejARhZqSJAQfOT6+NQJikZVzm+uVGT9078= Date: Thu, 29 Aug 2019 15:42:10 -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, Julien Grall Subject: Re: [PATCH 04/11] xen/arm: remove xen_dma_ops In-Reply-To: <20190826121944.515-5-hch@lst.de> Message-ID: References: <20190826121944.515-1-hch@lst.de> <20190826121944.515-5-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: > arm and arm64 can just use xen_swiotlb_dma_ops directly like x86, no > need for a pointer indirection. > > Signed-off-by: Christoph Hellwig > Reviewed-by: Julien Grall Reviewed-by: Stefano Stabellini > --- > arch/arm/mm/dma-mapping.c | 3 ++- > arch/arm/xen/mm.c | 4 ---- > arch/arm64/mm/dma-mapping.c | 3 ++- > include/xen/arm/hypervisor.h | 2 -- > 4 files changed, 4 insertions(+), 8 deletions(-) > > diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c > index 738097396445..2661cad36359 100644 > --- a/arch/arm/mm/dma-mapping.c > +++ b/arch/arm/mm/dma-mapping.c > @@ -35,6 +35,7 @@ > #include > #include > #include > +#include > > #include "dma.h" > #include "mm.h" > @@ -2360,7 +2361,7 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, > > #ifdef CONFIG_XEN > if (xen_initial_domain()) > - dev->dma_ops = xen_dma_ops; > + dev->dma_ops = &xen_swiotlb_dma_ops; > #endif > dev->archdata.dma_ops_setup = true; > } > diff --git a/arch/arm/xen/mm.c b/arch/arm/xen/mm.c > index 14210ebdea1a..9b3a6c0ca681 100644 > --- a/arch/arm/xen/mm.c > +++ b/arch/arm/xen/mm.c > @@ -163,16 +163,12 @@ void xen_destroy_contiguous_region(phys_addr_t pstart, unsigned int order) > } > EXPORT_SYMBOL_GPL(xen_destroy_contiguous_region); > > -const struct dma_map_ops *xen_dma_ops; > -EXPORT_SYMBOL(xen_dma_ops); > - > int __init xen_mm_init(void) > { > struct gnttab_cache_flush cflush; > if (!xen_initial_domain()) > return 0; > xen_swiotlb_init(1, false); > - xen_dma_ops = &xen_swiotlb_dma_ops; > > cflush.op = 0; > cflush.a.dev_bus_addr = 0; > diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c > index bd2b039f43a6..4b244a037349 100644 > --- a/arch/arm64/mm/dma-mapping.c > +++ b/arch/arm64/mm/dma-mapping.c > @@ -8,6 +8,7 @@ > #include > #include > #include > +#include > > #include > > @@ -64,6 +65,6 @@ void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size, > > #ifdef CONFIG_XEN > if (xen_initial_domain()) > - dev->dma_ops = xen_dma_ops; > + dev->dma_ops = &xen_swiotlb_dma_ops; > #endif > } > diff --git a/include/xen/arm/hypervisor.h b/include/xen/arm/hypervisor.h > index 2982571f7cc1..43ef24dd030e 100644 > --- a/include/xen/arm/hypervisor.h > +++ b/include/xen/arm/hypervisor.h > @@ -19,8 +19,6 @@ static inline enum paravirt_lazy_mode paravirt_get_lazy_mode(void) > return PARAVIRT_LAZY_NONE; > } > > -extern const struct dma_map_ops *xen_dma_ops; > - > #ifdef CONFIG_XEN > void __init xen_early_init(void); > #else > -- > 2.20.1 >