Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7069508imu; Thu, 31 Jan 2019 04:32:42 -0800 (PST) X-Google-Smtp-Source: ALg8bN63bJWKSlUtOQqcIqctb179df4+2Q3EJJxrmC5YIRFBb4n3HdfzoFwU0m7MSImj/vz95fSB X-Received: by 2002:a17:902:b90b:: with SMTP id bf11mr34286634plb.284.1548937962050; Thu, 31 Jan 2019 04:32:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548937962; cv=none; d=google.com; s=arc-20160816; b=y5F92GIPiYSsMIvGr0UpE6836/abcNqGLqFoSAHKWWW1scFCUDDUww8NdeSNR67fHg b9VEdanzgxToLY4dCpns5iWJ1VXAMWZyFZJi5TVeX5VyW7vOItEotB1WcV1m308In6Ed WU3rlG35chgrzGwZXLM6gM1hD3avsmJ5QmbNwIdXwkkQ0TyQ+px2L5+jIfKzPqqTL49u G6y0yDOnFCdZm0rpJIWt3FDIgHTf6Cyz1CsvR2uU7gP3z0psrv3tM88k/psnfy7XSnnB +9g+8BPCHjTT2aY1k6q8YeUKjfDYeaeRZk/rktLOK5wypIl4GUyH6tM7KZ+phJnHp9Em ZnSQ== 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=MUni9/6Z2lGMVz53wyw6zTg0RWZ4vyfLf6KBzYMBEmg=; b=NkSy1dV1+4Uw2qE1zug93yzj4ffyDtAW4hrIyApIVdc9fVrguqJmf+YWtZyILcG0AK 2zAHXBqZ57TRlOXp7OidKfjfyvnFDrKfwxGSF0/dB+3/0W+Rmlr2qTGj9k9xfftv4xe4 CiEA5hg6mDlb0qy2heUMKcM3P/BDhxc/Sv4GUR5YktIz9kN0LksMa8zeeFqKoW1dbi/T sEcbXTNZGyB7deVtiM5SkV30M6lH+6RLccxTYvugAsZbCKwXPTAToq12mxTeehH/sftr VOaOp8eVdGZ3gDls1Kpi8sW1Ids1W4QsIADVUuIlkKEyudx2WQH93pHD0InvMNLqPxZT muWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rm0itLub; 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 f11si4293150plr.341.2019.01.31.04.32.25; Thu, 31 Jan 2019 04:32:42 -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=rm0itLub; 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 S1732792AbfAaMcH (ORCPT + 99 others); Thu, 31 Jan 2019 07:32:07 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:35351 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726153AbfAaMcG (ORCPT ); Thu, 31 Jan 2019 07:32:06 -0500 Received: by mail-lj1-f194.google.com with SMTP id x85-v6so2540279ljb.2; Thu, 31 Jan 2019 04:32:05 -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=MUni9/6Z2lGMVz53wyw6zTg0RWZ4vyfLf6KBzYMBEmg=; b=rm0itLubnrxxq4PPU48BdkkmPOHGmoawlXX7TkirV4StzYrvbOIna0ghZQS2MZ2t76 XhmHBOPccSIjpVoDYvh6YrtIBr5eW0+bdYyC3OkQ7c8WSywe3qd9fTk75H03Iczx/vz+ ica0fn1RP61+8A8QOUdr2YeGNhb1x8j06LH67rCa56PhTSaWcsKMzCFrGAKWvu8izLO1 r9n/88H88jlojH/9LggBml0yrFb/uQsNo2A7e1JgfSAEKysdVB90p+WDPw0Udz+KvqR8 XIGDjJcmERRAXarrPQcdwF9vNp/LZDRJsdhZkxzMTILaiGDq0d2CfYCAzuog8UhXWLuy RKDg== 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=MUni9/6Z2lGMVz53wyw6zTg0RWZ4vyfLf6KBzYMBEmg=; b=iradGg92hxKqEHmn88wBud8z2RoWFNAj8xWqqGm1VlsFN+phEhW7P9VwPFMFUtf3/8 7RAsLWBHnK08V/kcbWXfJUaKUL8YI2/TjF+cowbcTo1qaKghw/6JwMCMbU1NanArP1mt PKap5e2W92UdkQMjsLYN0HUt4VfCJ+TN+IfsmxMMADNIBHSsWHVon0swsovK1nOvjIPY guxgBomJEAR4ha05PoLL2C1dRO5OvWP12TyzZTryXvcdypiipCx5yBikD+9dj31iihHv 643LCdTj00iQ7J5wchVfJTdnNr9Zfa6O7lki3zGpdUC1rAh4a0hmHPp50z6MYH7MFV52 EpxQ== X-Gm-Message-State: AJcUukfJu8Latky48oPVuh3YDnzGGfNVokjL08yhbsKAlX9RgE2OBmyF LNqYiqd3ezPJlw58rVePa9HRqBoWFb6XMZftKGo= X-Received: by 2002:a2e:5703:: with SMTP id l3-v6mr16102340ljb.106.1548937924232; Thu, 31 Jan 2019 04:32:04 -0800 (PST) MIME-Version: 1.0 References: <20190131030812.GA2174@jordon-HP-15-Notebook-PC> <1701923.z6LKAITQJA@phil> In-Reply-To: <1701923.z6LKAITQJA@phil> From: Souptick Joarder Date: Thu, 31 Jan 2019 18:01:52 +0530 Message-ID: Subject: Re: [PATCHv2 1/9] mm: Introduce new vm_insert_range and vm_insert_range_buggy API To: Heiko Stuebner 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, airlied@linux.ie, oleksandr_andrushchenko@epam.com, joro@8bytes.org, pawel@osciak.com, Kyungmin Park , mchehab@kernel.org, Boris Ostrovsky , 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, Jan 31, 2019 at 5:37 PM Heiko Stuebner wrote: > > Am Donnerstag, 31. Januar 2019, 04:08:12 CET schrieb Souptick Joarder: > > 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 new functions and use it across > > the drivers. > > > > vm_insert_range() is the API which could be used to mapped > > kernel memory/pages in drivers which has considered vm_pgoff > > > > vm_insert_range_buggy() is the API which could be used to map > > range of kernel memory/pages in drivers which has not considered > > vm_pgoff. vm_pgoff is passed default as 0 for those drivers. > > > > We _could_ then at a later "fix" these drivers which are using > > vm_insert_range_buggy() to behave according to the normal vm_pgoff > > offsetting simply by removing the _buggy suffix on the function > > name and if that causes regressions, it gives us an easy way to revert. > > > > Signed-off-by: Souptick Joarder > > Suggested-by: Russell King > > Suggested-by: Matthew Wilcox > > hmm, I'm missing a changelog here between v1 and v2. > Nevertheless I managed to test v1 on Rockchip hardware > and display is still working, including talking to Lima via prime. > > So if there aren't any big changes for v2, on Rockchip > Tested-by: Heiko Stuebner Change log is available in [0/9]. Patch [1/9] & [4/9] have no changes between v1 -> v2.