From patchwork Wed Jul 27 01:23:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Li, Liang Z" X-Patchwork-Id: 653037 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rzctZ72STz9t1f for ; Wed, 27 Jul 2016 11:32:38 +1000 (AEST) Received: from localhost ([::1]:43192 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSDi5-0004E5-SV for incoming@patchwork.ozlabs.org; Tue, 26 Jul 2016 21:32:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49325) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSDgg-00039o-Kg for qemu-devel@nongnu.org; Tue, 26 Jul 2016 21:31:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSDge-0001AR-Jl for qemu-devel@nongnu.org; Tue, 26 Jul 2016 21:31:05 -0400 Received: from mga09.intel.com ([134.134.136.24]:52159) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSDge-00019x-9x for qemu-devel@nongnu.org; Tue, 26 Jul 2016 21:31:04 -0400 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 26 Jul 2016 18:31:03 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.28,427,1464678000"; d="scan'208"; a="1003177728" Received: from ll.sh.intel.com (HELO localhost) ([10.239.13.123]) by orsmga001.jf.intel.com with ESMTP; 26 Jul 2016 18:31:01 -0700 From: Liang Li To: linux-kernel@vger.kernel.org Date: Wed, 27 Jul 2016 09:23:32 +0800 Message-Id: <1469582616-5729-4-git-send-email-liang.z.li@intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1469582616-5729-1-git-send-email-liang.z.li@intel.com> References: <1469582616-5729-1-git-send-email-liang.z.li@intel.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 134.134.136.24 Subject: [Qemu-devel] [PATCH v2 repost 3/7] mm: add a function to get the max pfn X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: virtio-dev@lists.oasis-open.org, kvm@vger.kernel.org, quintela@redhat.com, Amit Shah , Liang Li , qemu-devel@nongnu.org, dgilbert@redhat.com, linux-mm@kvack.org, "Michael S. Tsirkin" , Cornelia Huck , Paolo Bonzini , Andrew Morton , virtualization@lists.linux-foundation.org, Mel Gorman , Vlastimil Babka Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Expose the function to get the max pfn, so it can be used in the virtio-balloon device driver. Signed-off-by: Liang Li Cc: Andrew Morton Cc: Vlastimil Babka Cc: Mel Gorman Cc: Michael S. Tsirkin Cc: Paolo Bonzini Cc: Cornelia Huck Cc: Amit Shah --- mm/page_alloc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 8b3e134..7da61ad 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -4517,6 +4517,12 @@ void show_free_areas(unsigned int filter) show_swap_cache_info(); } +unsigned long get_max_pfn(void) +{ + return max_pfn; +} +EXPORT_SYMBOL(get_max_pfn); + static void zoneref_set_zone(struct zone *zone, struct zoneref *zoneref) { zoneref->zone = zone;