Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp6194990ybi; Wed, 29 May 2019 04:25:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqx8jOtjbT/CAiwqctEWJP00h4bgeSq4T7gwnWlnmj89sf94BujgfTj/RSsrMHAqbPCketZi X-Received: by 2002:a17:902:9a81:: with SMTP id w1mr136800141plp.71.1559129104454; Wed, 29 May 2019 04:25:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559129104; cv=none; d=google.com; s=arc-20160816; b=PxeRbWH+QC6HDAOWskVHUt6VxgHoXV1wO93DlLWfHfM1ZnG1gnAbeBCfLmKIYLBkLt ttRXtnEonwzLbwcLqvMBcYWpwVazrLsW4p9+NCyjFR5CIKx4RTvQodHV50wGQtO4XnzR X4LQGOEaZaR3iXchlm9nJeiSjhB6/t55r81vxlXqJatfrRpqvSPaqeNV+1wyocpIVdMU 4IdGYSfqfg14U34Ry4H4al1yQI7r4id4qzIzlZLNPQSC0qFXFqvKysxfLW66aLMW4cCu zrbD3AeBl5yyvn9Lo/U5L7i7u7tjsK02uL39AJ2hTl5xddGQ7XepAwcGuHpeLzbu52GO TBCA== 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=Pe/+5QymoLD8Ql5spAD/fHz/AVCn+UHvMpOAhCQKZD8=; b=SjxnhYZCQS/9EyR4Wo9k71lJxaDYm+mt5wmqIIm+18Tog2DZ5Uccd5jj1kbuEKoxxS Ym7qP8M6ML2j5lCNUwLGpyXTGr8ZUOVpV8QOxEJ4xtpMQzT3kCJcvPhwB0rzr46CLouq 4x5E+UZj5iZNBT10tKqZ7lF+QEURs+/jCI6ZDzspJvWKWQ+Oeo1WpOlBHiGWU81CVepn FHE1zuy0gCrUi1muMi/Y3+phfl2uhM6NYZ88bP5eTgSMQb3/87VWy0f1MrUVxBQUDd9t ba8g9+cgLIPYjkrK/lHJcyPJhEmh2ew6N3C7WUVYBV4LXIDrBWLNO97XLiUxJ1jUDaNc DKPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=OM5NOuMb; 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 z3si18267751pgu.309.2019.05.29.04.24.46; Wed, 29 May 2019 04:25:04 -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=OM5NOuMb; 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 S1726753AbfE2LXh (ORCPT + 99 others); Wed, 29 May 2019 07:23:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:60974 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725914AbfE2LXg (ORCPT ); Wed, 29 May 2019 07:23:36 -0400 Received: from localhost (ip67-88-213-2.z213-88-67.customer.algx.net [67.88.213.2]) (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 F18B920B1F; Wed, 29 May 2019 11:23:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559129015; bh=McAELd9X83y5uf1BerOqhmU3UNbPRNL3esrqC1Crr/s=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OM5NOuMbLNjTabGDh5c1RGgC+P8hNBmHsNvToIku8DC8bSi6hSWaVyNWDlgLes/Ih 3JBZygq8VnCDIV5HJOPoBDXFGEyWlp7a8XaNpgmuixo13REHhNauwNkUzxgA5hwOCY QandglykZUmcAfpw4V6peTXTNmo3hyrHmTWY3xKk= Date: Wed, 29 May 2019 04:23:34 -0700 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 v7 2/5] USB: use genalloc for USB HCs with local memory Message-ID: <20190529112334.GA11368@kroah.com> References: <20190529102843.13174-1-laurentiu.tudor@nxp.com> <20190529102843.13174-3-laurentiu.tudor@nxp.com> <20190529103838.GC7383@kroah.com> <34a83e74-4c85-cf9f-54c3-b69b0dcb628e@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <34a83e74-4c85-cf9f-54c3-b69b0dcb628e@nxp.com> User-Agent: Mutt/1.12.0 (2019-05-25) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 29, 2019 at 11:15:54AM +0000, Laurentiu Tudor wrote: > > > On 29.05.2019 13:38, Greg KH wrote: > > On Wed, May 29, 2019 at 01:28:40PM +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. To help users, introduce a new HCD API, > >> usb_hcd_setup_local_mem() that will setup up the genalloc backing > >> up the device local memory. It will be used in subsequent patches. > >> 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 sh arch to compile GENERIC_ALLOCATOR needs to be selected in > >> Kconfig. > >> > >> 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%7Cade28e1f322c4502cd4808d6e421d0ba%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636947231220264072&sdata=xvmzDztMbeD9GwlcAfx7bBoxhARWgB3vmQkqiE81Lbg%3D&reserved=0 > >> > >> Signed-off-by: Laurentiu Tudor > >> Signed-off-by: Fredrik Noring > >> Tested-by: Fredrik Noring > >> Reported-by: kbuild test robot > >> --- > >> drivers/usb/Kconfig | 1 + > >> drivers/usb/core/buffer.c | 9 +++++++++ > >> drivers/usb/core/hcd.c | 36 ++++++++++++++++++++++++++++++++++++ > >> drivers/usb/host/ohci-hcd.c | 23 ++++++++++++++++++----- > >> drivers/usb/host/ohci-mem.c | 35 +++++++++++++++++++++++++++++++---- > >> drivers/usb/host/ohci.h | 2 ++ > >> include/linux/usb/hcd.h | 5 +++++ > >> 7 files changed, 102 insertions(+), 9 deletions(-) > >> > >> diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig > >> index e4b27413f528..389c57d8eba7 100644 > >> --- a/drivers/usb/Kconfig > >> +++ b/drivers/usb/Kconfig > >> @@ -45,6 +45,7 @@ config USB_ARCH_HAS_HCD > >> config USB > >> tristate "Support for Host-side USB" > >> depends on USB_ARCH_HAS_HCD > >> + select GENERIC_ALLOCATOR > > > > Are there any arches that does not have GENERIC_ALLOCATOR? I don't want > > to suddenly cut off a bunch of working systems from having USB support. > > > > lkp report mentions only sh, but even if there are others, I think that > now having the explicit select should cover them, right? As long as GENERIC_ALLOCATOR works on all arches, yes, that's fine, but please verify that this is the case. thanks, greg k-h