From patchwork Sun Mar 10 08:01:02 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiang Liu X-Patchwork-Id: 2244101 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 6E770DF24C for ; Sun, 10 Mar 2013 08:13:09 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UEbJP-0002hA-QS; Sun, 10 Mar 2013 08:08:55 +0000 Received: from mail-pb0-f48.google.com ([209.85.160.48]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UEbJL-0002gU-R1 for linux-arm-kernel@lists.infradead.org; Sun, 10 Mar 2013 08:08:52 +0000 Received: by mail-pb0-f48.google.com with SMTP id wy12so2665352pbc.35 for ; Sun, 10 Mar 2013 00:08:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=KvFK6tu8pdmCdMezBGu5vVT2EFOeukbS7iS/MYY3HGI=; b=ww2CR9l8HV/7HB+NnT/ygHwvcVpoIsTlF3KNrlg+hVJOChCGirp/Sra97ZL4nkgIb/ c9K43UnTdI+3DdoYmZtgTNTI/J9XJzBZmqxxJKDoYYG4uSQ6JIV2EhY58jc3WrNgiCBZ iLpyJbcneY307+/cMffpy5/Kajb+ISw73dhCwt/9QsLLu1z+/Pujfc1jEBXZkHYj8aqe ecbf+vZcVa6T9w98DgatlgDbOZNFY4ThSgzxxFQFjoMMx1uV+C80VeYoTAt7jM37O95z rAs/hDgYi5xFbN8jNu8t4ke9FwKaPdNjXGl92VhvxGx7u+CI4ZgmAa3RlgSWt3q/wzFc ingw== X-Received: by 10.68.212.233 with SMTP id nn9mr3653393pbc.144.1362902930043; Sun, 10 Mar 2013 00:08:50 -0800 (PST) Received: from localhost.localdomain ([114.250.98.254]) by mx.google.com with ESMTPS id rd1sm14267202pbc.19.2013.03.10.00.08.41 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 10 Mar 2013 00:08:49 -0800 (PST) From: Jiang Liu To: Andrew Morton , David Rientjes Subject: [PATCH v2, part2 02/10] mm/ARM: use free_highmem_page() to free highmem pages into buddy system Date: Sun, 10 Mar 2013 16:01:02 +0800 Message-Id: <1362902470-25787-3-git-send-email-jiang.liu@huawei.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1362902470-25787-1-git-send-email-jiang.liu@huawei.com> References: <1362902470-25787-1-git-send-email-jiang.liu@huawei.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130310_040852_069660_2505FC6A X-CRM114-Status: GOOD ( 11.60 ) X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.160.48 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (liuj97[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (liuj97[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: linux-arm-kernel@lists.infradead.org, Russell King , Jiang Liu , Wen Congyang , linux-mm@kvack.org, Linus Walleij , Stephen Boyd , linux-kernel@vger.kernel.org, Michal Hocko , Minchan Kim , Mel Gorman , Marek Szyprowski , KAMEZAWA Hiroyuki , Jianguo Wu X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Use helper function free_highmem_page() to free highmem pages into the buddy system. Signed-off-by: Jiang Liu Cc: Russell King Cc: Linus Walleij cc: Marek Szyprowski Cc: Stephen Boyd Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org --- arch/arm/mm/init.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c index 40a5bc2..687a114 100644 --- a/arch/arm/mm/init.c +++ b/arch/arm/mm/init.c @@ -519,10 +519,8 @@ static void __init free_unused_memmap(struct meminfo *mi) #ifdef CONFIG_HIGHMEM static inline void free_area_high(unsigned long pfn, unsigned long end) { - for (; pfn < end; pfn++) { - __free_reserved_page(pfn_to_page(pfn)); - totalhigh_pages++; - } + for (; pfn < end; pfn++) + free_highmem_page(pfn_to_page(pfn)); } #endif @@ -571,7 +569,6 @@ static void __init free_highpages(void) if (start < end) free_area_high(start, end); } - totalram_pages += totalhigh_pages; #endif }