lkml.org 
[lkml]   [2008]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Fix crash with FLAT_MEMORY and ARCH_PFN_OFFSET != 0
On (30/12/07 12:37), Thomas Bogendoerfer didst pronounce:
> 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 <linux/pfn.h>
> > > > #include <asm/io.h>
> > > >
> > > > -/*
> > > > - * 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.
>

Grand. For the moment, your patch is the correct fix. This is a
micro-optimisation that can be picked up again at a later date. Thanks
for the testing and the fix.

--
Mel Gorman
Part-time Phd Student Linux Technology Center
University of Limerick IBM Dublin Software Lab


\
 
 \ /
  Last update: 2008-01-07 13:19    [W:0.055 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site