[PATCH 3/5] powerpc/mm/32: Use page_is_ram to check for RAM

Jonathan Neuschäfer j.neuschaefer at gmx.net
Wed Mar 28 06:24:10 AEDT 2018


Hi,

On Mon, Mar 19, 2018 at 10:19:32PM +1100, Michael Ellerman wrote:
> Michael Ellerman <mpe at ellerman.id.au> writes:
> > Jonathan Neuschäfer <j.neuschaefer at gmx.net> writes:
[...]
> >> -	if (slab_is_available() && (p < virt_to_phys(high_memory)) &&
> >> +	if (page_is_ram(__phys_to_pfn(p)) &&
> >>  	    !(__allow_ioremap_reserved && memblock_is_region_reserved(p, size))) {
> >>  		printk("__ioremap(): phys addr 0x%llx is RAM lr %ps\n",
> >>  		       (unsigned long long)p, __builtin_return_address(0));
> >
> >
> > This is killing my p5020ds (Freescale e5500) unfortunately:
> 
> Duh, I should actually read the patch :)
> 
> This is a 32-bit system with 4G of RAM, so not all of RAM is mapped,
> some of it is highem which is why removing the test against high_memory
> above breaks it.
> 
> So I need the high_memory test on this system.

This is an oversight on my part. I thought I wouldn't need this test
because the memblock-based test is more accurate, but I didn't think
through how high memory actually works.

> I'm not clear why it was a problem for you on the Wii, do you even build
> the Wii kernel with HIGHMEM enabled?

No. The Wii works fine with the p < virt_to_phys(high_memory) test, and
doesn't use CONFIG_HIGHMEM.  I'll send a version two of this patchset.


Thanks for testing,
Jonathan Neuschäfer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20180327/5a4fded5/attachment.sig>


More information about the Linuxppc-dev mailing list