diff options
Diffstat (limited to 'arch/ia64/mm/hugetlbpage.c')
-rw-r--r-- | arch/ia64/mm/hugetlbpage.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/ia64/mm/hugetlbpage.c b/arch/ia64/mm/hugetlbpage.c index 2d13889d0a99..8d506710fdbd 100644 --- a/arch/ia64/mm/hugetlbpage.c +++ b/arch/ia64/mm/hugetlbpage.c | |||
@@ -68,9 +68,10 @@ huge_pte_offset (struct mm_struct *mm, unsigned long addr) | |||
68 | #define mk_pte_huge(entry) { pte_val(entry) |= _PAGE_P; } | 68 | #define mk_pte_huge(entry) { pte_val(entry) |= _PAGE_P; } |
69 | 69 | ||
70 | /* | 70 | /* |
71 | * This function checks for proper alignment of input addr and len parameters. | 71 | * Don't actually need to do any preparation, but need to make sure |
72 | * the address is in the right region. | ||
72 | */ | 73 | */ |
73 | int is_aligned_hugepage_range(unsigned long addr, unsigned long len) | 74 | int prepare_hugepage_range(unsigned long addr, unsigned long len) |
74 | { | 75 | { |
75 | if (len & ~HPAGE_MASK) | 76 | if (len & ~HPAGE_MASK) |
76 | return -EINVAL; | 77 | return -EINVAL; |
@@ -112,8 +113,7 @@ void hugetlb_free_pgd_range(struct mmu_gather **tlb, | |||
112 | unsigned long floor, unsigned long ceiling) | 113 | unsigned long floor, unsigned long ceiling) |
113 | { | 114 | { |
114 | /* | 115 | /* |
115 | * This is called only when is_hugepage_only_range(addr,), | 116 | * This is called to free hugetlb page tables. |
116 | * and it follows that is_hugepage_only_range(end,) also. | ||
117 | * | 117 | * |
118 | * The offset of these addresses from the base of the hugetlb | 118 | * The offset of these addresses from the base of the hugetlb |
119 | * region must be scaled down by HPAGE_SIZE/PAGE_SIZE so that | 119 | * region must be scaled down by HPAGE_SIZE/PAGE_SIZE so that |
@@ -125,9 +125,9 @@ void hugetlb_free_pgd_range(struct mmu_gather **tlb, | |||
125 | 125 | ||
126 | addr = htlbpage_to_page(addr); | 126 | addr = htlbpage_to_page(addr); |
127 | end = htlbpage_to_page(end); | 127 | end = htlbpage_to_page(end); |
128 | if (is_hugepage_only_range(tlb->mm, floor, HPAGE_SIZE)) | 128 | if (REGION_NUMBER(floor) == RGN_HPAGE) |
129 | floor = htlbpage_to_page(floor); | 129 | floor = htlbpage_to_page(floor); |
130 | if (is_hugepage_only_range(tlb->mm, ceiling, HPAGE_SIZE)) | 130 | if (REGION_NUMBER(ceiling) == RGN_HPAGE) |
131 | ceiling = htlbpage_to_page(ceiling); | 131 | ceiling = htlbpage_to_page(ceiling); |
132 | 132 | ||
133 | free_pgd_range(tlb, addr, end, floor, ceiling); | 133 | free_pgd_range(tlb, addr, end, floor, ceiling); |