aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc/kernel/sys_parisc.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/parisc/kernel/sys_parisc.c')
-rw-r--r--arch/parisc/kernel/sys_parisc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/parisc/kernel/sys_parisc.c b/arch/parisc/kernel/sys_parisc.c
index b7cadc4a06cd..31ffa9b55322 100644
--- a/arch/parisc/kernel/sys_parisc.c
+++ b/arch/parisc/kernel/sys_parisc.c
@@ -45,7 +45,7 @@
45 45
46static int get_offset(unsigned int last_mmap) 46static int get_offset(unsigned int last_mmap)
47{ 47{
48 return (last_mmap & (SHMLBA-1)) >> PAGE_SHIFT; 48 return (last_mmap & (SHM_COLOUR-1)) >> PAGE_SHIFT;
49} 49}
50 50
51static unsigned long shared_align_offset(unsigned int last_mmap, 51static unsigned long shared_align_offset(unsigned int last_mmap,
@@ -57,8 +57,8 @@ static unsigned long shared_align_offset(unsigned int last_mmap,
57static inline unsigned long COLOR_ALIGN(unsigned long addr, 57static inline unsigned long COLOR_ALIGN(unsigned long addr,
58 unsigned int last_mmap, unsigned long pgoff) 58 unsigned int last_mmap, unsigned long pgoff)
59{ 59{
60 unsigned long base = (addr+SHMLBA-1) & ~(SHMLBA-1); 60 unsigned long base = (addr+SHM_COLOUR-1) & ~(SHM_COLOUR-1);
61 unsigned long off = (SHMLBA-1) & 61 unsigned long off = (SHM_COLOUR-1) &
62 (shared_align_offset(last_mmap, pgoff) << PAGE_SHIFT); 62 (shared_align_offset(last_mmap, pgoff) << PAGE_SHIFT);
63 63
64 return base + off; 64 return base + off;
@@ -101,7 +101,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr,
101 if (flags & MAP_FIXED) { 101 if (flags & MAP_FIXED) {
102 if ((flags & MAP_SHARED) && last_mmap && 102 if ((flags & MAP_SHARED) && last_mmap &&
103 (addr - shared_align_offset(last_mmap, pgoff)) 103 (addr - shared_align_offset(last_mmap, pgoff))
104 & (SHMLBA - 1)) 104 & (SHM_COLOUR - 1))
105 return -EINVAL; 105 return -EINVAL;
106 goto found_addr; 106 goto found_addr;
107 } 107 }
@@ -122,7 +122,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr,
122 info.length = len; 122 info.length = len;
123 info.low_limit = mm->mmap_legacy_base; 123 info.low_limit = mm->mmap_legacy_base;
124 info.high_limit = mmap_upper_limit(); 124 info.high_limit = mmap_upper_limit();
125 info.align_mask = last_mmap ? (PAGE_MASK & (SHMLBA - 1)) : 0; 125 info.align_mask = last_mmap ? (PAGE_MASK & (SHM_COLOUR - 1)) : 0;
126 info.align_offset = shared_align_offset(last_mmap, pgoff); 126 info.align_offset = shared_align_offset(last_mmap, pgoff);
127 addr = vm_unmapped_area(&info); 127 addr = vm_unmapped_area(&info);
128 128
@@ -161,7 +161,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
161 if (flags & MAP_FIXED) { 161 if (flags & MAP_FIXED) {
162 if ((flags & MAP_SHARED) && last_mmap && 162 if ((flags & MAP_SHARED) && last_mmap &&
163 (addr - shared_align_offset(last_mmap, pgoff)) 163 (addr - shared_align_offset(last_mmap, pgoff))
164 & (SHMLBA - 1)) 164 & (SHM_COLOUR - 1))
165 return -EINVAL; 165 return -EINVAL;
166 goto found_addr; 166 goto found_addr;
167 } 167 }
@@ -182,7 +182,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
182 info.length = len; 182 info.length = len;
183 info.low_limit = PAGE_SIZE; 183 info.low_limit = PAGE_SIZE;
184 info.high_limit = mm->mmap_base; 184 info.high_limit = mm->mmap_base;
185 info.align_mask = last_mmap ? (PAGE_MASK & (SHMLBA - 1)) : 0; 185 info.align_mask = last_mmap ? (PAGE_MASK & (SHM_COLOUR - 1)) : 0;
186 info.align_offset = shared_align_offset(last_mmap, pgoff); 186 info.align_offset = shared_align_offset(last_mmap, pgoff);
187 addr = vm_unmapped_area(&info); 187 addr = vm_unmapped_area(&info);
188 if (!(addr & ~PAGE_MASK)) 188 if (!(addr & ~PAGE_MASK))