aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/mm
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2006-03-31 03:36:25 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-04-01 02:03:36 -0500
commit9df1dab1df58ef20ef7df9b8f39d86cf5d2d1949 (patch)
tree7f697e5cc595c906b4779f8301ef3eb58cfea728 /arch/sparc64/mm
parent73c50a27a453a5ed0d21ff23bd67c1dd6d864cb8 (diff)
[SPARC64]: Align address in huge_pte_alloc().
We are about to fill in all HPAGE_SIZE's worth of PAGE_SIZE ptes, so we have to give the first pte in that set else we scribble over random memory when we fill in the ptes. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/mm')
-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 074620d413d4..fbbbebbad8a4 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)
198 pmd_t *pmd; 198 pmd_t *pmd;
199 pte_t *pte = NULL; 199 pte_t *pte = NULL;
200 200
201 /* We must align the address, because our caller will run
202 * set_huge_pte_at() on whatever we return, which writes out
203 * all of the sub-ptes for the hugepage range. So we have
204 * to give it the first such sub-pte.
205 */
206 addr &= HPAGE_MASK;
207
201 pgd = pgd_offset(mm, addr); 208 pgd = pgd_offset(mm, addr);
202 pud = pud_alloc(mm, pgd, addr); 209 pud = pud_alloc(mm, pgd, addr);
203 if (pud) { 210 if (pud) {