powerpc/mm: Use memblock API for PPC32 page_is_ram
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>
Wed, 28 Mar 2018 00:25:41 +0000 (02:25 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Sat, 31 Mar 2018 13:47:42 +0000 (00:47 +1100)
To support accurate checking for different blocks of memory on PPC32,
use the same memblock-based approach that's already used on PPC64 also
on PPC32.

Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/mm/mem.c

index 8f335cf052f8ad4d1df072418cb0b1feaf451284..737f8a4632ccc68abfdd61a1900380834b125340 100644 (file)
@@ -82,11 +82,7 @@ static inline pte_t *virt_to_kpte(unsigned long vaddr)
 
 int page_is_ram(unsigned long pfn)
 {
-#ifndef CONFIG_PPC64   /* XXX for now */
-       return pfn < max_pfn;
-#else
        return memblock_is_memory(__pfn_to_phys(pfn));
-#endif
 }
 
 pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,