提交 b6ea4283 编写于 作者: Y Yang Yingliang 提交者: Xie XiuQi

Revert "svm: reserve 4G for dvpp in func get_unmaped_area of svm fops"

ascend inclusion
category: bugfix
bugzilla: NA
CVE: NA

------------

It's specific code for ascend, so remove it.

This reverts commit 0d16e6d207a687611dcc6e741c5db69e61dcf7b3.
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 495a931e
...@@ -1499,9 +1499,6 @@ static unsigned long svm_get_unmapped_area(struct file *file, ...@@ -1499,9 +1499,6 @@ static unsigned long svm_get_unmapped_area(struct file *file,
struct vm_area_struct *vma = NULL; struct vm_area_struct *vma = NULL;
addr = ALIGN(addr, len); addr = ALIGN(addr, len);
if (!mmap_va32bit_check(addr, len, flags))
return -ENOMEM;
vma = find_vma(mm, addr); vma = find_vma(mm, addr);
if (TASK_SIZE - len >= addr && addr >= mmap_min_addr && if (TASK_SIZE - len >= addr && addr >= mmap_min_addr &&
(vma == NULL || addr + len <= vm_start_gap(vma))) (vma == NULL || addr + len <= vm_start_gap(vma)))
...@@ -1512,10 +1509,8 @@ static unsigned long svm_get_unmapped_area(struct file *file, ...@@ -1512,10 +1509,8 @@ static unsigned long svm_get_unmapped_area(struct file *file,
info.length = len; info.length = len;
info.low_limit = max(PAGE_SIZE, mmap_min_addr); info.low_limit = max(PAGE_SIZE, mmap_min_addr);
info.high_limit = mm->mmap_base; info.high_limit = mm->mmap_base;
/* the addr will be get must align to the size of l2buf */
info.align_mask = ((len >> PAGE_SHIFT) - 1) << PAGE_SHIFT; info.align_mask = ((len >> PAGE_SHIFT) - 1) << PAGE_SHIFT;
info.align_offset = pgoff << PAGE_SHIFT; info.align_offset = pgoff << PAGE_SHIFT;
mmap_va32bit_set_limit(&info, flags);
addr = vm_unmapped_area(&info); addr = vm_unmapped_area(&info);
if (offset_in_page(addr)) { if (offset_in_page(addr)) {
...@@ -1523,7 +1518,6 @@ static unsigned long svm_get_unmapped_area(struct file *file, ...@@ -1523,7 +1518,6 @@ static unsigned long svm_get_unmapped_area(struct file *file,
info.flags = 0; info.flags = 0;
info.low_limit = TASK_UNMAPPED_BASE; info.low_limit = TASK_UNMAPPED_BASE;
info.high_limit = TASK_SIZE; info.high_limit = TASK_SIZE;
mmap_va32bit_set_limit(&info, flags);
addr = vm_unmapped_area(&info); addr = vm_unmapped_area(&info);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册