From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752828Ab0ALCmV (ORCPT ); Mon, 11 Jan 2010 21:42:21 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751536Ab0ALCmU (ORCPT ); Mon, 11 Jan 2010 21:42:20 -0500 Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:52134 "EHLO fgwmail6.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751529Ab0ALCmT (ORCPT ); Mon, 11 Jan 2010 21:42:19 -0500 X-SecurityPolicyCheck-FJ: OK by FujitsuOutboundMailChecker v1.3.1 Date: Tue, 12 Jan 2010 11:39:03 +0900 From: KAMEZAWA Hiroyuki To: Wu Fengguang Cc: "Zheng, Shaohui" , "linux-mm@kvack.org" , "akpm@linux-foundation.org" , "linux-kernel@vger.kernel.org" , "ak@linux.intel.com" , "y-goto@jp.fujitsu.com" , Dave Hansen , "x86@kernel.org" Subject: Re: [PATCH - resend] Memory-Hotplug: Fix the bug on interface /dev/mem for 64-bit kernel(v1) Message-Id: <20100112113903.89163c46.kamezawa.hiroyu@jp.fujitsu.com> In-Reply-To: <20100112023307.GA16661@localhost> References: <20100108124851.GB6153@localhost> <20100111124303.GA21408@localhost> <20100112093031.0fc6877f.kamezawa.hiroyu@jp.fujitsu.com> <20100112023307.GA16661@localhost> Organization: FUJITSU Co. LTD. X-Mailer: Sylpheed 2.7.1 (GTK+ 2.10.14; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 12 Jan 2010 10:33:08 +0800 Wu Fengguang wrote: > Sure, here it is :) > --- > x86: use the generic page_is_ram() > > The generic resource based page_is_ram() works better with memory > hotplug/hotremove. So switch the x86 e820map based code to it. > > CC: Andi Kleen > CC: KAMEZAWA Hiroyuki > Signed-off-by: Wu Fengguang Ack. > +#ifdef CONFIG_X86 > + /* > + * A special case is the first 4Kb of memory; > + * This is a BIOS owned area, not kernel ram, but generally > + * not listed as such in the E820 table. > + */ > + if (pfn == 0) > + return 0; > + > + /* > + * Second special case: Some BIOSen report the PC BIOS > + * area (640->1Mb) as ram even though it is not. > + */ > + if (pfn >= (BIOS_BEGIN >> PAGE_SHIFT) && > + pfn < (BIOS_END >> PAGE_SHIFT)) > + return 0; > +#endif I'm glad if this part is sorted out in clean way ;) Thanks, -Kame From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail203.messagelabs.com (mail203.messagelabs.com [216.82.254.243]) by kanga.kvack.org (Postfix) with SMTP id 87BDD6B0071 for ; Mon, 11 Jan 2010 21:42:23 -0500 (EST) Received: from m4.gw.fujitsu.co.jp ([10.0.50.74]) by fgwmail5.fujitsu.co.jp (Fujitsu Gateway) with ESMTP id o0C2gKE1014337 for (envelope-from kamezawa.hiroyu@jp.fujitsu.com); Tue, 12 Jan 2010 11:42:20 +0900 Received: from smail (m4 [127.0.0.1]) by outgoing.m4.gw.fujitsu.co.jp (Postfix) with ESMTP id 3B3CA45DE7A for ; Tue, 12 Jan 2010 11:42:18 +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 F12AE45DE6F for ; Tue, 12 Jan 2010 11:42:17 +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 75ACAE18007 for ; Tue, 12 Jan 2010 11:42:17 +0900 (JST) Received: from m106.s.css.fujitsu.com (m106.s.css.fujitsu.com [10.249.87.106]) by s4.gw.fujitsu.co.jp (Postfix) with ESMTP id AB8BCE18003 for ; Tue, 12 Jan 2010 11:42:15 +0900 (JST) Date: Tue, 12 Jan 2010 11:39:03 +0900 From: KAMEZAWA Hiroyuki Subject: Re: [PATCH - resend] Memory-Hotplug: Fix the bug on interface /dev/mem for 64-bit kernel(v1) Message-Id: <20100112113903.89163c46.kamezawa.hiroyu@jp.fujitsu.com> In-Reply-To: <20100112023307.GA16661@localhost> References: <20100108124851.GB6153@localhost> <20100111124303.GA21408@localhost> <20100112093031.0fc6877f.kamezawa.hiroyu@jp.fujitsu.com> <20100112023307.GA16661@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org To: Wu Fengguang Cc: "Zheng, Shaohui" , "linux-mm@kvack.org" , "akpm@linux-foundation.org" , "linux-kernel@vger.kernel.org" , "ak@linux.intel.com" , "y-goto@jp.fujitsu.com" , Dave Hansen , "x86@kernel.org" List-ID: On Tue, 12 Jan 2010 10:33:08 +0800 Wu Fengguang wrote: > Sure, here it is :) > --- > x86: use the generic page_is_ram() > > The generic resource based page_is_ram() works better with memory > hotplug/hotremove. So switch the x86 e820map based code to it. > > CC: Andi Kleen > CC: KAMEZAWA Hiroyuki > Signed-off-by: Wu Fengguang Ack. > +#ifdef CONFIG_X86 > + /* > + * A special case is the first 4Kb of memory; > + * This is a BIOS owned area, not kernel ram, but generally > + * not listed as such in the E820 table. > + */ > + if (pfn == 0) > + return 0; > + > + /* > + * Second special case: Some BIOSen report the PC BIOS > + * area (640->1Mb) as ram even though it is not. > + */ > + if (pfn >= (BIOS_BEGIN >> PAGE_SHIFT) && > + pfn < (BIOS_END >> PAGE_SHIFT)) > + return 0; > +#endif I'm glad if this part is sorted out in clean way ;) Thanks, -Kame -- 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