]> err.no Git - linux-2.6/commitdiff
powerpc: hash_huge_page() should get the WIMG bits from the lpte
authorDave Kleikamp <shaggy@linux.vnet.ibm.com>
Wed, 18 Jun 2008 22:32:56 +0000 (08:32 +1000)
committerPaul Mackerras <paulus@samba.org>
Tue, 1 Jul 2008 01:28:02 +0000 (11:28 +1000)
Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Cc: Jon Tollefson <kniht@linux.vnet.ibm.com>
Cc: Adam Litke <agl@us.ibm.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/mm/hugetlbpage.c

index 8fa07f3f6c2b768526f38fd1da01d4d9a36ffeec..0d12fba31bc596d13ceaf58ea8d04c23663082ac 100644 (file)
@@ -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,