From: Dave Kleikamp Date: Wed, 18 Jun 2008 22:32:56 +0000 (+1000) Subject: powerpc: hash_huge_page() should get the WIMG bits from the lpte X-Git-Tag: firefly_0821_release~19653^2~106 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=87e9ab13c36b838f7d557a6111dfdd29fcde85ad;p=firefly-linux-kernel-4.4.55.git powerpc: hash_huge_page() should get the WIMG bits from the lpte Signed-off-by: Dave Kleikamp Cc: Jon Tollefson Cc: Adam Litke Cc: Benjamin Herrenschmidt Signed-off-by: Paul Mackerras --- diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index 8fa07f3f6c2b..0d12fba31bc5 100644 --- a/arch/powerpc/mm/hugetlbpage.c +++ b/arch/powerpc/mm/hugetlbpage.c @@ -504,9 +504,8 @@ repeat: new_pte = (new_pte & ~_PAGE_HPTEFLAGS) | _PAGE_HASHPTE; #endif /* Add in WIMG bits */ - /* XXX We should store these in the pte */ - /* --BenH: I think they are ... */ - rflags |= _PAGE_COHERENT; + rflags |= (new_pte & (_PAGE_WRITETHRU | _PAGE_NO_CACHE | + _PAGE_COHERENT | _PAGE_GUARDED)); /* Insert into the hash table, primary slot */ slot = ppc_md.hpte_insert(hpte_group, va, pa, rflags, 0,