Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7046566imu; Thu, 31 Jan 2019 04:09:16 -0800 (PST) X-Google-Smtp-Source: ALg8bN6wJJ3mccP7MIXVK1UKzJRmmQsnkSiwR8vsNDGZBrTQCHtZO4F27l7MP/uvXQEjNRDWpcn3 X-Received: by 2002:a63:fc49:: with SMTP id r9mr30604396pgk.209.1548936556898; Thu, 31 Jan 2019 04:09:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548936556; cv=none; d=google.com; s=arc-20160816; b=FoPfM0jCcwHLHBiJaq+iLC3Wt70FR+R4OaQLDZXaXJjZNXSljhJ96PBFfwkSD6Ra7H Wia5PwH0YTbB1qSDCFR3iRPqOIp4/LusSCNVH5GgQQjccGdp3HXJ0PxG6pPFLtVkh6It dK6qhhczv96IAEVblVC4f9yBawOY/ABVDV7Ah+1o77K2TLh5TB3dnoTNPqj5SeqL3wKA YsWHyqwr5+rZP8+60qDEExzRUBmuh/9hN3tnCfuKdL6hVWTGaBkD9G7Myy2V42MTBsPk yMPe+cf6WUnDQuqIYUzHJv6Ten0zqr89kzx4iXQOX2cDYU3OyNeJoAHvKSmktSln8dRl 9DWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Mf7AiyJak2Ddci5NSD/K/6cTFE7tFiCPl7aMiAhDtrc=; b=nouqz878Wfg4QxON4qEJdnsBzD1ocVrNwT0EP6iPuHG4m36WC23kqUiBNr1+iIM+Yi s8ZXzyCV1iSBIywfBcvK3L5xgs1gEHbg46GvIqYNRXoQkj83UAqy4rzm4V7wbfk0bvST Mjkw61/okIcjcGfB7fDMp3i4BCG9O6rJC0qEe5isjgFRsV6vYVHGyu/SXsPwU7DzAH/c jilYdPoleTK/hjrkuWZMTr2hknelTcGlBpMyYkzXY/S6UVAL7xNu6hDEUbSvsPFxZDqO kErvqkmH7PiWrDDTHo4f82LE4faK//FrIS9CGVkVUIfh+Xk3cTZjxUTzpeD13PjbAONz 9a5g== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r2si3987817pgo.483.2019.01.31.04.09.01; Thu, 31 Jan 2019 04:09:16 -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; 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 S1732713AbfAaMIU (ORCPT + 99 others); Thu, 31 Jan 2019 07:08:20 -0500 Received: from gloria.sntech.de ([185.11.138.130]:55952 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726977AbfAaMIT (ORCPT ); Thu, 31 Jan 2019 07:08:19 -0500 Received: from wf0848.dip.tu-dresden.de ([141.76.183.80] helo=phil.localnet) by gloria.sntech.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gpB7H-0003tN-Me; Thu, 31 Jan 2019 13:06:47 +0100 From: Heiko Stuebner To: Souptick Joarder Cc: akpm@linux-foundation.org, willy@infradead.org, mhocko@suse.com, kirill.shutemov@linux.intel.com, vbabka@suse.cz, riel@surriel.com, sfr@canb.auug.org.au, rppt@linux.vnet.ibm.com, peterz@infradead.org, linux@armlinux.org.uk, robin.murphy@arm.com, iamjoonsoo.kim@lge.com, treding@nvidia.com, keescook@chromium.org, m.szyprowski@samsung.com, stefanr@s5r6.in-berlin.de, hjc@rock-chips.com, airlied@linux.ie, oleksandr_andrushchenko@epam.com, joro@8bytes.org, pawel@osciak.com, kyungmin.park@samsung.com, mchehab@kernel.org, boris.ostrovsky@oracle.com, jgross@suse.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, 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 Subject: Re: [PATCHv2 1/9] mm: Introduce new vm_insert_range and vm_insert_range_buggy API Date: Thu, 31 Jan 2019 13:06:49 +0100 Message-ID: <1701923.z6LKAITQJA@phil> In-Reply-To: <20190131030812.GA2174@jordon-HP-15-Notebook-PC> References: <20190131030812.GA2174@jordon-HP-15-Notebook-PC> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Heiko