浏览代码

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

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>
Dave Kleikamp 17 年之前
父节点
当前提交
87e9ab13c3
共有 1 个文件被更改,包括 2 次插入3 次删除
  1. 2 3
      arch/powerpc/mm/hugetlbpage.c

+ 2 - 3
arch/powerpc/mm/hugetlbpage.c

@@ -504,9 +504,8 @@ repeat:
 		new_pte = (new_pte & ~_PAGE_HPTEFLAGS) | _PAGE_HASHPTE;
 		new_pte = (new_pte & ~_PAGE_HPTEFLAGS) | _PAGE_HASHPTE;
 #endif
 #endif
 		/* Add in WIMG bits */
 		/* 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 */
 		/* Insert into the hash table, primary slot */
 		slot = ppc_md.hpte_insert(hpte_group, va, pa, rflags, 0,
 		slot = ppc_md.hpte_insert(hpte_group, va, pa, rflags, 0,