Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp3752544ybg; Mon, 28 Oct 2019 18:46:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqwPUNsP0ql8BYs4G3kYGRr34yCb6QLhq+TQb4SqNF9k2dfyle8de+Wh6G4qspBY0jAB6hBO X-Received: by 2002:a50:ac1c:: with SMTP id v28mr23376560edc.156.1572313597192; Mon, 28 Oct 2019 18:46:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572313597; cv=none; d=google.com; s=arc-20160816; b=so/TznxDOyo8/b0nLfGoDF4HgSsA2EfviW5lU09+qn5F8/NmEcNZvBK0P+XZdMDXT5 L80nJxhBEXEbVcv5Fj5XCHIREnp1ePAllzF+hj9qqrebVPA9b37TKwgSmoTrGgDYIHfj 4FrEay1Cbkvtkrm0FPK2/hBwXVuxAjdZaxva9exr0ym6OJJuIvz0N8U73ibo9ziqXBH3 nqe/Uj+QA4VlgAA2uiy4S+7cfhUejHwbpj0rjnWAhZacvUKW4XSo3vpLeO11LL1EJqYr hUMTVLq/KeDplzFFc1/fuJutGa/vandXIpFZL+bKLBbsZLZcM58GSBN+cnR4uTBy2pBD DJag== 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=X0S+sTo+zvljholf2OgqDj183h0L8FGZoIYLSPLWaJI=; b=zkTBIEypnKnAQJqKdRaXoHXT5ttrBWQ38ffUv+xDyg5dH0znXCbZpk3jqWbxesApmh qsGpkiT3SiK4Gix8en9KtV7e3ymjwytYwRxxhxfabRWt+RokMuP0+a9v+RNOlPKm9FIm CAy8ZnU5tCjzpMf93PpdhYZyd46DP6PpCR25iElFLYwVICpPQOjbY7BF5s5nhRQE8HpD zCJ1kS0dGyGKbNQJUT195rSnX/Rgq9lV6PvY4ELcOTUToYZRTeH4t7uyJbqYCJSSqQdR ZAJciLGdXH+qtcKjnDq2VIL2weUOo+p/xINxPLdyafE6wFGHqcRl7YItHW7CdJbSuJlw tozA== 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 w23si6489461ejb.156.2019.10.28.18.46.13; Mon, 28 Oct 2019 18:46:37 -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 S2389132AbfJ1MiJ (ORCPT + 99 others); Mon, 28 Oct 2019 08:38:09 -0400 Received: from verein.lst.de ([213.95.11.211]:34263 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727024AbfJ1MiJ (ORCPT ); Mon, 28 Oct 2019 08:38:09 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id F170068B05; Mon, 28 Oct 2019 13:38:05 +0100 (CET) Date: Mon, 28 Oct 2019 13:38:05 +0100 From: "hch@lst.de" To: Laurentiu Tudor Cc: "hch@lst.de" , "joro@8bytes.org" , Ioana Ciocoi Radulescu , "linux-kernel@vger.kernel.org" , "iommu@lists.linux-foundation.org" , "netdev@vger.kernel.org" , Ioana Ciornei , Leo Li , "robin.murphy@arm.com" , Diana Madalina Craciun , "davem@davemloft.net" , Madalin Bucur Subject: Re: [PATCH v2 1/3] dma-mapping: introduce new dma unmap and sync api variants Message-ID: <20191028123805.GA25160@lst.de> References: <20191024124130.16871-1-laurentiu.tudor@nxp.com> <20191024124130.16871-2-laurentiu.tudor@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191024124130.16871-2-laurentiu.tudor@nxp.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, Oct 24, 2019 at 12:41:41PM +0000, Laurentiu Tudor wrote: > From: Laurentiu Tudor > > Introduce a few new dma unmap and sync variants that, on top of the > original variants, return the virtual address corresponding to the > input dma address. > In order to implement this a new dma map op is added and used: > void *get_virt_addr(dev, dma_handle); > It does the actual conversion of an input dma address to the output > virtual address. We'll definitively need an implementation for dma-direct at least as well. Also as said previously we need a dma_can_unmap_by_dma_addr() or similar helper that tells the driver beforehand if this works, so that the driver can either use a sub-optimal workaround or fail the probe if this functionality isn't implemented.