Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp793812yba; Thu, 18 Apr 2019 09:37:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqw+9APqPc0lu4oXGNIqqRw8vjPOTE67aO8q0gzfHkXmfJLH5w7Y3M9p3mZKTNe10q8doax1 X-Received: by 2002:a17:902:27e6:: with SMTP id i35mr7041451plg.321.1555605434110; Thu, 18 Apr 2019 09:37:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555605434; cv=none; d=google.com; s=arc-20160816; b=IGjahp8/1UuUihKVOfnnGiiKi3yaKW4D4vDGCO0iSFeS8aMK/ItlywLeOoGdVukUPO XtKCOtNVhz9SyhfA3/lnLsVsX3rhyyDk0ew9rx80qHw/lZP0PhJd0hSsT2q8d1cOhRci YlMiaKofVHRlwaNmwmLol9f7YPKuv1Rl2pBRm9Q+pn6FKsXgsZp2D+iRpNyZbsjKIUpk DBd+xe4kTyAvG5EU/CU+tamRyCAkYyRXfiUu+1cwyQ4UOJOJ4FxBMyremnjqsRx3ETih rgk0dvzBrWBhqhL7bHCiiKeuFQ7n1jv6VvxY0RcDss9PbndAhi6g8T27tVWWRH2JcvLZ Sjxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=oecoxhG21OdVK5/e81/4ZV7b5dYUXv+y7hVfqBI19PA=; b=ycCzv0DmuDZtHQSILV/74uH24lmU2pikNlOv+IYzt1PmVQUFavXsm/I52xJ70D2vWh Jk6id4zrUygx5Pm+x6wTUOhftdzkd0wXB784pbVq37AX2+tOhUdAz6JyyPcci6+tk7Ta vDcEZbSzhC1vwjznEJLNFFVI7XKH/Fenv3lGWAraSFM5I2LX+hpdoJuThKWnOTK5Afww ZB0j/l8dFlqWORSRnPbiUcy4bPoQ1Iy6b56EP2kl8OyAbUglLToTKGRp7x0RMriRtzIl leOWa389TQXQ+w3N/SmRqDQIbpAQG93dkc5DHFkuH1aVQhVU+0AQVa1EvmlOrQ4je63G jnWA== ARC-Authentication-Results: i=1; mx.google.com; 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 1si2506245plo.217.2019.04.18.09.36.57; Thu, 18 Apr 2019 09:37:14 -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; 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 S2389579AbfDRQf2 (ORCPT + 99 others); Thu, 18 Apr 2019 12:35:28 -0400 Received: from verein.lst.de ([213.95.11.211]:50822 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388387AbfDRQf2 (ORCPT ); Thu, 18 Apr 2019 12:35:28 -0400 Received: by newverein.lst.de (Postfix, from userid 2407) id E434368AFE; Thu, 18 Apr 2019 18:35:12 +0200 (CEST) Date: Thu, 18 Apr 2019 18:35:12 +0200 From: Christoph Hellwig To: Robin Murphy Cc: Christoph Hellwig , Joerg Roedel , Catalin Marinas , Will Deacon , Tom Lendacky , iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 12/21] dma-iommu: factor atomic pool allocations into helpers Message-ID: <20190418163512.GA25347@lst.de> References: <20190327080448.5500-1-hch@lst.de> <20190327080448.5500-13-hch@lst.de> <20190410061157.GA5278@lst.de> <20190417063358.GA24139@lst.de> <83615173-a8b4-e0eb-bac3-1a58d61ea4ef@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <83615173-a8b4-e0eb-bac3-1a58d61ea4ef@arm.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 18, 2019 at 04:06:56PM +0100, Robin Murphy wrote: > OK, I'm still looking at mmap and get_sgtable, but for now I've pushed out > a partial branch that consolidates alloc and free in a way which makes > sense to me: > > git://linux-arm.org/linux-rm dma/rework > > Please let me know what you think. From a very high level POV this looks ok, but sometimes a bit to convoluted to me. The major issue why I went with the version I posted is that I can cleanly ifdef out the remap code in just a few sections. In this version it is spread out a lot more, and the use of IS_ENABLED means that we'd need a lot more stubs for functionality that won't ever be called but needs to be compilable.