]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] powerpc: Fix a huge page bug
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 8 Dec 2005 05:51:44 +0000 (16:51 +1100)
committerPaul Mackerras <paulus@samba.org>
Thu, 8 Dec 2005 05:57:41 +0000 (16:57 +1100)
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 updated, causing
potential random weird problems with huge pages. This fixes it.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/mm/hugetlbpage.c

index 6bc9dbad7dea20cd744d10f682f74562533f614f..8bce515dc320d085938b1bbfdaacd946c94ee0af 100644 (file)
@@ -703,7 +703,8 @@ int hash_huge_page(struct mm_struct *mm, unsigned long access,
                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;
        }