Re: [PATCH 1/6] powerpc/mm/32: Use pfn_valid to check if pointer is in RAM

2018-02-21 Thread Jonathan Neuschäfer
On Wed, Feb 21, 2018 at 02:51:19PM +0100, Jonathan Neuschäfer wrote: [...] > While looking through arch/powerpc/mm, I noticed that there's a > page_is_ram function, which simply uses the memblocks directly, on > PPC32. Oops, I misread the code here. memblock is used on PPC64. > It seems like a

Re: [PATCH 1/6] powerpc/mm/32: Use pfn_valid to check if pointer is in RAM

2018-02-21 Thread Jonathan Neuschäfer
Hello Christophe, On Tue, Feb 20, 2018 at 06:45:09PM +0100, christophe leroy wrote: [...] > > - if (slab_is_available() && (p < virt_to_phys(high_memory)) && > > + if (slab_is_available() && pfn_valid(__phys_to_pfn(p)) && > > I'm not sure this is equivalent: > > high_memory = (void *)

Re: [PATCH 1/6] powerpc/mm/32: Use pfn_valid to check if pointer is in RAM

2018-02-20 Thread christophe leroy
Le 20/02/2018 à 17:14, Jonathan Neuschäfer a écrit : The Nintendo Wii has a memory layout that places two chunks of RAM at non-adjacent addresses, and MMIO between them. Currently, the allocation of these MMIO areas is made possible by declaring the MMIO hole as reserved memory and allowing

[PATCH 1/6] powerpc/mm/32: Use pfn_valid to check if pointer is in RAM

2018-02-20 Thread Jonathan Neuschäfer
The Nintendo Wii has a memory layout that places two chunks of RAM at non-adjacent addresses, and MMIO between them. Currently, the allocation of these MMIO areas is made possible by declaring the MMIO hole as reserved memory and allowing reserved memory to be allocated (cf. wii_memory_fixups).