mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 14:42:24 +00:00
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
This commit is contained in:
commit
81cef0fe19
@ -1,8 +1,7 @@
|
||||
#ifndef _ASMPARISC_SHMPARAM_H
|
||||
#define _ASMPARISC_SHMPARAM_H
|
||||
|
||||
#define __ARCH_FORCE_SHMLBA 1
|
||||
|
||||
#define SHMLBA 0x00400000 /* attach addr needs to be 4 Mb aligned */
|
||||
#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
|
||||
#define SHM_COLOUR 0x00400000 /* shared mappings colouring */
|
||||
|
||||
#endif /* _ASMPARISC_SHMPARAM_H */
|
||||
|
@ -323,7 +323,8 @@ void flush_dcache_page(struct page *page)
|
||||
* specifically accesses it, of course) */
|
||||
|
||||
flush_tlb_page(mpnt, addr);
|
||||
if (old_addr == 0 || (old_addr & (SHMLBA - 1)) != (addr & (SHMLBA - 1))) {
|
||||
if (old_addr == 0 || (old_addr & (SHM_COLOUR - 1))
|
||||
!= (addr & (SHM_COLOUR - 1))) {
|
||||
__flush_cache_page(mpnt, addr, page_to_phys(page));
|
||||
if (old_addr)
|
||||
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)");
|
||||
|
@ -45,7 +45,7 @@
|
||||
|
||||
static int get_offset(unsigned int last_mmap)
|
||||
{
|
||||
return (last_mmap & (SHMLBA-1)) >> PAGE_SHIFT;
|
||||
return (last_mmap & (SHM_COLOUR-1)) >> PAGE_SHIFT;
|
||||
}
|
||||
|
||||
static unsigned long shared_align_offset(unsigned int last_mmap,
|
||||
@ -57,8 +57,8 @@ static unsigned long shared_align_offset(unsigned int last_mmap,
|
||||
static inline unsigned long COLOR_ALIGN(unsigned long addr,
|
||||
unsigned int last_mmap, unsigned long pgoff)
|
||||
{
|
||||
unsigned long base = (addr+SHMLBA-1) & ~(SHMLBA-1);
|
||||
unsigned long off = (SHMLBA-1) &
|
||||
unsigned long base = (addr+SHM_COLOUR-1) & ~(SHM_COLOUR-1);
|
||||
unsigned long off = (SHM_COLOUR-1) &
|
||||
(shared_align_offset(last_mmap, pgoff) << PAGE_SHIFT);
|
||||
|
||||
return base + off;
|
||||
@ -101,7 +101,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr,
|
||||
if (flags & MAP_FIXED) {
|
||||
if ((flags & MAP_SHARED) && last_mmap &&
|
||||
(addr - shared_align_offset(last_mmap, pgoff))
|
||||
& (SHMLBA - 1))
|
||||
& (SHM_COLOUR - 1))
|
||||
return -EINVAL;
|
||||
goto found_addr;
|
||||
}
|
||||
@ -122,7 +122,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr,
|
||||
info.length = len;
|
||||
info.low_limit = mm->mmap_legacy_base;
|
||||
info.high_limit = mmap_upper_limit();
|
||||
info.align_mask = last_mmap ? (PAGE_MASK & (SHMLBA - 1)) : 0;
|
||||
info.align_mask = last_mmap ? (PAGE_MASK & (SHM_COLOUR - 1)) : 0;
|
||||
info.align_offset = shared_align_offset(last_mmap, pgoff);
|
||||
addr = vm_unmapped_area(&info);
|
||||
|
||||
@ -161,7 +161,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
|
||||
if (flags & MAP_FIXED) {
|
||||
if ((flags & MAP_SHARED) && last_mmap &&
|
||||
(addr - shared_align_offset(last_mmap, pgoff))
|
||||
& (SHMLBA - 1))
|
||||
& (SHM_COLOUR - 1))
|
||||
return -EINVAL;
|
||||
goto found_addr;
|
||||
}
|
||||
@ -182,7 +182,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
|
||||
info.length = len;
|
||||
info.low_limit = PAGE_SIZE;
|
||||
info.high_limit = mm->mmap_base;
|
||||
info.align_mask = last_mmap ? (PAGE_MASK & (SHMLBA - 1)) : 0;
|
||||
info.align_mask = last_mmap ? (PAGE_MASK & (SHM_COLOUR - 1)) : 0;
|
||||
info.align_offset = shared_align_offset(last_mmap, pgoff);
|
||||
addr = vm_unmapped_area(&info);
|
||||
if (!(addr & ~PAGE_MASK))
|
||||
|
@ -392,7 +392,7 @@
|
||||
ENTRY_COMP(vmsplice)
|
||||
ENTRY_COMP(move_pages) /* 295 */
|
||||
ENTRY_SAME(getcpu)
|
||||
ENTRY_SAME(epoll_pwait)
|
||||
ENTRY_COMP(epoll_pwait)
|
||||
ENTRY_COMP(statfs64)
|
||||
ENTRY_COMP(fstatfs64)
|
||||
ENTRY_COMP(kexec_load) /* 300 */
|
||||
|
@ -470,7 +470,7 @@ static unsigned long pa_memcpy(void *dstp, const void *srcp, unsigned long len)
|
||||
return 0;
|
||||
|
||||
/* if a load or store fault occured we can get the faulty addr */
|
||||
d = &__get_cpu_var(exception_data);
|
||||
d = this_cpu_ptr(&exception_data);
|
||||
fault_addr = d->fault_addr;
|
||||
|
||||
/* error in load or store? */
|
||||
|
@ -151,7 +151,7 @@ int fixup_exception(struct pt_regs *regs)
|
||||
fix = search_exception_tables(regs->iaoq[0]);
|
||||
if (fix) {
|
||||
struct exception_data *d;
|
||||
d = &__get_cpu_var(exception_data);
|
||||
d = this_cpu_ptr(&exception_data);
|
||||
d->fault_ip = regs->iaoq[0];
|
||||
d->fault_space = regs->isr;
|
||||
d->fault_addr = regs->ior;
|
||||
|
Loading…
Reference in New Issue
Block a user