[RFC:PATCH 01/06] powerpc: hash_huge_page() should get the WIMG bits from the lpte

Dave Kleikamp shaggy at linux.vnet.ibm.com
Wed Jun 11 08:01:01 EST 2008


powerpc: hash_huge_page() should get the WIMG bits from the lpte

Signed-off-by: Dave Kleikamp <shaggy at linux.vnet.ibm.com>
---

 arch/powerpc/mm/hugetlbpage.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff -Nurp linux000/arch/powerpc/mm/hugetlbpage.c linux001/arch/powerpc/mm/hugetlbpage.c
--- linux000/arch/powerpc/mm/hugetlbpage.c	2008-04-16 21:49:44.000000000 -0500
+++ linux001/arch/powerpc/mm/hugetlbpage.c	2008-06-10 16:48:59.000000000 -0500
@@ -502,9 +502,8 @@ repeat:
 		new_pte = (new_pte & ~_PAGE_HPTEFLAGS) | _PAGE_HASHPTE;
 
 		/* 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,



More information about the Linuxppc-dev mailing list