Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 357703
b: refs/heads/master
c: e31048a
h: refs/heads/master
i:
  357701: 8dba08d
  357699: c1cdfdd
  357695: 6ac90d6
v: v3
  • Loading branch information
Michel Lespinasse authored and Tony Luck committed Feb 22, 2013
1 parent b47ea69 commit 7d61405
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f53f232504253a5e9f8f19ac1aa1b9161d7e6d2a
refs/heads/master: e31048af84e24c99136acaad99f9273b147f8444
20 changes: 9 additions & 11 deletions trunk/arch/ia64/mm/hugetlbpage.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ void hugetlb_free_pgd_range(struct mmu_gather *tlb,
unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr, unsigned long len,
unsigned long pgoff, unsigned long flags)
{
struct vm_area_struct *vmm;
struct vm_unmapped_area_info info;

if (len > RGN_MAP_LIMIT)
return -ENOMEM;
Expand All @@ -165,16 +165,14 @@ unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr, u
/* This code assumes that RGN_HPAGE != 0. */
if ((REGION_NUMBER(addr) != RGN_HPAGE) || (addr & (HPAGE_SIZE - 1)))
addr = HPAGE_REGION_BASE;
else
addr = ALIGN(addr, HPAGE_SIZE);
for (vmm = find_vma(current->mm, addr); ; vmm = vmm->vm_next) {
/* At this point: (!vmm || addr < vmm->vm_end). */
if (REGION_OFFSET(addr) + len > RGN_MAP_LIMIT)
return -ENOMEM;
if (!vmm || (addr + len) <= vmm->vm_start)
return addr;
addr = ALIGN(vmm->vm_end, HPAGE_SIZE);
}

info.flags = 0;
info.length = len;
info.low_limit = addr;
info.high_limit = HPAGE_REGION_BASE + RGN_MAP_LIMIT;
info.align_mask = PAGE_MASK & (HPAGE_SIZE - 1);
info.align_offset = 0;
return vm_unmapped_area(&info);
}

static int __init hugetlb_setup_sz(char *str)
Expand Down

0 comments on commit 7d61405

Please sign in to comment.