Skip to content

Commit 81cef0f

Browse files
committed
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
2 parents c2896de + ab3e55b commit 81cef0f

File tree

6 files changed

+14
-14
lines changed

6 files changed

+14
-14
lines changed

arch/parisc/include/asm/shmparam.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
#ifndef _ASMPARISC_SHMPARAM_H
22
#define _ASMPARISC_SHMPARAM_H
33

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 */
76

87
#endif /* _ASMPARISC_SHMPARAM_H */

arch/parisc/kernel/cache.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,8 @@ void flush_dcache_page(struct page *page)
323323
* specifically accesses it, of course) */
324324

325325
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))) {
327328
__flush_cache_page(mpnt, addr, page_to_phys(page));
328329
if (old_addr)
329330
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)");

arch/parisc/kernel/sys_parisc.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545

4646
static int get_offset(unsigned int last_mmap)
4747
{
48-
return (last_mmap & (SHMLBA-1)) >> PAGE_SHIFT;
48+
return (last_mmap & (SHM_COLOUR-1)) >> PAGE_SHIFT;
4949
}
5050

5151
static unsigned long shared_align_offset(unsigned int last_mmap,
@@ -57,8 +57,8 @@ static unsigned long shared_align_offset(unsigned int last_mmap,
5757
static inline unsigned long COLOR_ALIGN(unsigned long addr,
5858
unsigned int last_mmap, unsigned long pgoff)
5959
{
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) &
6262
(shared_align_offset(last_mmap, pgoff) << PAGE_SHIFT);
6363

6464
return base + off;
@@ -101,7 +101,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr,
101101
if (flags & MAP_FIXED) {
102102
if ((flags & MAP_SHARED) && last_mmap &&
103103
(addr - shared_align_offset(last_mmap, pgoff))
104-
& (SHMLBA - 1))
104+
& (SHM_COLOUR - 1))
105105
return -EINVAL;
106106
goto found_addr;
107107
}
@@ -122,7 +122,7 @@ unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr,
122122
info.length = len;
123123
info.low_limit = mm->mmap_legacy_base;
124124
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;
126126
info.align_offset = shared_align_offset(last_mmap, pgoff);
127127
addr = vm_unmapped_area(&info);
128128

@@ -161,7 +161,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
161161
if (flags & MAP_FIXED) {
162162
if ((flags & MAP_SHARED) && last_mmap &&
163163
(addr - shared_align_offset(last_mmap, pgoff))
164-
& (SHMLBA - 1))
164+
& (SHM_COLOUR - 1))
165165
return -EINVAL;
166166
goto found_addr;
167167
}
@@ -182,7 +182,7 @@ arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0,
182182
info.length = len;
183183
info.low_limit = PAGE_SIZE;
184184
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;
186186
info.align_offset = shared_align_offset(last_mmap, pgoff);
187187
addr = vm_unmapped_area(&info);
188188
if (!(addr & ~PAGE_MASK))

arch/parisc/kernel/syscall_table.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@
392392
ENTRY_COMP(vmsplice)
393393
ENTRY_COMP(move_pages) /* 295 */
394394
ENTRY_SAME(getcpu)
395-
ENTRY_SAME(epoll_pwait)
395+
ENTRY_COMP(epoll_pwait)
396396
ENTRY_COMP(statfs64)
397397
ENTRY_COMP(fstatfs64)
398398
ENTRY_COMP(kexec_load) /* 300 */

arch/parisc/lib/memcpy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ static unsigned long pa_memcpy(void *dstp, const void *srcp, unsigned long len)
470470
return 0;
471471

472472
/* 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);
474474
fault_addr = d->fault_addr;
475475

476476
/* error in load or store? */

arch/parisc/mm/fault.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ int fixup_exception(struct pt_regs *regs)
151151
fix = search_exception_tables(regs->iaoq[0]);
152152
if (fix) {
153153
struct exception_data *d;
154-
d = &__get_cpu_var(exception_data);
154+
d = this_cpu_ptr(&exception_data);
155155
d->fault_ip = regs->iaoq[0];
156156
d->fault_space = regs->isr;
157157
d->fault_addr = regs->ior;

0 commit comments

Comments
 (0)