aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel/sys_sparc.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc/kernel/sys_sparc.c')
-rw-r--r--arch/sparc/kernel/sys_sparc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/sparc/kernel/sys_sparc.c b/arch/sparc/kernel/sys_sparc.c
index 4d73421559c3..03035c852a43 100644
--- a/arch/sparc/kernel/sys_sparc.c
+++ b/arch/sparc/kernel/sys_sparc.c
@@ -53,7 +53,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi
53 /* See asm-sparc/uaccess.h */ 53 /* See asm-sparc/uaccess.h */
54 if (len > TASK_SIZE - PAGE_SIZE) 54 if (len > TASK_SIZE - PAGE_SIZE)
55 return -ENOMEM; 55 return -ENOMEM;
56 if (ARCH_SUN4C_SUN4 && len > 0x20000000) 56 if (ARCH_SUN4C && len > 0x20000000)
57 return -ENOMEM; 57 return -ENOMEM;
58 if (!addr) 58 if (!addr)
59 addr = TASK_UNMAPPED_BASE; 59 addr = TASK_UNMAPPED_BASE;
@@ -65,7 +65,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi
65 65
66 for (vmm = find_vma(current->mm, addr); ; vmm = vmm->vm_next) { 66 for (vmm = find_vma(current->mm, addr); ; vmm = vmm->vm_next) {
67 /* At this point: (!vmm || addr < vmm->vm_end). */ 67 /* At this point: (!vmm || addr < vmm->vm_end). */
68 if (ARCH_SUN4C_SUN4 && addr < 0xe0000000 && 0x20000000 - len < addr) { 68 if (ARCH_SUN4C && addr < 0xe0000000 && 0x20000000 - len < addr) {
69 addr = PAGE_OFFSET; 69 addr = PAGE_OFFSET;
70 vmm = find_vma(current->mm, PAGE_OFFSET); 70 vmm = find_vma(current->mm, PAGE_OFFSET);
71 } 71 }
@@ -81,7 +81,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, unsi
81 81
82asmlinkage unsigned long sparc_brk(unsigned long brk) 82asmlinkage unsigned long sparc_brk(unsigned long brk)
83{ 83{
84 if(ARCH_SUN4C_SUN4) { 84 if(ARCH_SUN4C) {
85 if ((brk & 0xe0000000) != (current->mm->brk & 0xe0000000)) 85 if ((brk & 0xe0000000) != (current->mm->brk & 0xe0000000))
86 return current->mm->brk; 86 return current->mm->brk;
87 } 87 }
@@ -221,7 +221,7 @@ out:
221 221
222int sparc_mmap_check(unsigned long addr, unsigned long len) 222int sparc_mmap_check(unsigned long addr, unsigned long len)
223{ 223{
224 if (ARCH_SUN4C_SUN4 && 224 if (ARCH_SUN4C &&
225 (len > 0x20000000 || 225 (len > 0x20000000 ||
226 (addr < 0xe0000000 && addr + len > 0x20000000))) 226 (addr < 0xe0000000 && addr + len > 0x20000000)))
227 return -EINVAL; 227 return -EINVAL;