From patchwork Sat Aug 29 07:34:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhen Lei X-Patchwork-Id: 52849 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by patches.linaro.org (Postfix) with ESMTPS id B681D22EBF for ; Sat, 29 Aug 2015 07:36:10 +0000 (UTC) Received: by wibvo5 with SMTP id vo5sf9631069wib.0 for ; Sat, 29 Aug 2015 00:36:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :mime-version:content-type:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=bBNN5u9iS7X80h0y8lfBR9Vga95+Rq+ISb1J76unmbc=; b=IA+xHFOrdZP7M9pgVrimljdgQAATl4ekFE0tGM7BWf2Ls4QCpPdAn0zxV64dkfxp07 iNsc159+sFjbeaZ6N4HlF+qG5rLpyDogKtqAVztD0QQoaW1Gva24uBWLmI3Vq66yNiOb FUPZlJXyQSvv8EESTOrxDY3zqa2ZyYt2fkVM3SQ59MS26GwgOS5Agh9TTzN4CWqCxERE +nFKsg7xs+dkk8/ZW8d6vMTXyEB0bucr3ZwYQse4s/LIyTzqJQ1TwGY9R3dLdncbaST0 vaMY0NTMyZe1/XjQnhk9SarpVUSybxkVjBfaQKEwhfMLTbQk5ZJ8m9YdJ+OcQa4cnqWf I7vQ== X-Gm-Message-State: ALoCoQnjeaba1VSsZgksigNuNvB/7Ty8g+Qr/cCjagKBJimqpXp62/t2YyHh2efO2rFjOHjoGArc X-Received: by 10.194.80.69 with SMTP id p5mr3787784wjx.2.1440833769863; Sat, 29 Aug 2015 00:36:09 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.27.65 with SMTP id r1ls320180lag.31.gmail; Sat, 29 Aug 2015 00:36:09 -0700 (PDT) X-Received: by 10.152.18.137 with SMTP id w9mr6453369lad.23.1440833769542; Sat, 29 Aug 2015 00:36:09 -0700 (PDT) Received: from mail-lb0-f177.google.com (mail-lb0-f177.google.com. [209.85.217.177]) by mx.google.com with ESMTPS id jx2si7976688lbc.124.2015.08.29.00.36.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Aug 2015 00:36:09 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.177 as permitted sender) client-ip=209.85.217.177; Received: by lbvd4 with SMTP id d4so4361208lbv.3 for ; Sat, 29 Aug 2015 00:36:09 -0700 (PDT) X-Received: by 10.112.166.106 with SMTP id zf10mr6705471lbb.36.1440833769356; Sat, 29 Aug 2015 00:36:09 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.151.194 with SMTP id us2csp333615lbb; Sat, 29 Aug 2015 00:36:08 -0700 (PDT) X-Received: by 10.69.26.196 with SMTP id ja4mr20782399pbd.121.1440833768262; Sat, 29 Aug 2015 00:36:08 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id lx10si14020326pdb.65.2015.08.29.00.36.04; Sat, 29 Aug 2015 00:36:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752415AbbH2Hfi (ORCPT + 28 others); Sat, 29 Aug 2015 03:35:38 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:61203 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752231AbbH2Hfh (ORCPT ); Sat, 29 Aug 2015 03:35:37 -0400 Received: from 172.24.1.51 (EHLO szxeml433-hub.china.huawei.com) ([172.24.1.51]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CRK14301; Sat, 29 Aug 2015 15:35:27 +0800 (CST) Received: from localhost (10.177.23.164) by szxeml433-hub.china.huawei.com (10.82.67.210) with Microsoft SMTP Server id 14.3.235.1; Sat, 29 Aug 2015 15:35:15 +0800 From: Zhen Lei To: Andrew Morton , Michal Hocko , Tejun Heo , Johannes Weiner , "Vladimir Davydov" , Joonsoo Kim , linux-mm , linux-kernel CC: Zefan Li , Xinwei Hu , "Tianhong Ding" , Hanjun Guo , Zhen Lei Subject: [PATCH 1/1] mm: fix type information of memoryless node Date: Sat, 29 Aug 2015 15:34:45 +0800 Message-ID: <1440833685-32372-1-git-send-email-thunder.leizhen@huawei.com> X-Mailer: git-send-email 1.9.5.msysgit.1 MIME-Version: 1.0 X-Originating-IP: [10.177.23.164] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: thunder.leizhen@huawei.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.177 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , For a memoryless node, the output of get_pfn_range_for_nid are all zero. It will display mem from 0 to -1. Signed-off-by: Zhen Lei Acked-by: David Rientjes --- mm/page_alloc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 5b5240b..5839f31 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -5455,7 +5455,8 @@ void __paginginit free_area_init_node(int nid, unsigned long *zones_size, #ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP get_pfn_range_for_nid(nid, &start_pfn, &end_pfn); pr_info("Initmem setup node %d [mem %#018Lx-%#018Lx]\n", nid, - (u64)start_pfn << PAGE_SHIFT, ((u64)end_pfn << PAGE_SHIFT) - 1); + (u64)start_pfn << PAGE_SHIFT, + end_pfn ? ((u64)end_pfn << PAGE_SHIFT) - 1 : 0); #endif calculate_node_totalpages(pgdat, start_pfn, end_pfn, zones_size, zholes_size);