[PATCH] powerpc: Fix a huge page bug

Benjamin Herrenschmidt benh at kernel.crashing.org
Thu Dec 8 16:51:44 EST 2005


The 64k pages patch changed the meaning of one argument passed to the
low level hash functions (from "large" it became "psize" or page size
index), but one of the call sites wasn't properly updates, causing
potential random weird problems with huge pages. This fixes it.

Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
---

This is a candidate for 2.6.15

Index: linux-work/arch/powerpc/mm/hugetlbpage.c
===================================================================
--- linux-work.orig/arch/powerpc/mm/hugetlbpage.c	2005-11-28 11:04:49.000000000 +1100
+++ linux-work/arch/powerpc/mm/hugetlbpage.c	2005-12-08 16:42:41.000000000 +1100
@@ -703,7 +703,8 @@ int hash_huge_page(struct mm_struct *mm,
 		slot = (hash & htab_hash_mask) * HPTES_PER_GROUP;
 		slot += (old_pte & _PAGE_F_GIX) >> 12;
 
-		if (ppc_md.hpte_updatepp(slot, rflags, va, 1, local) == -1)
+		if (ppc_md.hpte_updatepp(slot, rflags, va, mmu_huge_psize,
+					 local) == -1)
 			old_pte &= ~_PAGE_HPTEFLAGS;
 	}
 





More information about the Linuxppc64-dev mailing list