Re: [PATCH] powerpc: mem_init crash for sparsemem

Mike Kravetz
2005-11-04T20:58:04Z

On Fri, Nov 04, 2005 at 08:18:19PM +0000, Andy Whitcroft wrote:
> Arnd Bergmann wrote:
> > I have a Cell blade with some broken memory in the middle of the
> > physical address space and this is correctly detected by the
> > firmware, but not relocated. When I enable CONFIG_SPARSEMEM,
> > the memsections for the nonexistant address space do not
> > get struct page entries allocated, as expected.
> >
> > However, mem_init for the non-NUMA configuration tries to
> > access these pages without first looking if they are there.

This earlier statement in mem_init (or at least the comment),

num_physpages = max_pfn; /* RAM is assumed contiguous */

may be a cause for concern. I'm pretty sure max_pfn has previously
been set based on the value of lmb_end_of_DRAM(). My guess is that we
are going to report the system as having more memory that it actually
does (will not account for the hole(s)).

That being said, the pfn_valid() check is still needed here. But,
it looks like that code was originally written under the assumption
that there were no holes.

Can someone 'more in the know' of ppc architecture comment on the
ram is contiguous assumption? Is this no longer the case?
--
Mike