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

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus

Pull MIPS fixes from Ralf Baechle:
"These are the fixes for the N32 syscall bugs found by Al, an
extraneous break that broke detection for R3000 and R3081 processors,
an endless loop processing signals for kernel task (x86 received the
same fix a while ago) and a fix for transparent huge page which took
ages to track down because it was so hard to come up with a workable
test case."

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
MIPS: Fix endless loop when processing signals for kernel tasks
MIPS: R3000/R3081: Fix CPU detection.
MIPS: N32: Fix signalfd4 syscall entry point
MIPS: N32: Fix preadv(2) and pwritev(2) entry points.
MIPS: Avoid mcheck by flushing page range in huge_ptep_set_access_flags()

+24 -20
+11 -1
arch/mips/include/asm/hugetlb.h
··· 95 95 pte_t *ptep, pte_t pte, 96 96 int dirty) 97 97 { 98 - return ptep_set_access_flags(vma, addr, ptep, pte, dirty); 98 + int changed = !pte_same(*ptep, pte); 99 + 100 + if (changed) { 101 + set_pte_at(vma->vm_mm, addr, ptep, pte); 102 + /* 103 + * There could be some standard sized pages in there, 104 + * get them all. 105 + */ 106 + flush_tlb_range(vma, addr, addr + HPAGE_SIZE); 107 + } 108 + return changed; 99 109 } 100 110 101 111 static inline pte_t huge_ptep_get(pte_t *ptep)
-1
arch/mips/kernel/cpu-probe.c
··· 510 510 c->cputype = CPU_R3000A; 511 511 __cpu_name[cpu] = "R3000A"; 512 512 } 513 - break; 514 513 } else { 515 514 c->cputype = CPU_R3000; 516 515 __cpu_name[cpu] = "R3000";
+6 -1
arch/mips/kernel/entry.S
··· 36 36 FEXPORT(ret_from_irq) 37 37 LONG_S s0, TI_REGS($28) 38 38 FEXPORT(__ret_from_irq) 39 + /* 40 + * We can be coming here from a syscall done in the kernel space, 41 + * e.g. a failed kernel_execve(). 42 + */ 43 + resume_userspace_check: 39 44 LONG_L t0, PT_STATUS(sp) # returning to kernel mode? 40 45 andi t0, t0, KU_USER 41 46 beqz t0, resume_kernel ··· 167 162 move a0, sp 168 163 li a1, 0 169 164 jal do_notify_resume # a2 already loaded 170 - j resume_userspace 165 + j resume_userspace_check 171 166 172 167 FEXPORT(syscall_exit_partial) 173 168 local_irq_disable # make sure need_resched doesn't
+3 -3
arch/mips/kernel/scall64-n32.S
··· 397 397 PTR sys_timerfd_create 398 398 PTR compat_sys_timerfd_gettime /* 6285 */ 399 399 PTR compat_sys_timerfd_settime 400 - PTR sys_signalfd4 400 + PTR compat_sys_signalfd4 401 401 PTR sys_eventfd2 402 402 PTR sys_epoll_create1 403 403 PTR sys_dup3 /* 6290 */ 404 404 PTR sys_pipe2 405 405 PTR sys_inotify_init1 406 - PTR sys_preadv 407 - PTR sys_pwritev 406 + PTR compat_sys_preadv 407 + PTR compat_sys_pwritev 408 408 PTR compat_sys_rt_tgsigqueueinfo /* 6295 */ 409 409 PTR sys_perf_event_open 410 410 PTR sys_accept4
+4 -14
arch/mips/mm/tlb-r4k.c
··· 120 120 121 121 if (cpu_context(cpu, mm) != 0) { 122 122 unsigned long size, flags; 123 - int huge = is_vm_hugetlb_page(vma); 124 123 125 124 ENTER_CRITICAL(flags); 126 - if (huge) { 127 - start = round_down(start, HPAGE_SIZE); 128 - end = round_up(end, HPAGE_SIZE); 129 - size = (end - start) >> HPAGE_SHIFT; 130 - } else { 131 - start = round_down(start, PAGE_SIZE << 1); 132 - end = round_up(end, PAGE_SIZE << 1); 133 - size = (end - start) >> (PAGE_SHIFT + 1); 134 - } 125 + start = round_down(start, PAGE_SIZE << 1); 126 + end = round_up(end, PAGE_SIZE << 1); 127 + size = (end - start) >> (PAGE_SHIFT + 1); 135 128 if (size <= current_cpu_data.tlbsize/2) { 136 129 int oldpid = read_c0_entryhi(); 137 130 int newpid = cpu_asid(cpu, mm); ··· 133 140 int idx; 134 141 135 142 write_c0_entryhi(start | newpid); 136 - if (huge) 137 - start += HPAGE_SIZE; 138 - else 139 - start += (PAGE_SIZE << 1); 143 + start += (PAGE_SIZE << 1); 140 144 mtc0_tlbw_hazard(); 141 145 tlb_probe(); 142 146 tlb_probe_hazard();