From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yasuaki Ishimatsu Subject: [RFC PATCH v3 3/13] memory-hotplug : unify argument of firmware_map_add_early/hotplug Date: Mon, 9 Jul 2012 19:25:03 +0900 Message-ID: <4FFAB17F.2090209@jp.fujitsu.com> References: <4FFAB0A2.8070304@jp.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-2022-JP" Content-Transfer-Encoding: 7bit Return-path: Received: from fgwmail5.fujitsu.co.jp ([192.51.44.35]:44437 "EHLO fgwmail5.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751857Ab2GIKZV (ORCPT ); Mon, 9 Jul 2012 06:25:21 -0400 In-Reply-To: <4FFAB0A2.8070304@jp.fujitsu.com> Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-acpi@vger.kernel.org Cc: rientjes@google.com, liuj97@gmail.com, len.brown@intel.com, benh@kernel.crashing.org, paulus@samba.org, cl@linux.com, minchan.kim@gmail.com, akpm@linux-foundation.org, kosaki.motohiro@jp.fujitsu.com, wency@cn.fujitsu.com There are two ways to create /sys/firmware/memmap/X sysfs: - firmware_map_add_early When the system starts, it is calledd from e820_reserve_resources() - firmware_map_add_hotplug When the memory is hot plugged, it is called from add_memory() But these functions are called without unifying value of end argument as below: - end argument of firmware_map_add_early() : start + size - 1 - end argument of firmware_map_add_hogplug() : start + size The patch unifies them to "start + size - 1". CC: David Rientjes CC: Jiang Liu CC: Len Brown CC: Benjamin Herrenschmidt CC: Paul Mackerras CC: Christoph Lameter Cc: Minchan Kim CC: Andrew Morton CC: KOSAKI Motohiro CC: Wen Congyang Signed-off-by: Yasuaki Ishimatsu --- mm/memory_hotplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-3.5-rc6/mm/memory_hotplug.c =================================================================== --- linux-3.5-rc6.orig/mm/memory_hotplug.c 2012-07-09 18:08:43.476719455 +0900 +++ linux-3.5-rc6/mm/memory_hotplug.c 2012-07-09 18:13:57.664791810 +0900 @@ -642,7 +642,7 @@ int __ref add_memory(int nid, u64 start, } /* create new memmap entry */ - firmware_map_add_hotplug(start, start + size, "System RAM"); + firmware_map_add_hotplug(start, start + size - 1, "System RAM"); goto out; From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752934Ab2GIKZX (ORCPT ); Mon, 9 Jul 2012 06:25:23 -0400 Received: from fgwmail5.fujitsu.co.jp ([192.51.44.35]:44437 "EHLO fgwmail5.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751857Ab2GIKZV (ORCPT ); Mon, 9 Jul 2012 06:25:21 -0400 X-SecurityPolicyCheck: OK by SHieldMailChecker v1.7.4 Message-ID: <4FFAB17F.2090209@jp.fujitsu.com> Date: Mon, 9 Jul 2012 19:25:03 +0900 From: Yasuaki Ishimatsu User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:13.0) Gecko/20120614 Thunderbird/13.0.1 MIME-Version: 1.0 To: , , , CC: , , , , , , , , , Subject: [RFC PATCH v3 3/13] memory-hotplug : unify argument of firmware_map_add_early/hotplug References: <4FFAB0A2.8070304@jp.fujitsu.com> In-Reply-To: <4FFAB0A2.8070304@jp.fujitsu.com> Content-Type: text/plain; charset="ISO-2022-JP" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There are two ways to create /sys/firmware/memmap/X sysfs: - firmware_map_add_early When the system starts, it is calledd from e820_reserve_resources() - firmware_map_add_hotplug When the memory is hot plugged, it is called from add_memory() But these functions are called without unifying value of end argument as below: - end argument of firmware_map_add_early() : start + size - 1 - end argument of firmware_map_add_hogplug() : start + size The patch unifies them to "start + size - 1". CC: David Rientjes CC: Jiang Liu CC: Len Brown CC: Benjamin Herrenschmidt CC: Paul Mackerras CC: Christoph Lameter Cc: Minchan Kim CC: Andrew Morton CC: KOSAKI Motohiro CC: Wen Congyang Signed-off-by: Yasuaki Ishimatsu --- mm/memory_hotplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-3.5-rc6/mm/memory_hotplug.c =================================================================== --- linux-3.5-rc6.orig/mm/memory_hotplug.c 2012-07-09 18:08:43.476719455 +0900 +++ linux-3.5-rc6/mm/memory_hotplug.c 2012-07-09 18:13:57.664791810 +0900 @@ -642,7 +642,7 @@ int __ref add_memory(int nid, u64 start, } /* create new memmap entry */ - firmware_map_add_hotplug(start, start + size, "System RAM"); + firmware_map_add_hotplug(start, start + size - 1, "System RAM"); goto out; From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx185.postini.com [74.125.245.185]) by kanga.kvack.org (Postfix) with SMTP id 02E4C6B0072 for ; Mon, 9 Jul 2012 06:25:21 -0400 (EDT) Received: from m2.gw.fujitsu.co.jp (unknown [10.0.50.72]) by fgwmail5.fujitsu.co.jp (Postfix) with ESMTP id 8AEBA3EE081 for ; Mon, 9 Jul 2012 19:25:20 +0900 (JST) Received: from smail (m2 [127.0.0.1]) by outgoing.m2.gw.fujitsu.co.jp (Postfix) with ESMTP id 6777A45DE5A for ; Mon, 9 Jul 2012 19:25:20 +0900 (JST) Received: from s2.gw.fujitsu.co.jp (s2.gw.fujitsu.co.jp [10.0.50.92]) by m2.gw.fujitsu.co.jp (Postfix) with ESMTP id 4C7CA45DE4E for ; Mon, 9 Jul 2012 19:25:20 +0900 (JST) Received: from s2.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s2.gw.fujitsu.co.jp (Postfix) with ESMTP id 402A51DB8041 for ; Mon, 9 Jul 2012 19:25:20 +0900 (JST) Received: from g01jpexchyt02.g01.fujitsu.local (g01jpexchyt02.g01.fujitsu.local [10.128.194.41]) by s2.gw.fujitsu.co.jp (Postfix) with ESMTP id DDE641DB8038 for ; Mon, 9 Jul 2012 19:25:19 +0900 (JST) Message-ID: <4FFAB17F.2090209@jp.fujitsu.com> Date: Mon, 9 Jul 2012 19:25:03 +0900 From: Yasuaki Ishimatsu MIME-Version: 1.0 Subject: [RFC PATCH v3 3/13] memory-hotplug : unify argument of firmware_map_add_early/hotplug References: <4FFAB0A2.8070304@jp.fujitsu.com> In-Reply-To: <4FFAB0A2.8070304@jp.fujitsu.com> Content-Type: text/plain; charset="ISO-2022-JP" Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: linux-mm@kvack.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-acpi@vger.kernel.org Cc: rientjes@google.com, liuj97@gmail.com, len.brown@intel.com, benh@kernel.crashing.org, paulus@samba.org, cl@linux.com, minchan.kim@gmail.com, akpm@linux-foundation.org, kosaki.motohiro@jp.fujitsu.com, wency@cn.fujitsu.com There are two ways to create /sys/firmware/memmap/X sysfs: - firmware_map_add_early When the system starts, it is calledd from e820_reserve_resources() - firmware_map_add_hotplug When the memory is hot plugged, it is called from add_memory() But these functions are called without unifying value of end argument as below: - end argument of firmware_map_add_early() : start + size - 1 - end argument of firmware_map_add_hogplug() : start + size The patch unifies them to "start + size - 1". CC: David Rientjes CC: Jiang Liu CC: Len Brown CC: Benjamin Herrenschmidt CC: Paul Mackerras CC: Christoph Lameter Cc: Minchan Kim CC: Andrew Morton CC: KOSAKI Motohiro CC: Wen Congyang Signed-off-by: Yasuaki Ishimatsu --- mm/memory_hotplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-3.5-rc6/mm/memory_hotplug.c =================================================================== --- linux-3.5-rc6.orig/mm/memory_hotplug.c 2012-07-09 18:08:43.476719455 +0900 +++ linux-3.5-rc6/mm/memory_hotplug.c 2012-07-09 18:13:57.664791810 +0900 @@ -642,7 +642,7 @@ int __ref add_memory(int nid, u64 start, } /* create new memmap entry */ - firmware_map_add_hotplug(start, start + size, "System RAM"); + firmware_map_add_hotplug(start, start + size - 1, "System RAM"); goto out; -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from fgwmail5.fujitsu.co.jp (fgwmail5.fujitsu.co.jp [192.51.44.35]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id BC5612C0226 for ; Mon, 9 Jul 2012 20:25:27 +1000 (EST) Received: from m1.gw.fujitsu.co.jp (unknown [10.0.50.71]) by fgwmail5.fujitsu.co.jp (Postfix) with ESMTP id 690B13EE081 for ; Mon, 9 Jul 2012 19:25:24 +0900 (JST) Received: from smail (m1 [127.0.0.1]) by outgoing.m1.gw.fujitsu.co.jp (Postfix) with ESMTP id BB15D45DE58 for ; Mon, 9 Jul 2012 19:25:20 +0900 (JST) Received: from s1.gw.fujitsu.co.jp (s1.gw.fujitsu.co.jp [10.0.50.91]) by m1.gw.fujitsu.co.jp (Postfix) with ESMTP id 8694C45DE56 for ; Mon, 9 Jul 2012 19:25:20 +0900 (JST) Received: from s1.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s1.gw.fujitsu.co.jp (Postfix) with ESMTP id 3F56A1DB804D for ; Mon, 9 Jul 2012 19:25:20 +0900 (JST) Received: from g01jpexchyt02.g01.fujitsu.local (g01jpexchyt02.g01.fujitsu.local [10.128.194.41]) by s1.gw.fujitsu.co.jp (Postfix) with ESMTP id DFE981DB8047 for ; Mon, 9 Jul 2012 19:25:19 +0900 (JST) Message-ID: <4FFAB17F.2090209@jp.fujitsu.com> Date: Mon, 9 Jul 2012 19:25:03 +0900 From: Yasuaki Ishimatsu MIME-Version: 1.0 To: , , , Subject: [RFC PATCH v3 3/13] memory-hotplug : unify argument of firmware_map_add_early/hotplug References: <4FFAB0A2.8070304@jp.fujitsu.com> In-Reply-To: <4FFAB0A2.8070304@jp.fujitsu.com> Content-Type: text/plain; charset="ISO-2022-JP" Cc: len.brown@intel.com, wency@cn.fujitsu.com, paulus@samba.org, minchan.kim@gmail.com, kosaki.motohiro@jp.fujitsu.com, rientjes@google.com, cl@linux.com, akpm@linux-foundation.org, liuj97@gmail.com List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , There are two ways to create /sys/firmware/memmap/X sysfs: - firmware_map_add_early When the system starts, it is calledd from e820_reserve_resources() - firmware_map_add_hotplug When the memory is hot plugged, it is called from add_memory() But these functions are called without unifying value of end argument as below: - end argument of firmware_map_add_early() : start + size - 1 - end argument of firmware_map_add_hogplug() : start + size The patch unifies them to "start + size - 1". CC: David Rientjes CC: Jiang Liu CC: Len Brown CC: Benjamin Herrenschmidt CC: Paul Mackerras CC: Christoph Lameter Cc: Minchan Kim CC: Andrew Morton CC: KOSAKI Motohiro CC: Wen Congyang Signed-off-by: Yasuaki Ishimatsu --- mm/memory_hotplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-3.5-rc6/mm/memory_hotplug.c =================================================================== --- linux-3.5-rc6.orig/mm/memory_hotplug.c 2012-07-09 18:08:43.476719455 +0900 +++ linux-3.5-rc6/mm/memory_hotplug.c 2012-07-09 18:13:57.664791810 +0900 @@ -642,7 +642,7 @@ int __ref add_memory(int nid, u64 start, } /* create new memmap entry */ - firmware_map_add_hotplug(start, start + size, "System RAM"); + firmware_map_add_hotplug(start, start + size - 1, "System RAM"); goto out;