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

From: Jonathan NeuschÃfer
Date: Tue Mar 27 2018 - 15:25:22 EST


Hi,

On Mon, Mar 19, 2018 at 10:19:32PM +1100, Michael Ellerman wrote:
> Michael Ellerman <mpe@xxxxxxxxxxxxxx> writes:
> > Jonathan NeuschÃfer <j.neuschaefer@xxxxxxx> 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

Attachment: signature.asc
Description: PGP signature