aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/mm/hugetlbpage.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc64/mm/hugetlbpage.c')
-rw-r--r--arch/sparc64/mm/hugetlbpage.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/sparc64/mm/hugetlbpage.c b/arch/sparc64/mm/hugetlbpage.c
index 33fd0b265e70..00677b5e1d7d 100644
--- a/arch/sparc64/mm/hugetlbpage.c
+++ b/arch/sparc64/mm/hugetlbpage.c
@@ -248,6 +248,7 @@ void set_huge_pte_at(struct mm_struct *mm, unsigned long addr,
248 if (!pte_present(*ptep) && pte_present(entry)) 248 if (!pte_present(*ptep) && pte_present(entry))
249 mm->context.huge_pte_count++; 249 mm->context.huge_pte_count++;
250 250
251 addr &= HPAGE_MASK;
251 for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) { 252 for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) {
252 set_pte_at(mm, addr, ptep, entry); 253 set_pte_at(mm, addr, ptep, entry);
253 ptep++; 254 ptep++;
@@ -266,6 +267,8 @@ pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr,
266 if (pte_present(entry)) 267 if (pte_present(entry))
267 mm->context.huge_pte_count--; 268 mm->context.huge_pte_count--;
268 269
270 addr &= HPAGE_MASK;
271
269 for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) { 272 for (i = 0; i < (1 << HUGETLB_PAGE_ORDER); i++) {
270 pte_clear(mm, addr, ptep); 273 pte_clear(mm, addr, ptep);
271 addr += PAGE_SIZE; 274 addr += PAGE_SIZE;