From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754831AbXL3LqR (ORCPT ); Sun, 30 Dec 2007 06:46:17 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752102AbXL3LqA (ORCPT ); Sun, 30 Dec 2007 06:46:00 -0500 Received: from elvis.franken.de ([193.175.24.41]:45742 "EHLO elvis.franken.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752065AbXL3Lp7 (ORCPT ); Sun, 30 Dec 2007 06:45:59 -0500 Date: Sun, 30 Dec 2007 12:37:13 +0100 To: Mel Gorman Cc: linux-kernel@vger.kernel.org, Bob Picco , Dave Hansen , Andy Whitcroft , Andi Kleen , Benjamin Herrenschmidt , Paul Mackerras , Keith Mannthey , "Luck, Tony" , KAMEZAWA Hiroyuki , Yasunori Goto , akpm@linux-foundation.org, Linus Torvalds , ralf@linux-mips.org Subject: Re: [PATCH] Fix crash with FLAT_MEMORY and ARCH_PFN_OFFSET != 0 Message-ID: <20071230113713.GA9434@alpha.franken.de> References: <20071218120300.7565AE3030@solo.franken.de> <20071218135828.GB24917@csn.ul.ie> <20071218160938.GA20688@alpha.franken.de> <20071220114405.GA9623@csn.ul.ie> <20071220124351.GA8880@alpha.franken.de> <20071220132719.GA29857@csn.ul.ie> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20071220132719.GA29857@csn.ul.ie> User-Agent: Mutt/1.5.13 (2006-08-11) From: tsbogend@alpha.franken.de (Thomas Bogendoerfer) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 20, 2007 at 01:27:20PM +0000, Mel Gorman wrote: > On (20/12/07 13:43), Thomas Bogendoerfer didst pronounce: > > On Thu, Dec 20, 2007 at 11:44:06AM +0000, Mel Gorman wrote: > > > --- a/include/asm-mips/page.h > > > +++ b/include/asm-mips/page.h > > > @@ -37,13 +37,6 @@ > > > #include > > > #include > > > > > > -/* > > > - * It's normally defined only for FLATMEM config but it's > > > - * used in our early mem init code for all memory models. > > > - * So always define it. > > > - */ > > > -#define ARCH_PFN_OFFSET PFN_UP(PHYS_OFFSET) > > > - > > > > hmm, doesn't this break what I've fixed ? Without this #define > > ARCH_PFN_OFFSET gets defined to 0 and the bug is back. Or did > > I miss anything ? > > > > ARCH_PFN_OFFSET goes to 0, so page_to_pfn() is no longer adjusting by > PFN_UP(PHYS_OFFSET) like it was when your problem occured. I am guessing > that the nature of the crash was that page_to_pfn() was returning bogus > values early in boot and trying to initialise memmap that didn't exist. ic, your patch works for me. Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessary a good idea. [ RFC1925, 2.3 ]