Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2285719yba; Fri, 10 May 2019 09:03:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqwtxd6KlHDM/KvG+rVTuarnikGyecIccu35UMoJv/ov7CYnJ7zFeCs/b9ZcvRb25U0M911j X-Received: by 2002:a62:38cc:: with SMTP id f195mr15430500pfa.15.1557504226556; Fri, 10 May 2019 09:03:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557504226; cv=none; d=google.com; s=arc-20160816; b=pqNsY2uu5JyEnRd251m+LN/QWiljUJtgJ1zmzWS1t7mnsWkTfDnDk+2YIM7r4lq9Dl yxYM5Ip/Gboonw/xlaLSUG0dZEZveLYT57uwM+VfeGPhOlFS06RYTzbcQI1XBwGLtdDy IIolf30ETvncTk2g689Y0qv+zZNcO71PR+17NZB0vLXEJRCNBYEbSzc/PGgR5kozfAXg QLQuOrThYd3bSWX5ATV1SIARyEskqx0mvZ3Dvj4+lQ6w5zCgsjEua6bLh0V4wdCqsGNC SeaKJkytF3hrVkJzkLTdQ6j7X0w46YU3U26yBiRuzNuOQqNdlQbKDACOUktPjOrYPd9K uNHA== 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=1H87Yz0LOyrxOlGkz5ICPlde9nMmCHf246S10ZPyqdc=; b=Ce9DTPG99vEyfXjaf9coACv1rE51anPQBv0xQ2I3/XSYYVwSDHJINeo2BpA8oO097x IL3EGs2wmdf8iXLK34qegD1jteWZvESZO6kbm3Mx606AbdctYuG4FhkjZG9QfLHpYBiT ql6BlfV5RWVVjz8MpQ2bxSBfgFxS8cRQdEGFJ6L5Z/VVHx3gRyt9E0QaUzdnBuSqccvw zgDvdHK3lexVdyCfa1w4O549gqShW9v8sOhWFKjKVO8mKyteZHw7YrTFT199PmYfwk74 ljyLf+VC01D5KkY6R4VU+tTs8LMOcFlObRa6Q50bKieF3ZjRBRHHlbT7my0s20bfSsYK Gc8A== 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 a23si6122587pgg.263.2019.05.10.09.03.29; Fri, 10 May 2019 09:03:46 -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 S1727874AbfEJPx6 (ORCPT + 99 others); Fri, 10 May 2019 11:53:58 -0400 Received: from verein.lst.de ([213.95.11.211]:53299 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727864AbfEJPx5 (ORCPT ); Fri, 10 May 2019 11:53:57 -0400 Received: by newverein.lst.de (Postfix, from userid 2407) id 785A668C65; Fri, 10 May 2019 17:53:36 +0200 (CEST) Date: Fri, 10 May 2019 17:53:35 +0200 From: Christoph Hellwig To: Robin Murphy Cc: laurentiu.tudor@nxp.com, hch@lst.de, stern@rowland.harvard.edu, gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, marex@denx.de, leoyang.li@nxp.com, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 0/3] prerequisites for device reserved local mem rework Message-ID: <20190510155335.GA32010@lst.de> References: <20190510145646.10078-1-laurentiu.tudor@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 Fri, May 10, 2019 at 04:03:37PM +0100, Robin Murphy wrote: > Hi Laurentiu, > > On 10/05/2019 15:56, wrote: >> From: Laurentiu Tudor >> >> For HCs that have local memory, replace the current DMA API usage >> with a genalloc generic allocator to manage the mappings for these >> devices. >> This is in preparation for dropping the existing "coherent" dma >> mem declaration APIs. Current implementation was relying on a short >> circuit in the DMA API that in the end, was acting as an allocator >> for these type of devices. >> >> Only compiled tested, so any volunteers willing to test are most welcome. > > Based on my diggings into this in the past, I would expect that you need to > do something about hcd_alloc_coherent() as well. Yep. And it might make sense to share the code for that and the ohci internal allocations with a helper.