Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp825480ybm; Tue, 21 May 2019 04:18:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqw7gbJNhp5J7CCPc85iNMjPeoLxaKVP8mW4+ScYPOHb8TTZU9mtV/3zMa7+uy7LLIH1MNNl X-Received: by 2002:a62:2ec4:: with SMTP id u187mr85830257pfu.84.1558437514945; Tue, 21 May 2019 04:18:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558437514; cv=none; d=google.com; s=arc-20160816; b=xobzvaF41CCGqPgNaTgYeOaHVFj2T1GBNAAZIOm8Xbi7vcdC0ZRmdG85JHfD7qkZ5z 88n/Y4c1SGpwM0tpmc5HD45yYNoFCxhTJ7r/8VMt6ErERILKzOV1aLzH8dCfx5/eEbqe 2JuDAoFt/2p53IpfZqzrp8w3o1suED2eYoosSAGaDr+zuR7VXORauKbXExjV83X/nMWk fYjZoepXVJxj5cz8VK7HU1hjss2offftajAPA6NDag6Q0LHTXTrLhmnHmMXDdXK/fUaY R3Vodx0P5ZDtwR66vLKXfYVecEkh5VKozW2f88RIBJ2gK5AplVQK8yRI01sXKYIHa+l6 HBYg== 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; bh=NI0Mzos+sdDEmtU9yKjIHKnMPEJ7/homLWxx3WmIHEY=; b=Xh0qrRh00Z+6Fi4IyR5Q0hFkxoz0cIa3dzCZG7urBbwSqxJkezkplFHV7KevbbzF3Z UBA6gl9cycUTIgiEDfIA5cuLYsjxWLJgvPrWo71CSo/j28JWS1BncIU2NKVI1RN3dTsY xXnsiQkcTmXHoHsQu2WxUddLPbBfmqydFksDSkg2CKE1Imt8SalgaQXZD7BCjNDkWoOH R8Son8xdCIrU4KWaEtj/Bq9C5OkaE2Y/wxHBF5uydwkDdspctq+KNhJDr/C8TNmod2jV KqmIR8DfQAhFwMDZENujd0xfyBf6058ZyL7GKy93oAIDPaJe5PqaJR+GfBI1p8f2wza1 IH+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=cva7BvNx; 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 az7si21107245plb.350.2019.05.21.04.18.19; Tue, 21 May 2019 04:18:34 -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=pass header.i=@kernel.org header.s=default header.b=cva7BvNx; 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 S1727251AbfEULPz (ORCPT + 99 others); Tue, 21 May 2019 07:15:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:35458 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726138AbfEULPz (ORCPT ); Tue, 21 May 2019 07:15:55 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 39DA32081C; Tue, 21 May 2019 11:15:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558437353; bh=BGopbQCk3bzBzM8Wbz1LAhSrUslStMl2R3d35vRkkNI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cva7BvNxufZAFrBpnvDXsrfR73GrmdDgX/ZZAVQi8XTNdZl4vVKAyp0bHb0LWmuOf dOi0oe8RApr8X2BCRLNMdRpjlR/1XfzANAhlgT6qVbVOBFYLVxKe4h5mTve9rWFCxw tHSa48kJIFp9X0W5B9b5IAv69NU0SK+r5TUzuim0= Date: Tue, 21 May 2019 13:15:51 +0200 From: Greg KH To: Laurentiu Tudor Cc: "hch@lst.de" , "stern@rowland.harvard.edu" , "linux-usb@vger.kernel.org" , "marex@denx.de" , Leo Li , "linux-kernel@vger.kernel.org" , "robin.murphy@arm.com" , "noring@nocrew.org" , "JuergenUrban@gmx.de" Subject: Re: [PATCH v4 1/3] USB: use genalloc for USB HCs with local memory Message-ID: <20190521111551.GA24591@kroah.com> References: <20190516114721.27694-1-laurentiu.tudor@nxp.com> <20190516114721.27694-2-laurentiu.tudor@nxp.com> <20190521081657.GA10639@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 21, 2019 at 11:04:12AM +0000, Laurentiu Tudor wrote: > > > On 21.05.2019 11:16, Greg KH wrote: > > On Thu, May 16, 2019 at 02:47:19PM +0300, laurentiu.tudor@nxp.com 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. > >> > >> For context, see thread here: https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flkml.org%2Flkml%2F2019%2F4%2F22%2F357&data=02%7C01%7Claurentiu.tudor%40nxp.com%7Cf5242fb28d154ff9653208d6ddc4b41c%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636940234237524499&sdata=KEEUP1KH%2BaraWcVKogeYBzrauh%2FFTzGjSxjk%2BuNozjA%3D&reserved=0 > >> > >> Signed-off-by: Laurentiu Tudor > >> --- > >> drivers/usb/core/buffer.c | 15 +++++++++++---- > >> drivers/usb/host/ohci-hcd.c | 23 ++++++++++++++++++----- > >> include/linux/usb/hcd.h | 3 +++ > >> 3 files changed, 32 insertions(+), 9 deletions(-) > >> > >> diff --git a/drivers/usb/core/buffer.c b/drivers/usb/core/buffer.c > >> index f641342cdec0..22a8f3f5679b 100644 > >> --- a/drivers/usb/core/buffer.c > >> +++ b/drivers/usb/core/buffer.c > >> @@ -16,6 +16,7 @@ > >> #include > >> #include > >> #include > >> +#include > >> #include > >> #include > >> > >> @@ -124,10 +125,12 @@ void *hcd_buffer_alloc( > >> if (size == 0) > >> return NULL; > >> > >> + if (hcd->driver->flags & HCD_LOCAL_MEM) > >> + return gen_pool_dma_alloc(hcd->localmem_pool, size, dma); > > > > Does this patch now break things? hcd->localmem_pool at this point in > > time is NULL, so this call will fail. There's no chance for any host > > controller driver to actually set up this pool in this patch, so is > > bisection broken? > > Unfortunately, yes. I could lump the patches together but I think > Christoph suggestion is much better. I do too, can you redo these patches to work in that manner please? thanks, greg k-h