Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp784797ybm; Tue, 21 May 2019 03:34:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqy4zP4GZQSvAvIQOkyCreC2xpMIVYYvBFJmbwev2feKZwAig/W9DvysB8w4s8HqehqlsFHI X-Received: by 2002:a63:9d83:: with SMTP id i125mr75344937pgd.229.1558434854235; Tue, 21 May 2019 03:34:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558434854; cv=none; d=google.com; s=arc-20160816; b=o1iXU5Vu72BjU0HZz/dN5qu3vGLbt3+Cm6q98kXkG7TNLPb+s1kyzBwlEHats6zjdr DISfu+ElvKNflIE1jy7fNWtB76YgBaSEhIM7kQc+bfzXTG/vGrtu5oy5oggZY+UaTSMV W6ccHMEZWLALhFupOVSqp7ENu3JJpoO2738zsoO09TOL/obJy0KyGjXghG+BjGSZBiN3 aZsXtbo+gj/TMPuwnNZkUilf9hHttUGnh0sgrIIFBtBU/gA7HJTwQPQM78j0o384sz// vFY1Vc8bMqTJE3xi8juE7P5/Vp2zlibhPxBqo784pNYPe3TFGo1wbUAq3/zWiNUJ0VkB yC1A== 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=xopF+5YGoZfxOBODl+YYg3Rh6QX+nrysQ/JcEOJ+JyM=; b=ihjvdOjacqOysg7IwFYILxr3BcLRDB96HOyJ7oQ92dC5LE13xg6YpWATnIjC8ho1Jm REZpDoQRLY9E3pXM+Bd2VRPHxgXhX5pFGE61mnPL8GOdCHMmkAog0zfLUQ73+L/1sNM1 j8YWhdyOx5BxFeaehLKZpmPL/WytTgn/aymhrN7RtbWxCqHS5Rm/c1DlBZrMJBLR+6/a SHgMEVsRaeR42w/L41vd1Led8Mvyvtq3WaD0EERFAMaCDcVRb0L5zS9RLJR4u3gV/4Pv D3fFDTy+HHRzwm9YtvdXWGvWM/j4kDnGYk3nwM8W89HMdESSUX/qr8d6ORbu1ymn2ZZ7 1Q2w== 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 d4si12679584plr.297.2019.05.21.03.33.58; Tue, 21 May 2019 03:34: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 S1727688AbfEUKci (ORCPT + 99 others); Tue, 21 May 2019 06:32:38 -0400 Received: from verein.lst.de ([213.95.11.211]:59186 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726448AbfEUKch (ORCPT ); Tue, 21 May 2019 06:32:37 -0400 Received: by newverein.lst.de (Postfix, from userid 2407) id B230C68AFE; Tue, 21 May 2019 12:32:14 +0200 (CEST) Date: Tue, 21 May 2019 12:32:14 +0200 From: "hch@lst.de" To: Fredrik Noring Cc: Laurentiu Tudor , Robin Murphy , "hch@lst.de" , "stern@rowland.harvard.edu" , "gregkh@linuxfoundation.org" , "linux-usb@vger.kernel.org" , "marex@denx.de" , "JuergenUrban@gmx.de" , Leo Li , "linux-kernel@vger.kernel.org" Subject: Re: [RFC PATCH v2 0/3] prerequisites for device reserved local mem rework Message-ID: <20190521103214.GB1973@lst.de> References: <9d34015d-c219-179b-3141-4b0de3530ac3@arm.com> <20190514182931.GA2559@sx9> <0e5f3b86-7a80-eec7-691b-34a123194208@nxp.com> <20190515162858.GB17162@sx9> <20190516151548.GB53952@sx9> <5fa97254-3038-6fe7-a7e7-a267262049c6@nxp.com> <20190517174159.GA32450@sx9> <3c8897e9-218e-3fff-1735-816ffd30e908@nxp.com> <20190520154156.GA3664@sx9> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190520154156.GA3664@sx9> 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 Mon, May 20, 2019 at 05:41:56PM +0200, Fredrik Noring wrote: > 2. A device address is supplied as phys_addr_t phys to gen_pool_add_virt(). > This seems to work in this particular DMA application, but there will be > problems if someone does phys_to_virt() or suchlike. Can this be improved > or clearly explained? gen_pool_virt_to_phys() searches in address ranges, > for example, so it appears the implementation uses phys quite carefully. Well, it is a physical address, but not one that has a kernel mapping. So phys_addr_t seems right here, but an additional comment explaining it is not in the kernel mapping never hurts.