From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f175.google.com (mail-pd0-f175.google.com [209.85.192.175]) by kanga.kvack.org (Postfix) with ESMTP id 98E556B006E for ; Thu, 28 May 2015 19:24:04 -0400 (EDT) Received: by pdbqa5 with SMTP id qa5so52214962pdb.0 for ; Thu, 28 May 2015 16:24:04 -0700 (PDT) Received: from mail.linuxfoundation.org (mail.linuxfoundation.org. [140.211.169.12]) by mx.google.com with ESMTPS id pf6si5714888pbb.67.2015.05.28.16.24.03 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 May 2015 16:24:03 -0700 (PDT) Date: Thu, 28 May 2015 16:24:02 -0700 From: Andrew Morton Subject: Re: [PATCH 2/9] mm: Provide new get_vaddr_frames() helper Message-Id: <20150528162402.19a0a26a5b9eae36aa8050e5@linux-foundation.org> In-Reply-To: <1431522495-4692-3-git-send-email-jack@suse.cz> References: <1431522495-4692-1-git-send-email-jack@suse.cz> <1431522495-4692-3-git-send-email-jack@suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Jan Kara Cc: linux-mm@kvack.org, linux-media@vger.kernel.org, Hans Verkuil , dri-devel@lists.freedesktop.org, Pawel Osciak , Mauro Carvalho Chehab , mgorman@suse.de, Marek Szyprowski , linux-samsung-soc@vger.kernel.org On Wed, 13 May 2015 15:08:08 +0200 Jan Kara wrote: > Provide new function get_vaddr_frames(). This function maps virtual > addresses from given start and fills given array with page frame numbers of > the corresponding pages. If given start belongs to a normal vma, the function > grabs reference to each of the pages to pin them in memory. If start > belongs to VM_IO | VM_PFNMAP vma, we don't touch page structures. Caller > must make sure pfns aren't reused for anything else while he is using > them. > > This function is created for various drivers to simplify handling of > their buffers. > > Acked-by: Mel Gorman > Acked-by: Vlastimil Babka > Signed-off-by: Jan Kara > --- > include/linux/mm.h | 44 +++++++++++ > mm/gup.c | 226 +++++++++++++++++++++++++++++++++++++++++++++++++++++ That's a lump of new code which many kernels won't be needing. Can we put all this in a new .c file and select it within drivers/media Kconfig? -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org