From patchwork Mon Jul 9 10:25:03 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yasuaki Ishimatsu X-Patchwork-Id: 1172031 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 7D53840B21 for ; Mon, 9 Jul 2012 10:26:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752414Ab2GIKZW (ORCPT ); Mon, 9 Jul 2012 06:25:22 -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 Received: from m4.gw.fujitsu.co.jp (unknown [10.0.50.74]) by fgwmail5.fujitsu.co.jp (Postfix) with ESMTP id EE5FB3EE0C1; Mon, 9 Jul 2012 19:25:20 +0900 (JST) Received: from smail (m4 [127.0.0.1]) by outgoing.m4.gw.fujitsu.co.jp (Postfix) with ESMTP id C9BF645DE57; Mon, 9 Jul 2012 19:25:20 +0900 (JST) Received: from s4.gw.fujitsu.co.jp (s4.gw.fujitsu.co.jp [10.0.50.94]) by m4.gw.fujitsu.co.jp (Postfix) with ESMTP id 5D87845DE53; Mon, 9 Jul 2012 19:25:20 +0900 (JST) Received: from s4.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s4.gw.fujitsu.co.jp (Postfix) with ESMTP id 4A6E3E0800C; Mon, 9 Jul 2012 19:25:20 +0900 (JST) Received: from g01jpexchyt02.g01.fujitsu.local (g01jpexchyt02.g01.fujitsu.local [10.128.194.41]) by s4.gw.fujitsu.co.jp (Postfix) with ESMTP id DDE48E08001; Mon, 9 Jul 2012 19:25:19 +0900 (JST) Received: from [127.0.0.1] (10.124.101.33) by g01jpexchyt02.g01.fujitsu.local (10.128.194.41) with Microsoft SMTP Server id 14.2.309.2; Mon, 9 Jul 2012 19:25:16 +0900 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> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@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(-) -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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;