From patchwork Mon Jan 19 11:30:03 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chandru X-Patchwork-Id: 19276 X-Patchwork-Delegate: benh@kernel.crashing.org Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 2A2AADE324 for ; Mon, 19 Jan 2009 22:30:43 +1100 (EST) X-Original-To: linuxppc-dev@ozlabs.org Delivered-To: linuxppc-dev@ozlabs.org Received: from e28smtp03.in.ibm.com (e28smtp03.in.ibm.com [59.145.155.3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "e28smtp03.in.ibm.com", Issuer "Equifax" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id D03B5DE011 for ; Mon, 19 Jan 2009 22:30:08 +1100 (EST) Received: from d28relay02.in.ibm.com (d28relay02.in.ibm.com [9.184.220.59]) by e28smtp03.in.ibm.com (8.13.1/8.13.1) with ESMTP id n0JBU3Nf000905 for ; Mon, 19 Jan 2009 17:00:03 +0530 Received: from d28av05.in.ibm.com (d28av05.in.ibm.com [9.184.220.67]) by d28relay02.in.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id n0JBS7t94182134 for ; Mon, 19 Jan 2009 16:58:07 +0530 Received: from d28av05.in.ibm.com (loopback [127.0.0.1]) by d28av05.in.ibm.com (8.13.1/8.13.3) with ESMTP id n0JBU2fv011785 for ; Mon, 19 Jan 2009 22:30:03 +1100 Received: from [9.124.35.51] ([9.124.35.51]) by d28av05.in.ibm.com (8.13.1/8.12.11) with ESMTP id n0JBU2CV011781; Mon, 19 Jan 2009 22:30:02 +1100 From: Chandru Organization: ibm To: Dave Hansen Subject: Re: 2.6.28-rc9 panics with crashkernel=256M while booting Date: Mon, 19 Jan 2009 17:00:03 +0530 User-Agent: KMail/1.9.10 References: <200812241325.49404.chandru@in.ibm.com> <200901161746.36584.chandru@in.ibm.com> <1232128377.27278.69.camel@nimitz> In-Reply-To: <1232128377.27278.69.camel@nimitz> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200901191700.03580.chandru@in.ibm.com> Cc: linuxppc-dev@ozlabs.org, Andrew Morton , Paul Mackerras , linux-kernel@vger.kernel.org X-BeenThere: linuxppc-dev@ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@ozlabs.org In case either physbase or reserve_size are not page aligned and in addition if the following condition is also true node_ar.end_pfn = node->node_end_pfn = PFN_DOWN(physbase+reserve_size). we may hit the BUG_ON(end > bdata->node_low_pfn) in mark_bootmem_node() in mm/bootmem.c Hence pass the pfn that the physbase is part of and align reserve_size before calling reserve_bootmem_node(). Signed-off-by: Chandru S Cc: Dave Hansen --- arch/powerpc/mm/numa.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- linux-2.6.29-rc2/arch/powerpc/mm/numa.c.orig 2009-01-19 16:14:49.000000000 +0530 +++ linux-2.6.29-rc2/arch/powerpc/mm/numa.c 2009-01-19 16:36:38.000000000 +0530 @@ -901,7 +901,8 @@ static void mark_reserved_regions_for_ni get_node_active_region(start_pfn, &node_ar); while (start_pfn < end_pfn && node_ar.start_pfn < node_ar.end_pfn) { - unsigned long reserve_size = size; + unsigned long reserve_size = (size >> PAGE_SHIFT) << + PAGE_SHIFT; /* * if reserved region extends past active region * then trim size to active region @@ -917,7 +918,8 @@ static void mark_reserved_regions_for_ni dbg("reserve_bootmem %lx %lx nid=%d\n", physbase, reserve_size, node_ar.nid); reserve_bootmem_node(NODE_DATA(node_ar.nid), - physbase, reserve_size, + (start_pfn << PAGE_SHIFT), + reserve_size, BOOTMEM_DEFAULT); } /*