From patchwork Tue Jul 6 10:46:56 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiao Guangrong X-Patchwork-Id: 110402 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o66ApDWm022635 for ; Tue, 6 Jul 2010 10:51:40 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754263Ab0GFKuv (ORCPT ); Tue, 6 Jul 2010 06:50:51 -0400 Received: from cn.fujitsu.com ([222.73.24.84]:60483 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1753014Ab0GFKuu (ORCPT ); Tue, 6 Jul 2010 06:50:50 -0400 Received: from tang.cn.fujitsu.com (tang.cn.fujitsu.com [10.167.250.3]) by song.cn.fujitsu.com (Postfix) with ESMTP id 32FED17012C; Tue, 6 Jul 2010 18:50:48 +0800 (CST) Received: from fnst.cn.fujitsu.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id o66Am8hG022415; Tue, 6 Jul 2010 18:48:08 +0800 Received: from [10.167.141.99] (unknown [10.167.141.99]) by fnst.cn.fujitsu.com (Postfix) with ESMTPA id 8D76D2922B0; Tue, 6 Jul 2010 18:50:59 +0800 (CST) Message-ID: <4C3309A0.6030005@cn.fujitsu.com> Date: Tue, 06 Jul 2010 18:46:56 +0800 From: Xiao Guangrong User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: Avi Kivity CC: Marcelo Tosatti , Nick Piggin , Ingo Molnar , LKML , KVM list Subject: [PATCH v5 3/9] export __get_user_pages_fast() function References: <4C330918.6040709@cn.fujitsu.com> <4C330948.1070305@cn.fujitsu.com> In-Reply-To: <4C330948.1070305@cn.fujitsu.com> Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 06 Jul 2010 10:52:23 +0000 (UTC) diff --git a/mm/util.c b/mm/util.c index f5712e8..4f0d32b 100644 --- a/mm/util.c +++ b/mm/util.c @@ -250,6 +250,19 @@ void arch_pick_mmap_layout(struct mm_struct *mm) } #endif +/* + * Like get_user_pages_fast() except its IRQ-safe in that it won't fall + * back to the regular GUP. + * If the architecture not support this fucntion, simply return with no + * page pinned + */ +int __attribute__((weak)) __get_user_pages_fast(unsigned long start, + int nr_pages, int write, struct page **pages) +{ + return 0; +} +EXPORT_SYMBOL_GPL(__get_user_pages_fast); + /** * get_user_pages_fast() - pin user pages in memory * @start: starting user address