Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp257608imm; Thu, 30 Aug 2018 23:00:18 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYfR/o+QT9S4xAFy9SVckf5jKD38yQHRtOWiFkiYPmDPwo/Wi9cv2rpTCDrqNiXJnrXUASD X-Received: by 2002:a62:fcd2:: with SMTP id e201-v6mr14268715pfh.101.1535695218563; Thu, 30 Aug 2018 23:00:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535695218; cv=none; d=google.com; s=arc-20160816; b=aiqKdmwf+5D4Cm9AMQNZN84PbrW8xt9yrytAX/yl2KhR5BC9BQS/BjaxOQumb/iEvk oatJn+CKTZcZzN/Af4o7vn6Xb0pa3pfB1nB1AUBHa4cFLqSBIhVF+9s/LWxUOaXXW9+5 Iqhkq7nkXqs98/+o7a2MbV0SsXVRp95nLfBe9EGFp3neryyJYvoavEAewIP2JppG5J5J F9wVMx4quJQEdSvcH67sPz/JyaaMPaX5zvDIj05NAJM9TaJ0p0cYRTO4Mlnq81dlOKi/ FeJF+xja4tdulnmK347bkytOF6VhFAocR1whd36XMGmGjpy0uvTlFXdp1D5eK2eZnZem VBUA== 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:dkim-signature:arc-authentication-results; bh=q811eMT5lda/oXK2icQo0XxLX74T529LrzCbrH/4PC4=; b=gkr/c54iOH+zyGYdvwXl656ZXUsFzwS+C8FnP939OFZGIRQ2kgQI7FW2PsntwDKF0Y P9x22TKYcJIbDnofWSDKeVSjZDSSqnPnTone7V0wI4kGkgAkVkmumoUarACAx2Ijpzps C8PT02ZuhFLY6pzpcLg46X+iiIbw5EXY9rUqpxvnK84Y8Al8SlsUi9M16TavUW3F/kps rtvta7+8wPWDY5INa9dVuM7N5jauD46VA02eCV7uPLxttVMJNxtC4ijrn/oTG9dfJYn2 g35q8s7H6IERYxfJWAzj829c9mJPn31IHYX+HzRWTcutO3fS5Po7JTHFTdsIyMZcrXZd BSfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=dDkJEwzd; 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 u5-v6si8075769pgc.459.2018.08.30.23.00.02; Thu, 30 Aug 2018 23:00:18 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=dDkJEwzd; 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 S1727282AbeHaJ4h (ORCPT + 99 others); Fri, 31 Aug 2018 05:56:37 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:34686 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727202AbeHaJ4g (ORCPT ); Fri, 31 Aug 2018 05:56:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=q811eMT5lda/oXK2icQo0XxLX74T529LrzCbrH/4PC4=; b=dDkJEwzdqMCj2YUoHyqYPcLhe CrH5EgWmDYAHifrAMbrXE6Kf/AkRhjtC+cHxsZFRsx3QevEjx1ivY662Lr0gPifMpcAnskkeMa1CP 8c63T6spuSxki/WsxARZ9yv4PcTz8zmoY3/0bBoaeTDkI1HX+wW/LxdfmxgVp/PBuczl1Z36XZxrU tMClLt+4JFI9Rw+LBkW1cIlzVQqy4L589CoJO7AaHwBFkWOyQ76soSodF8Fje9/1gWdTZ66QR3UZk 656iE3WvX0heatHJjUceinpRyW8MDVx2CovGPxc5CGKKBwRB/fQGUOH6XO09yaZg3ZKQjuvLlkubk 5C/yQXHIg==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fvcKV-0004DY-SV; Fri, 31 Aug 2018 05:50:47 +0000 Date: Thu, 30 Aug 2018 22:50:47 -0700 From: Christoph Hellwig To: Ezequiel Garcia Cc: Christoph Hellwig , linux-media@vger.kernel.org, linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Laurent Pinchart , Tomasz Figa , "Matwey V . Kornilov" , Alan Stern , kernel@collabora.com, Keiichi Watanabe Subject: Re: [RFC 2/3] USB: core: Add non-coherent buffer allocation helpers Message-ID: <20180831055047.GA9140@infradead.org> References: <20180830172030.23344-1-ezequiel@collabora.com> <20180830172030.23344-3-ezequiel@collabora.com> <20180830175850.GA11521@infradead.org> <4fc5107f93871599ead017af7ad50f22535a7683.camel@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4fc5107f93871599ead017af7ad50f22535a7683.camel@collabora.com> User-Agent: Mutt/1.9.2 (2017-12-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 30, 2018 at 07:11:35PM -0300, Ezequiel Garcia wrote: > On Thu, 2018-08-30 at 10:58 -0700, Christoph Hellwig wrote: > > Please don't introduce new DMA_ATTR_NON_CONSISTENT users, it is > > a rather horrible interface, and I plan to kill it off rather sooner > > than later. I plan to post some patches for a better interface > > that can reuse the normal dma_sync_single_* interfaces for ownership > > transfers. I can happily include usb in that initial patch set based > > on your work here if that helps. > > Please do. Until we have proper allocators that go thru the DMA API, > drivers will have to kmalloc the USB transfer buffers, and have > streaming mappings. Which in turns mean not using IOMMU or CMA. dma_map_page will of course use the iommu.