Context |
Check |
Description |
snowpatch_ozlabs/apply_patch |
warning
|
Failed to apply on branch powerpc/merge (6b450d0404ca83dc131dadffd40c5aa6f7a603af)
|
snowpatch_ozlabs/apply_patch |
warning
|
Failed to apply on branch powerpc/next (612ee81b9461475b5a5612c2e8d71559dd3c7920)
|
snowpatch_ozlabs/apply_patch |
warning
|
Failed to apply on branch linus/master (7f65d3541676a9f0e27f6545c6f53367fd248f7b)
|
snowpatch_ozlabs/apply_patch |
warning
|
Failed to apply on branch powerpc/fixes (d10f60ae27d26d811e2a1bb39ded47df96d7499f)
|
snowpatch_ozlabs/apply_patch |
success
|
Successfully applied on branch linux-next (12d61c6996999e6562cbbed5f270d572248a11c5)
|
snowpatch_ozlabs/checkpatch |
fail
|
Test checkpatch on branch linux-next
|
@@ -55,10 +55,12 @@ static struct page *maybe_pte_to_page(pte_t pte)
unsigned long pfn = pte_pfn(pte);
struct page *page;
- if (unlikely(!pfn_valid(pfn)))
- return NULL;
- page = pfn_to_page(pfn);
- if (PageReserved(page))
+ /*
+ * We reject any pages that are not online (not managed by the buddy).
+ * This includes ZONE_DEVICE pages.
+ */
+ page = pfn_to_online_page(pfn);
+ if (unlikely(!page || PageReserved(page)))
return NULL;
return page;
}
Right now, ZONE_DEVICE memory is always set PG_reserved. We want to change that. Rewrite maybe_pte_to_page() to make sure the function produces the same result once we stop setting ZONE_DEVICE pages PG_reserved. Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Christophe Leroy <christophe.leroy@c-s.fr> Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com> Cc: Allison Randal <allison@lohutok.net> Cc: Nicholas Piggin <npiggin@gmail.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: David Hildenbrand <david@redhat.com> --- arch/powerpc/mm/pgtable.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)