aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc64')
-rw-r--r--arch/sparc64/mm/hugetlbpage.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/sparc64/mm/hugetlbpage.c b/arch/sparc64/mm/hugetlbpage.c
index 00677b5e1d7d..e224a94e6a1b 100644
--- a/arch/sparc64/mm/hugetlbpage.c
+++ b/arch/sparc64/mm/hugetlbpage.c
@@ -175,6 +175,12 @@ hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
175 if (len > task_size) 175 if (len > task_size)
176 return -ENOMEM; 176 return -ENOMEM;
177 177
178 if (flags & MAP_FIXED) {
179 if (prepare_hugepage_range(addr, len, pgoff))
180 return -EINVAL;
181 return addr;
182 }
183
178 if (addr) { 184 if (addr) {
179 addr = ALIGN(addr, HPAGE_SIZE); 185 addr = ALIGN(addr, HPAGE_SIZE);
180 vma = find_vma(mm, addr); 186 vma = find_vma(mm, addr);