Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'parisc-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux

Pull parisc updates from Helge Deller:
"There are two major changes in this patchset:

The major fix is that the epoll_pwait() syscall for 32bit userspace
was not using the compat wrapper on a 64bit kernel.

Secondly we changed the value of SHMLBA from 4MB to PAGE_SIZE to
reflect that we can actually mmap to any multiple of PAGE_SIZE. The
only thing which needs care is that shared mmaps need to be mapped at
the same offset inside the 4MB cache window"

* 'parisc-3.15' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
parisc: fix epoll_pwait syscall on compat kernel
parisc: change value of SHMLBA from 0x00400000 to PAGE_SIZE
parisc: Replace __get_cpu_var uses for address calculation

+14 -14
+2 -3
arch/parisc/include/asm/shmparam.h
··· 1 1 #ifndef _ASMPARISC_SHMPARAM_H 2 2 #define _ASMPARISC_SHMPARAM_H 3 3 4 - #define __ARCH_FORCE_SHMLBA 1 5 - 6 - #define SHMLBA 0x00400000 /* attach addr needs to be 4 Mb aligned */ 4 + #define SHMLBA PAGE_SIZE /* attach addr a multiple of this */ 5 + #define SHM_COLOUR 0x00400000 /* shared mappings colouring */ 7 6 8 7 #endif /* _ASMPARISC_SHMPARAM_H */
+2 -1
arch/parisc/kernel/cache.c
··· 323 323 * specifically accesses it, of course) */ 324 324 325 325 flush_tlb_page(mpnt, addr); 326 - if (old_addr == 0 || (old_addr & (SHMLBA - 1)) != (addr & (SHMLBA - 1))) { 326 + if (old_addr == 0 || (old_addr & (SHM_COLOUR - 1)) 327 + != (addr & (SHM_COLOUR - 1))) { 327 328 __flush_cache_page(mpnt, addr, page_to_phys(page)); 328 329 if (old_addr) 329 330 printk(KERN_ERR "INEQUIVALENT ALIASES 0x%lx and 0x%lx in file %s\n", old_addr, addr, mpnt->vm_file ? (char *)mpnt->vm_file->f_path.dentry->d_name.name : "(null)");
+7 -7
arch/parisc/kernel/sys_parisc.c
··· 45 45 46 46 static 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 51 51 static unsigned long shared_align_offset(unsigned int last_mmap, ··· 57 57 static inline unsigned long COLOR_ALIGN(unsigned long addr, 58 58 unsigned int last_mmap, unsigned long pgoff) 59 59 { 60 - unsigned long base = (addr+SHMLBA-1) & ~(SHMLBA-1); 61 - unsigned long off = (SHMLBA-1) & 60 + unsigned long base = (addr+SHM_COLOUR-1) & ~(SHM_COLOUR-1); 61 + unsigned long off = (SHM_COLOUR-1) & 62 62 (shared_align_offset(last_mmap, pgoff) << PAGE_SHIFT); 63 63 64 64 return base + off; ··· 101 101 if (flags & MAP_FIXED) { 102 102 if ((flags & MAP_SHARED) && last_mmap && 103 103 (addr - shared_align_offset(last_mmap, pgoff)) 104 - & (SHMLBA - 1)) 104 + & (SHM_COLOUR - 1)) 105 105 return -EINVAL; 106 106 goto found_addr; 107 107 } ··· 122 122 info.length = len; 123 123 info.low_limit = mm->mmap_legacy_base; 124 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 126 info.align_offset = shared_align_offset(last_mmap, pgoff); 127 127 addr = vm_unmapped_area(&info); 128 128 ··· 161 161 if (flags & MAP_FIXED) { 162 162 if ((flags & MAP_SHARED) && last_mmap && 163 163 (addr - shared_align_offset(last_mmap, pgoff)) 164 - & (SHMLBA - 1)) 164 + & (SHM_COLOUR - 1)) 165 165 return -EINVAL; 166 166 goto found_addr; 167 167 } ··· 182 182 info.length = len; 183 183 info.low_limit = PAGE_SIZE; 184 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 186 info.align_offset = shared_align_offset(last_mmap, pgoff); 187 187 addr = vm_unmapped_area(&info); 188 188 if (!(addr & ~PAGE_MASK))
+1 -1
arch/parisc/kernel/syscall_table.S
··· 392 392 ENTRY_COMP(vmsplice) 393 393 ENTRY_COMP(move_pages) /* 295 */ 394 394 ENTRY_SAME(getcpu) 395 - ENTRY_SAME(epoll_pwait) 395 + ENTRY_COMP(epoll_pwait) 396 396 ENTRY_COMP(statfs64) 397 397 ENTRY_COMP(fstatfs64) 398 398 ENTRY_COMP(kexec_load) /* 300 */
+1 -1
arch/parisc/lib/memcpy.c
··· 470 470 return 0; 471 471 472 472 /* if a load or store fault occured we can get the faulty addr */ 473 - d = &__get_cpu_var(exception_data); 473 + d = this_cpu_ptr(&exception_data); 474 474 fault_addr = d->fault_addr; 475 475 476 476 /* error in load or store? */
+1 -1
arch/parisc/mm/fault.c
··· 151 151 fix = search_exception_tables(regs->iaoq[0]); 152 152 if (fix) { 153 153 struct exception_data *d; 154 - d = &__get_cpu_var(exception_data); 154 + d = this_cpu_ptr(&exception_data); 155 155 d->fault_ip = regs->iaoq[0]; 156 156 d->fault_space = regs->isr; 157 157 d->fault_addr = regs->ior;