Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp516453yba; Thu, 16 May 2019 04:50:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqzpy9KwKP46ygnP/u+lJsnZcil8Pw7Gjb4IhAuhRc9bHSXR0ggULLY5cx8mL5JHbAEntX9e X-Received: by 2002:aa7:8d81:: with SMTP id i1mr25171562pfr.244.1558007444208; Thu, 16 May 2019 04:50:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558007444; cv=none; d=google.com; s=arc-20160816; b=kemJQGQcd8IpUO66Ugp7EaAQTf4x63vAs3PTexGQhPnrhsTtsVTpSa59Vc0Iw6XyNb Y6OBOfnIdHid1LB3qkUvNU4cWPI7e2fXGdKOGb4B0E+qqLA4DqnLXR6I/wd8dp78OZ/u LGFf/7JHAdEDyj8Ez4RmuE/c2N7ClY3gapMGMgr8iurR7zPj50d1jZYwGcYzkj3gpvjW PkM+oA2As8ICyPnJ3R/h0TZjrToqU8+LvWQV7JVZuGGWONoaFndUF7eyj/CVHFjmf0h4 T1VQlzBjjlWR8gIecBpkYTDZQIhSl270HV1TCU4WG16uJFsyo3toFGurvZHlOU2oQiSa oH1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=dpu1s3MKvUTZf+zQKdCxgB2nETm4Gn0QhVzRh0323xo=; b=M+kR0Yp+UjAz+eIgXKwqXx6LqaG/+8U9k7GcOCRFw5s1IbkTMXqvPbtNCiRG+apa/W +sbFQTDSL66soG2C3Gxy9JlI7qp7IfeH00ZijsWN+M4RmHZOJMphRMGyxxABd7HNU2fk 8DU416pWr2P9R2mAJDGCmCTtnuxpRl9BDWTNoX+4AF0VW5zVHQWS8XV++dKa3z3vaH6c 6Cvk08DgkNakHb//3wxX6UhAcSDP+vWSXGxmKylaCI7Ni6d6AIaWlZMOqWPEoi3MQMBT 9hY3QvtYJzXvo/cpGwYOJafxeKL6yCGKcrv05QaVFtK8HoAkJQ2Oy/JoI5g3Y+Ec8koR /VwA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c5si4791568pgg.96.2019.05.16.04.50.29; Thu, 16 May 2019 04:50:44 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728615AbfEPLr3 (ORCPT + 99 others); Thu, 16 May 2019 07:47:29 -0400 Received: from inva020.nxp.com ([92.121.34.13]:43692 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728389AbfEPLr0 (ORCPT ); Thu, 16 May 2019 07:47:26 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 6E1321A0087; Thu, 16 May 2019 13:47:25 +0200 (CEST) Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 6155C1A001D; Thu, 16 May 2019 13:47:25 +0200 (CEST) Received: from fsr-ub1864-101.ea.freescale.net (fsr-ub1864-101.ea.freescale.net [10.171.82.13]) by inva024.eu-rdc02.nxp.com (Postfix) with ESMTP id D4376205CD; Thu, 16 May 2019 13:47:24 +0200 (CEST) From: laurentiu.tudor@nxp.com To: 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, robin.murphy@arm.com, noring@nocrew.org, JuergenUrban@gmx.de, Laurentiu Tudor Subject: [PATCH v4 0/3] prerequisites for device reserved local mem rework Date: Thu, 16 May 2019 14:47:18 +0300 Message-Id: <20190516114721.27694-1-laurentiu.tudor@nxp.com> X-Mailer: git-send-email 2.17.1 X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Thank you! For context, see thread here: https://lkml.org/lkml/2019/4/22/357 Changes in v4: - created mapping for local mem - fix genalloc misuse Changes in v3: - rearranged calls into genalloc simplifying the code a bit (Christoph) - dropped RFC prefix Changes in v2: - use genalloc also in core usb (based on comment from Robin) - moved genpool decl to usb_hcd to be accesible from core usb Laurentiu Tudor (3): USB: 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/core/buffer.c | 15 +++++--- drivers/usb/host/ohci-hcd.c | 23 +++++++++--- drivers/usb/host/ohci-sm501.c | 66 +++++++++++++++++++++-------------- drivers/usb/host/ohci-tmio.c | 32 ++++++++++++----- include/linux/usb/hcd.h | 3 ++ 5 files changed, 95 insertions(+), 44 deletions(-) -- 2.17.1