Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2221536yba; Fri, 10 May 2019 08:06:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqyvA+a8bjRKDVgV5VcPIUeJlQolfvQtyVMCA0SXLPbkVargeNp28sOSkGfPmAekPoUb32OS X-Received: by 2002:a62:1b03:: with SMTP id b3mr3618866pfb.109.1557500808875; Fri, 10 May 2019 08:06:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557500808; cv=none; d=google.com; s=arc-20160816; b=b44/nEajmvUc+2l8ONnngvuuwD9xp9KEeoIUXFZbRmQysM6aRMVQNbCiEqtqHxlFdS JiPxgu0TBQjE5QTr/fWs2tW0lnGerLDCxIRwt2foc8s/M3Iaq7iCbMq69qGz5fJLzRqA 3HBZ7WcIpWoH9YH8RDIdxifopkW4Qc3W1SOD8lIa6+t3CgQemShYCYX9qKnjUmwhUFNu DQcSV20USIzF7a7BGX3Y8ZOwd5ow4l3BF0YnMhXtFZLdNNssH4j2LXM/r7xckdBxG0C9 bV3ZmlvjjsOmEfHRzU0/TgrjcrU4v3VRSVyfqK7YN8iFHxjEvO33/Li6FWDpF2rGEJXW MIfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=rFiPR5L0ofySvKnkJ50SqL2RvGoOoCIiwHBOKkZRmrQ=; b=YqgGqWgaQ0gQ0Uoe0BAgS5n9sGQl1f8mjPTT1d7sQ3frDrr292Beo+W9yE9hCClWTu 5RmKtE8gCemZs/wVNbJUxtHrkIfrwmSD2U6YHow5+hVUruq9dKoY2oFPwHfRXR7BDUIz ICPtfH/Bnnm9ebDion3hGBgu4gRKb9qF0iZJRmxoKrVMHo7BQyw7xtYsA5yN9noManXq jz5njZQGCjpqc5tLcXGMv54tOY0FD93p7JRtIQoo+QBV+IZTOhGC78zCTQ24+a6FN59w 29KBGGM7Rq+4WIZrYGVPxtmZTpSArVtBowgIAduLD1KUT8LTHdyJNaKxAgOpeACEZIKn 3D5w== 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 5si8133127pgm.540.2019.05.10.08.06.31; Fri, 10 May 2019 08:06:48 -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 S1727643AbfEJPDl (ORCPT + 99 others); Fri, 10 May 2019 11:03:41 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:50080 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727346AbfEJPDl (ORCPT ); Fri, 10 May 2019 11:03:41 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A5F7EA78; Fri, 10 May 2019 08:03:40 -0700 (PDT) Received: from [10.1.196.75] (e110467-lin.cambridge.arm.com [10.1.196.75]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 389A53F73C; Fri, 10 May 2019 08:03:39 -0700 (PDT) Subject: Re: [RFC PATCH 0/3] prerequisites for device reserved local mem rework To: laurentiu.tudor@nxp.com, hch@lst.de, stern@rowland.harvard.edu, gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, marex@denx.de Cc: leoyang.li@nxp.com, linux-kernel@vger.kernel.org References: <20190510145646.10078-1-laurentiu.tudor@nxp.com> From: Robin Murphy Message-ID: Date: Fri, 10 May 2019 16:03:37 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190510145646.10078-1-laurentiu.tudor@nxp.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Robin. > > Thank you! > > For context, see thread here: https://lkml.org/lkml/2019/4/22/357 > > Laurentiu Tudor (3): > ohci-hcd: use genalloc for USB HCs with local memory > usb: host: ohci-sm501: init genalloc for local memory > usb: host: ohci-tmio: init genalloc for local memory > > drivers/usb/host/ohci-hcd.c | 21 +++++++++--- > drivers/usb/host/ohci-sm501.c | 63 +++++++++++++++++++---------------- > drivers/usb/host/ohci-tmio.c | 23 ++++++++----- > drivers/usb/host/ohci.h | 3 ++ > 4 files changed, 69 insertions(+), 41 deletions(-) >