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

Merge tag 'mips_fixes_4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/mips

Pull MIPS fixes from James Hogan:
"A selection of important MIPS fixes for 4.14, and some MAINTAINERS /
email address updates:

Maintainership updates:
- imgtec.com -> mips.com email addresses (this trivially updates
comments in quite a few files, as well as MAINTAINERS)
- Pistachio SoC maintainership update

Fixes:
- NI 169445 build (new platform in 4.14)
- EVA regression (4.14)
- SMP-CPS build & preemption regressions (4.14)
- SMP/hotplug deadlock & race (deadlock reintroduced 4.13)
- ebpf_jit error return (4.13)
- SMP-CMP build regressions (4.11 and 4.14)
- bad UASM microMIPS encoding (3.16)
- CM definitions (3.15)"

[ I had taken the email address updates separately, because I didn't
expect James to send a pull request, so those got applied twice. - Linus]

* tag 'mips_fixes_4.14' of git://git.kernel.org/pub/scm/linux/kernel/git/jhogan/mips:
MIPS: Update email address for Marcin Nowakowski
MIPS: smp-cmp: Fix vpe_id build error
MAINTAINERS: Update Pistachio platform maintainers
MIPS: smp-cmp: Use right include for task_struct
MIPS: Update Goldfish RTC driver maintainer email address
MIPS: Update RINT emulation maintainer email address
MIPS: CPS: Fix use of current_cpu_data in preemptible code
MIPS: SMP: Fix deadlock & online race
MIPS: bpf: Fix a typo in build_one_insn()
MIPS: microMIPS: Fix incorrect mask in insn_table_MM
MIPS: Fix CM region target definitions
MIPS: generic: Fix compilation error from include asm/mips-cpc.h
MIPS: Fix exception entry when CONFIG_EVA enabled
MIPS: generic: Fix NI 169445 its build
Update MIPS email addresses

+40 -28
+3
.mailmap
··· 15 15 Alan Cox <alan@lxorguk.ukuu.org.uk> 16 16 Alan Cox <root@hraefn.swansea.linux.org.uk> 17 17 Aleksey Gorelov <aleksey_gorelov@phoenix.com> 18 + Aleksandar Markovic <aleksandar.markovic@mips.com> <aleksandar.markovic@imgtec.com> 18 19 Al Viro <viro@ftp.linux.org.uk> 19 20 Al Viro <viro@zenIV.linux.org.uk> 20 21 Andreas Herrmann <aherrman@de.ibm.com> ··· 102 101 Linas Vepstas <linas@austin.ibm.com> 103 102 Linus Lüssing <linus.luessing@c0d3.blue> <linus.luessing@web.de> 104 103 Linus Lüssing <linus.luessing@c0d3.blue> <linus.luessing@ascom.ch> 104 + Marcin Nowakowski <marcin.nowakowski@mips.com> <marcin.nowakowski@imgtec.com> 105 105 Mark Brown <broonie@sirena.org.uk> 106 106 Martin Kepplinger <martink@posteo.de> <martin.kepplinger@theobroma-systems.com> 107 107 Martin Kepplinger <martink@posteo.de> <martin.kepplinger@ginzinger.com> ··· 121 119 Mayuresh Janorkar <mayur@ti.com> 122 120 Michael Buesch <m@bues.ch> 123 121 Michel Dänzer <michel@tungstengraphics.com> 122 + Miodrag Dinic <miodrag.dinic@mips.com> <miodrag.dinic@imgtec.com> 124 123 Mitesh shah <mshah@teja.com> 125 124 Mohit Kumar <mohit.kumar@st.com> <mohit.kumar.dhaka@gmail.com> 126 125 Morten Welinder <terra@gnome.org>
+4 -5
MAINTAINERS
··· 873 873 F: drivers/staging/android/ 874 874 875 875 ANDROID GOLDFISH RTC DRIVER 876 - M: Miodrag Dinic <miodrag.dinic@imgtec.com> 876 + M: Miodrag Dinic <miodrag.dinic@mips.com> 877 877 S: Supported 878 878 F: Documentation/devicetree/bindings/rtc/google,goldfish-rtc.txt 879 879 F: drivers/rtc/rtc-goldfish.c ··· 9019 9019 F: drivers/*/*/*loongson1* 9020 9020 9021 9021 MIPS RINT INSTRUCTION EMULATION 9022 - M: Aleksandar Markovic <aleksandar.markovic@imgtec.com> 9022 + M: Aleksandar Markovic <aleksandar.markovic@mips.com> 9023 9023 L: linux-mips@linux-mips.org 9024 9024 S: Supported 9025 9025 F: arch/mips/math-emu/sp_rint.c ··· 10683 10683 F: drivers/pinctrl/spear/ 10684 10684 10685 10685 PISTACHIO SOC SUPPORT 10686 - M: James Hartley <james.hartley@imgtec.com> 10687 - M: Ionela Voinescu <ionela.voinescu@imgtec.com> 10686 + M: James Hartley <james.hartley@sondrel.com> 10688 10687 L: linux-mips@linux-mips.org 10689 - S: Maintained 10688 + S: Odd Fixes 10690 10689 F: arch/mips/pistachio/ 10691 10690 F: arch/mips/include/asm/mach-pistachio/ 10692 10691 F: arch/mips/boot/dts/img/pistachio*
+1 -1
arch/mips/generic/board-ni169445.its.S
··· 1 - { 1 + / { 2 2 images { 3 3 fdt@ni169445 { 4 4 description = "NI 169445 device tree";
+1 -1
arch/mips/generic/init.c
··· 20 20 #include <asm/fw/fw.h> 21 21 #include <asm/irq_cpu.h> 22 22 #include <asm/machine.h> 23 - #include <asm/mips-cpc.h> 23 + #include <asm/mips-cps.h> 24 24 #include <asm/prom.h> 25 25 #include <asm/smp-ops.h> 26 26 #include <asm/time.h>
+1 -1
arch/mips/generic/kexec.c
··· 1 1 /* 2 2 * Copyright (C) 2016 Imagination Technologies 3 - * Author: Marcin Nowakowski <marcin.nowakowski@imgtec.com> 3 + * Author: Marcin Nowakowski <marcin.nowakowski@mips.com> 4 4 * 5 5 * This program is free software; you can redistribute it and/or modify it 6 6 * under the terms of the GNU General Public License as published by the
+2 -2
arch/mips/include/asm/mips-cm.h
··· 142 142 GCR_ACCESSOR_RW(64, 0x008, base) 143 143 #define CM_GCR_BASE_GCRBASE GENMASK_ULL(47, 15) 144 144 #define CM_GCR_BASE_CMDEFTGT GENMASK(1, 0) 145 - #define CM_GCR_BASE_CMDEFTGT_DISABLED 0 146 - #define CM_GCR_BASE_CMDEFTGT_MEM 1 145 + #define CM_GCR_BASE_CMDEFTGT_MEM 0 146 + #define CM_GCR_BASE_CMDEFTGT_RESERVED 1 147 147 #define CM_GCR_BASE_CMDEFTGT_IOCU0 2 148 148 #define CM_GCR_BASE_CMDEFTGT_IOCU1 3 149 149
+4 -4
arch/mips/include/asm/stackframe.h
··· 199 199 sll k0, 3 /* extract cu0 bit */ 200 200 .set noreorder 201 201 bltz k0, 8f 202 + move k0, sp 203 + .if \docfi 204 + .cfi_register sp, k0 205 + .endif 202 206 #ifdef CONFIG_EVA 203 207 /* 204 208 * Flush interAptiv's Return Prediction Stack (RPS) by writing ··· 229 225 MTC0 k0, CP0_ENTRYHI 230 226 #endif 231 227 .set reorder 232 - move k0, sp 233 - .if \docfi 234 - .cfi_register sp, k0 235 - .endif 236 228 /* Called from user mode, new stack. */ 237 229 get_saved_sp docfi=\docfi tosp=1 238 230 8:
+1 -1
arch/mips/kernel/probes-common.h
··· 1 1 /* 2 2 * Copyright (C) 2016 Imagination Technologies 3 - * Author: Marcin Nowakowski <marcin.nowakowski@imgtec.com> 3 + * Author: Marcin Nowakowski <marcin.nowakowski@mips.com> 4 4 * 5 5 * This program is free software; you can redistribute it and/or modify it 6 6 * under the terms of the GNU General Public License as published by the
+3 -3
arch/mips/kernel/smp-cmp.c
··· 19 19 #undef DEBUG 20 20 21 21 #include <linux/kernel.h> 22 - #include <linux/sched.h> 22 + #include <linux/sched/task_stack.h> 23 23 #include <linux/smp.h> 24 24 #include <linux/cpumask.h> 25 25 #include <linux/interrupt.h> ··· 50 50 51 51 #ifdef CONFIG_MIPS_MT_SMP 52 52 if (cpu_has_mipsmt) 53 - c->vpe_id = (read_c0_tcbind() >> TCBIND_CURVPE_SHIFT) & 54 - TCBIND_CURVPE; 53 + cpu_set_vpe_id(c, (read_c0_tcbind() >> TCBIND_CURVPE_SHIFT) & 54 + TCBIND_CURVPE); 55 55 #endif 56 56 } 57 57
+1 -1
arch/mips/kernel/smp-cps.c
··· 306 306 int err; 307 307 308 308 /* We don't yet support booting CPUs in other clusters */ 309 - if (cpu_cluster(&cpu_data[cpu]) != cpu_cluster(&current_cpu_data)) 309 + if (cpu_cluster(&cpu_data[cpu]) != cpu_cluster(&raw_current_cpu_data)) 310 310 return -ENOSYS; 311 311 312 312 vpe_cfg->pc = (unsigned long)&smp_bootstrap;
+17 -7
arch/mips/kernel/smp.c
··· 42 42 #include <asm/processor.h> 43 43 #include <asm/idle.h> 44 44 #include <asm/r4k-timer.h> 45 - #include <asm/mips-cpc.h> 45 + #include <asm/mips-cps.h> 46 46 #include <asm/mmu_context.h> 47 47 #include <asm/time.h> 48 48 #include <asm/setup.h> ··· 66 66 cpumask_t cpu_core_map[NR_CPUS] __read_mostly; 67 67 EXPORT_SYMBOL(cpu_core_map); 68 68 69 + static DECLARE_COMPLETION(cpu_starting); 69 70 static DECLARE_COMPLETION(cpu_running); 70 71 71 72 /* ··· 375 374 cpumask_set_cpu(cpu, &cpu_coherent_mask); 376 375 notify_cpu_starting(cpu); 377 376 377 + /* Notify boot CPU that we're starting & ready to sync counters */ 378 + complete(&cpu_starting); 379 + 380 + synchronise_count_slave(cpu); 381 + 382 + /* The CPU is running and counters synchronised, now mark it online */ 378 383 set_cpu_online(cpu, true); 379 384 380 385 set_cpu_sibling_map(cpu); ··· 388 381 389 382 calculate_cpu_foreign_map(); 390 383 384 + /* 385 + * Notify boot CPU that we're up & online and it can safely return 386 + * from __cpu_up 387 + */ 391 388 complete(&cpu_running); 392 - synchronise_count_slave(cpu); 393 389 394 390 /* 395 391 * irq will be enabled in ->smp_finish(), enabling it too early ··· 455 445 if (err) 456 446 return err; 457 447 458 - /* 459 - * We must check for timeout here, as the CPU will not be marked 460 - * online until the counters are synchronised. 461 - */ 462 - if (!wait_for_completion_timeout(&cpu_running, 448 + /* Wait for CPU to start and be ready to sync counters */ 449 + if (!wait_for_completion_timeout(&cpu_starting, 463 450 msecs_to_jiffies(1000))) { 464 451 pr_crit("CPU%u: failed to start\n", cpu); 465 452 return -EIO; 466 453 } 467 454 468 455 synchronise_count_master(cpu); 456 + 457 + /* Wait for CPU to finish startup & mark itself online before return */ 458 + wait_for_completion(&cpu_running); 469 459 return 0; 470 460 } 471 461
+1 -1
arch/mips/mm/uasm-micromips.c
··· 80 80 [insn_jr] = {M(mm_pool32a_op, 0, 0, 0, mm_jalr_op, mm_pool32axf_op), RS}, 81 81 [insn_lb] = {M(mm_lb32_op, 0, 0, 0, 0, 0), RT | RS | SIMM}, 82 82 [insn_ld] = {0, 0}, 83 - [insn_lh] = {M(mm_lh32_op, 0, 0, 0, 0, 0), RS | RS | SIMM}, 83 + [insn_lh] = {M(mm_lh32_op, 0, 0, 0, 0, 0), RT | RS | SIMM}, 84 84 [insn_ll] = {M(mm_pool32c_op, 0, 0, (mm_ll_func << 1), 0, 0), RS | RT | SIMM}, 85 85 [insn_lld] = {0, 0}, 86 86 [insn_lui] = {M(mm_pool32i_op, mm_lui_op, 0, 0, 0, 0), RS | SIMM},
+1 -1
arch/mips/net/ebpf_jit.c
··· 1513 1513 } 1514 1514 src = ebpf_to_mips_reg(ctx, insn, src_reg_no_fp); 1515 1515 if (src < 0) 1516 - return dst; 1516 + return src; 1517 1517 if (BPF_MODE(insn->code) == BPF_XADD) { 1518 1518 switch (BPF_SIZE(insn->code)) { 1519 1519 case BPF_W: