Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp306604imu; Wed, 21 Nov 2018 20:30:43 -0800 (PST) X-Google-Smtp-Source: AJdET5cpFU3k1fez8jV02h3En7IRr61jk44IWF1L4KsJO6r8A3/qKTrbJvCUQPQHdPNmdEaVCPqo X-Received: by 2002:a62:4c6:: with SMTP id 189-v6mr10096585pfe.110.1542861043442; Wed, 21 Nov 2018 20:30:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542861043; cv=none; d=google.com; s=arc-20160816; b=fVGk4XfqH2bgl1pdfKoz2orsRmrKXgcXEAKPZrSKF0Bvc/ut0NaItHKLY82JHZ7agL p0CRa0kzGUOBl9MzwMub5yTI5YKHfbbYXSzOEzK6k2oeTqunzuyyiaOC+zLq6aLajP7D PltFozrxgC2OL+QoI5cO/vh0qJuY2+43XUBE0Qb/MqCI7tLcbnMjKoUQjjyXvzxSj6PO uZgHr2aAzpTeWKsWmDsHhH0SdqdSYw8fG8twvzuIcDNmUojLo/xQg/FQ6rENAFL46xOe h/LG/FBhFIjuYZDrtoQuyqalHBRkT1+171HDkn0VxZrgEgqrpibpCdlGRMXAZoAg1Pzc jn1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=KPJP4afcPxq3hlpX7wqKHen5JsRKgkXEgCJxX4IGlTA=; b=QMr196LvZHZ/Zv4i2SXQErFqb7py69l2ScfEskVdgv3vN7IslAGDpnts9L+52WhBCz nqnFoctR5e/S/xylvsehcUEgpsbB5rG+jOPG6vHSGs+23tqXNCuLEqOIVOujXM9t0pM3 vCQWLuDMR9lqu+wboV3B2oIqDtiFsa6cskKfv89W8wosoiDIPTngtkAQ2QuQRgv7ZK4A QaZcdhCc1vHVO4Njn8YHzdb2EdMRdpPChNGKY16ZoGv1FMse/+JFOo1AslXr3qBwbqCk g5BkIVfCHtuuaGv9YLrzxR5XGTSVblJBjTBwwZrVw/xTAojgAKPCSOi6exh43Nr8QypG 2arg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=EBOm5wKX; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t3si49393611pgo.585.2018.11.21.20.30.07; Wed, 21 Nov 2018 20:30:43 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=EBOm5wKX; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732270AbeKVGcs (ORCPT + 99 others); Thu, 22 Nov 2018 01:32:48 -0500 Received: from mail-lf1-f67.google.com ([209.85.167.67]:34973 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730802AbeKVGcs (ORCPT ); Thu, 22 Nov 2018 01:32:48 -0500 Received: by mail-lf1-f67.google.com with SMTP id e26so4907819lfc.2; Wed, 21 Nov 2018 11:57:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KPJP4afcPxq3hlpX7wqKHen5JsRKgkXEgCJxX4IGlTA=; b=EBOm5wKXRwotd4eL1ToEgJzL/07HsJBrNxB958iMmzqf8GuAG7LUFOBL4iFSPs7lR9 jdFVcp3X6BIOcfgIDeYXlXE2JA1u/HtQU0FyRk9+sjsvAN9RYCxV8xrAYVmccTVlmGKM ejVfOrkQltSjnyDdRGuA8yYXEKBqxXXbTrHGwujAKXAN9BovJS/x+BrGHrJ8h4LeMgOj QPeyAXM/eFjUGphiRdktHIyXA9dS6+impVBUr1JDeCbJO9e3vbG1aXtVuIw38IDsVrhl 1qZtQ4c6GOJlIA2hBXtawGRftCvedWnUW3yp0rOad1SjNv/SZ0UcJ62EuLNH8H1woR7+ kgUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KPJP4afcPxq3hlpX7wqKHen5JsRKgkXEgCJxX4IGlTA=; b=fWxlZGAymLXLJYolN1I73bgt2SIhgzVLqvYDruLP7Kc+uLQw+8Y2+3DKSAztKNUj+4 8yh99ro9o8xBGjxsGrzoiYs+cjUpgrh6g/EEKlIz88iFTkFT84MMQvYh7mKzZ3jz9n3A vlbSEVNXPb3RDQ99Hxnl1LO1Z02KlobtVzNADBztmU9g8g0t7y7F1S4tWBk+4eIuzRgp bNJIEaA59l2mn7Y7wi2lJ6yud4AZv25b6uVJ95OIMKMs+wIZnM1YeFd/7LoRy8cxOzns SBmHjHVtN1pXkEIKGt+B2M7czYyTx8yGxHtpGcVcBaBKy7lTGR9RaTBi3790tCKu/2A2 jXAA== X-Gm-Message-State: AGRZ1gKTbEzXk1QyzMflTWTXb2Ep0wVSpij3Mes07gOLt4Dv/aas8cLF hUM66SZX7+LCKmQN1BXZHzO5sRSnLlWxdAlKn8M= X-Received: by 2002:a19:c70a:: with SMTP id x10mr4570891lff.88.1542830223460; Wed, 21 Nov 2018 11:57:03 -0800 (PST) MIME-Version: 1.0 References: <20181115154314.GA27850@jordon-HP-15-Notebook-PC> <0c6f1144-6ee0-29df-5e1f-d35d2264e06e@oracle.com> In-Reply-To: <0c6f1144-6ee0-29df-5e1f-d35d2264e06e@oracle.com> From: Souptick Joarder Date: Thu, 22 Nov 2018 01:26:51 +0530 Message-ID: Subject: Re: [PATCH 0/9] Use vm_insert_range To: Boris Ostrovsky Cc: Andrew Morton , Matthew Wilcox , Michal Hocko , "Kirill A. Shutemov" , vbabka@suse.cz, Rik van Riel , Stephen Rothwell , rppt@linux.vnet.ibm.com, Peter Zijlstra , Russell King - ARM Linux , robin.murphy@arm.com, iamjoonsoo.kim@lge.com, treding@nvidia.com, Kees Cook , Marek Szyprowski , stefanr@s5r6.in-berlin.de, hjc@rock-chips.com, Heiko Stuebner , airlied@linux.ie, oleksandr_andrushchenko@epam.com, joro@8bytes.org, pawel@osciak.com, Kyungmin Park , mchehab@kernel.org, Juergen Gross , linux-kernel@vger.kernel.org, Linux-MM , linux-arm-kernel@lists.infradead.org, linux1394-devel@lists.sourceforge.net, dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, xen-devel@lists.xen.org, iommu@lists.linux-foundation.org, linux-media@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 22, 2018 at 1:08 AM Boris Ostrovsky wrote: > > On 11/21/18 1:24 AM, Souptick Joarder wrote: > > On Thu, Nov 15, 2018 at 9:09 PM Souptick Joarder wrote: > >> Previouly drivers have their own way of mapping range of > >> kernel pages/memory into user vma and this was done by > >> invoking vm_insert_page() within a loop. > >> > >> As this pattern is common across different drivers, it can > >> be generalized by creating a new function and use it across > >> the drivers. > >> > >> vm_insert_range is the new API which will be used to map a > >> range of kernel memory/pages to user vma. > >> > >> All the applicable places are converted to use new vm_insert_range > >> in this patch series. > >> > >> Souptick Joarder (9): > >> mm: Introduce new vm_insert_range API > >> arch/arm/mm/dma-mapping.c: Convert to use vm_insert_range > >> drivers/firewire/core-iso.c: Convert to use vm_insert_range > >> drm/rockchip/rockchip_drm_gem.c: Convert to use vm_insert_range > >> drm/xen/xen_drm_front_gem.c: Convert to use vm_insert_range > >> iommu/dma-iommu.c: Convert to use vm_insert_range > >> videobuf2/videobuf2-dma-sg.c: Convert to use vm_insert_range > >> xen/gntdev.c: Convert to use vm_insert_range > >> xen/privcmd-buf.c: Convert to use vm_insert_range > > Any further comment on driver changes ? > > Xen drivers (the last two patches) look fine to me. Thanks, can I considered this as Reviewed-by ? > > -boris > > > >> arch/arm/mm/dma-mapping.c | 21 ++++++----------- > >> drivers/firewire/core-iso.c | 15 ++---------- > >> drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 20 ++-------------- > >> drivers/gpu/drm/xen/xen_drm_front_gem.c | 20 +++++----------- > >> drivers/iommu/dma-iommu.c | 12 ++-------- > >> drivers/media/common/videobuf2/videobuf2-dma-sg.c | 23 ++++++------------- > >> drivers/xen/gntdev.c | 11 ++++----- > >> drivers/xen/privcmd-buf.c | 8 ++----- > >> include/linux/mm_types.h | 3 +++ > >> mm/memory.c | 28 +++++++++++++++++++++++ > >> mm/nommu.c | 7 ++++++ > >> 11 files changed, 70 insertions(+), 98 deletions(-) > >> > >> -- > >> 1.9.1 > >> >