From patchwork Mon Apr 6 17:47:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Toshi Kani X-Patchwork-Id: 6163571 Return-Path: X-Original-To: patchwork-linux-nvdimm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 367A4BF4A6 for ; Mon, 6 Apr 2015 18:05:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2CD0620303 for ; Mon, 6 Apr 2015 18:05:58 +0000 (UTC) Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2E0B320340 for ; Mon, 6 Apr 2015 18:05:57 +0000 (UTC) Received: from ml01.vlan14.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 00377810C9; Mon, 6 Apr 2015 11:05:57 -0700 (PDT) X-Original-To: linux-nvdimm@ml01.01.org Delivered-To: linux-nvdimm@ml01.01.org Received: from g4t3425.houston.hp.com (g4t3425.houston.hp.com [15.201.208.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id CFF7C810BD for ; Mon, 6 Apr 2015 11:05:55 -0700 (PDT) Received: from g4t3433.houston.hp.com (g4t3433.houston.hp.com [16.210.25.219]) by g4t3425.houston.hp.com (Postfix) with ESMTP id DE4146D; Mon, 6 Apr 2015 18:05:53 +0000 (UTC) Received: from misato.fc.hp.com (misato.fc.hp.com [16.78.168.61]) by g4t3433.houston.hp.com (Postfix) with ESMTP id BF8E370; Mon, 6 Apr 2015 18:05:49 +0000 (UTC) From: Toshi Kani To: mingo@redhat.com, hpa@zytor.com, tglx@linutronix.de Date: Mon, 6 Apr 2015 11:47:19 -0600 Message-Id: <1428342439-31285-1-git-send-email-toshi.kani@hp.com> X-Mailer: git-send-email 1.9.3 Cc: linux-nvdimm@ml01.01.org, x86@kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Yinghai Lu , hch@lst.de Subject: [Linux-nvdimm] [PATCH] x86: Revert E820_PRAM change in e820_end_pfn() X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 'Commit ec776ef6bbe17 ("x86/mm: Add support for the non-standard protected e820 type")' added E820_PRAM ranges, which do not have have struct-page. Therefore, there is no need to update max_pfn to cover the E820_PRAM ranges. Revert the change made to account E820_PRAM as RAM in e820_end_pfn() in the commit. Signed-off-by: Yinghai Lu Signed-off-by: Toshi Kani Tested-by: Christoph Hellwig --- The patch is based on the tip branch. --- arch/x86/kernel/e820.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index e2ce85d..4dfe4bd 100644 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c @@ -763,11 +763,7 @@ static unsigned long __init e820_end_pfn(unsigned long limit_pfn) unsigned long start_pfn; unsigned long end_pfn; - /* - * Persistent memory is accounted as ram for purposes of - * establishing max_pfn and mem_map. - */ - if (ei->type != E820_RAM && ei->type != E820_PRAM) + if (ei->type != E820_RAM) continue; start_pfn = ei->addr >> PAGE_SHIFT;