aboutsummaryrefslogtreecommitdiff
path: root/arch/sparc64/mm/hugetlbpage.c
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2006-04-04 16:10:34 -0500
committerKumar Gala <galak@kernel.crashing.org>2006-04-04 16:10:34 -0500
commit12df7556705aae97f24a397377e17898700d7192 (patch)
tree5adc6b1c2aa940263ee2e88fc6645918533da539 /arch/sparc64/mm/hugetlbpage.c
parent34ddf733c415a8e336c996a4303d9f336e0c81b5 (diff)
parent6246b6128bbe34d0752f119cf7c5111c85fe481d (diff)
Merge branch 'master'
Diffstat (limited to 'arch/sparc64/mm/hugetlbpage.c')
-rw-r--r--arch/sparc64/mm/hugetlbpage.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/sparc64/mm/hugetlbpage.c b/arch/sparc64/mm/hugetlbpage.c
index 074620d413d..fbbbebbad8a 100644
--- a/arch/sparc64/mm/hugetlbpage.c
+++ b/arch/sparc64/mm/hugetlbpage.c
@@ -198,6 +198,13 @@ pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr)
pmd_t *pmd;
pte_t *pte = NULL;
+ /* We must align the address, because our caller will run
+ * set_huge_pte_at() on whatever we return, which writes out
+ * all of the sub-ptes for the hugepage range. So we have
+ * to give it the first such sub-pte.
+ */
+ addr &= HPAGE_MASK;
+
pgd = pgd_offset(mm, addr);
pud = pud_alloc(mm, pgd, addr);
if (pud) {