Skip to content

Commit

Permalink
Merge tag 'mips_fixes_4.14' of git://git.kernel.org/pub/scm/linux/ker…
Browse files Browse the repository at this point in the history
…nel/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
  • Loading branch information
torvalds committed Nov 4, 2017
2 parents e50f82f + ca208b5 commit dab30d5
Show file tree
Hide file tree
Showing 13 changed files with 40 additions and 28 deletions.
3 changes: 3 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Adriana Reus <[email protected]> <[email protected]>
Alan Cox <[email protected]>
Alan Cox <[email protected]>
Aleksey Gorelov <[email protected]>
Aleksandar Markovic <[email protected]> <[email protected]>
Al Viro <[email protected]>
Al Viro <[email protected]>
Andreas Herrmann <[email protected]>
Expand Down Expand Up @@ -101,6 +102,7 @@ Leonid I Ananiev <[email protected]>
Linas Vepstas <[email protected]>
Linus Lüssing <[email protected]> <[email protected]>
Linus Lüssing <[email protected]> <[email protected]>
Marcin Nowakowski <[email protected]> <[email protected]>
Mark Brown <[email protected]>
Martin Kepplinger <[email protected]> <[email protected]>
Martin Kepplinger <[email protected]> <[email protected]>
Expand All @@ -119,6 +121,7 @@ Matt Redfearn <[email protected]> <[email protected]>
Mayuresh Janorkar <[email protected]>
Michael Buesch <[email protected]>
Michel Dänzer <[email protected]>
Miodrag Dinic <[email protected]> <[email protected]>
Mitesh shah <[email protected]>
Mohit Kumar <[email protected]> <[email protected]>
Morten Welinder <[email protected]>
Expand Down
9 changes: 4 additions & 5 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ F: drivers/android/
F: drivers/staging/android/

ANDROID GOLDFISH RTC DRIVER
M: Miodrag Dinic <miodrag.dinic@imgtec.com>
M: Miodrag Dinic <miodrag.dinic@mips.com>
S: Supported
F: Documentation/devicetree/bindings/rtc/google,goldfish-rtc.txt
F: drivers/rtc/rtc-goldfish.c
Expand Down Expand Up @@ -9019,7 +9019,7 @@ F: drivers/*/*loongson1*
F: drivers/*/*/*loongson1*

MIPS RINT INSTRUCTION EMULATION
M: Aleksandar Markovic <aleksandar.markovic@imgtec.com>
M: Aleksandar Markovic <aleksandar.markovic@mips.com>
L: [email protected]
S: Supported
F: arch/mips/math-emu/sp_rint.c
Expand Down Expand Up @@ -10683,10 +10683,9 @@ S: Maintained
F: drivers/pinctrl/spear/

PISTACHIO SOC SUPPORT
M: James Hartley <[email protected]>
M: Ionela Voinescu <[email protected]>
M: James Hartley <[email protected]>
L: [email protected]
S: Maintained
S: Odd Fixes
F: arch/mips/pistachio/
F: arch/mips/include/asm/mach-pistachio/
F: arch/mips/boot/dts/img/pistachio*
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/generic/board-ni169445.its.S
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
/ {
images {
fdt@ni169445 {
description = "NI 169445 device tree";
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/generic/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <asm/fw/fw.h>
#include <asm/irq_cpu.h>
#include <asm/machine.h>
#include <asm/mips-cpc.h>
#include <asm/mips-cps.h>
#include <asm/prom.h>
#include <asm/smp-ops.h>
#include <asm/time.h>
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/generic/kexec.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2016 Imagination Technologies
* Author: Marcin Nowakowski <marcin.nowakowski@imgtec.com>
* Author: Marcin Nowakowski <marcin.nowakowski@mips.com>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
Expand Down
4 changes: 2 additions & 2 deletions arch/mips/include/asm/mips-cm.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ GCR_ACCESSOR_RO(64, 0x000, config)
GCR_ACCESSOR_RW(64, 0x008, base)
#define CM_GCR_BASE_GCRBASE GENMASK_ULL(47, 15)
#define CM_GCR_BASE_CMDEFTGT GENMASK(1, 0)
#define CM_GCR_BASE_CMDEFTGT_DISABLED 0
#define CM_GCR_BASE_CMDEFTGT_MEM 1
#define CM_GCR_BASE_CMDEFTGT_MEM 0
#define CM_GCR_BASE_CMDEFTGT_RESERVED 1
#define CM_GCR_BASE_CMDEFTGT_IOCU0 2
#define CM_GCR_BASE_CMDEFTGT_IOCU1 3

Expand Down
8 changes: 4 additions & 4 deletions arch/mips/include/asm/stackframe.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,10 @@
sll k0, 3 /* extract cu0 bit */
.set noreorder
bltz k0, 8f
move k0, sp
.if \docfi
.cfi_register sp, k0
.endif
#ifdef CONFIG_EVA
/*
* Flush interAptiv's Return Prediction Stack (RPS) by writing
Expand All @@ -225,10 +229,6 @@
MTC0 k0, CP0_ENTRYHI
#endif
.set reorder
move k0, sp
.if \docfi
.cfi_register sp, k0
.endif
/* Called from user mode, new stack. */
get_saved_sp docfi=\docfi tosp=1
8:
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/kernel/probes-common.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2016 Imagination Technologies
* Author: Marcin Nowakowski <marcin.nowakowski@imgtec.com>
* Author: Marcin Nowakowski <marcin.nowakowski@mips.com>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
Expand Down
6 changes: 3 additions & 3 deletions arch/mips/kernel/smp-cmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#undef DEBUG

#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/sched/task_stack.h>
#include <linux/smp.h>
#include <linux/cpumask.h>
#include <linux/interrupt.h>
Expand Down Expand Up @@ -50,8 +50,8 @@ static void cmp_init_secondary(void)

#ifdef CONFIG_MIPS_MT_SMP
if (cpu_has_mipsmt)
c->vpe_id = (read_c0_tcbind() >> TCBIND_CURVPE_SHIFT) &
TCBIND_CURVPE;
cpu_set_vpe_id(c, (read_c0_tcbind() >> TCBIND_CURVPE_SHIFT) &
TCBIND_CURVPE);
#endif
}

Expand Down
2 changes: 1 addition & 1 deletion arch/mips/kernel/smp-cps.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ static int cps_boot_secondary(int cpu, struct task_struct *idle)
int err;

/* We don't yet support booting CPUs in other clusters */
if (cpu_cluster(&cpu_data[cpu]) != cpu_cluster(&current_cpu_data))
if (cpu_cluster(&cpu_data[cpu]) != cpu_cluster(&raw_current_cpu_data))
return -ENOSYS;

vpe_cfg->pc = (unsigned long)&smp_bootstrap;
Expand Down
24 changes: 17 additions & 7 deletions arch/mips/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#include <asm/processor.h>
#include <asm/idle.h>
#include <asm/r4k-timer.h>
#include <asm/mips-cpc.h>
#include <asm/mips-cps.h>
#include <asm/mmu_context.h>
#include <asm/time.h>
#include <asm/setup.h>
Expand All @@ -66,6 +66,7 @@ EXPORT_SYMBOL(cpu_sibling_map);
cpumask_t cpu_core_map[NR_CPUS] __read_mostly;
EXPORT_SYMBOL(cpu_core_map);

static DECLARE_COMPLETION(cpu_starting);
static DECLARE_COMPLETION(cpu_running);

/*
Expand Down Expand Up @@ -374,15 +375,24 @@ asmlinkage void start_secondary(void)
cpumask_set_cpu(cpu, &cpu_coherent_mask);
notify_cpu_starting(cpu);

/* Notify boot CPU that we're starting & ready to sync counters */
complete(&cpu_starting);

synchronise_count_slave(cpu);

/* The CPU is running and counters synchronised, now mark it online */
set_cpu_online(cpu, true);

set_cpu_sibling_map(cpu);
set_cpu_core_map(cpu);

calculate_cpu_foreign_map();

/*
* Notify boot CPU that we're up & online and it can safely return
* from __cpu_up
*/
complete(&cpu_running);
synchronise_count_slave(cpu);

/*
* irq will be enabled in ->smp_finish(), enabling it too early
Expand Down Expand Up @@ -445,17 +455,17 @@ int __cpu_up(unsigned int cpu, struct task_struct *tidle)
if (err)
return err;

/*
* We must check for timeout here, as the CPU will not be marked
* online until the counters are synchronised.
*/
if (!wait_for_completion_timeout(&cpu_running,
/* Wait for CPU to start and be ready to sync counters */
if (!wait_for_completion_timeout(&cpu_starting,
msecs_to_jiffies(1000))) {
pr_crit("CPU%u: failed to start\n", cpu);
return -EIO;
}

synchronise_count_master(cpu);

/* Wait for CPU to finish startup & mark itself online before return */
wait_for_completion(&cpu_running);
return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion arch/mips/mm/uasm-micromips.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ static const struct insn const insn_table_MM[insn_invalid] = {
[insn_jr] = {M(mm_pool32a_op, 0, 0, 0, mm_jalr_op, mm_pool32axf_op), RS},
[insn_lb] = {M(mm_lb32_op, 0, 0, 0, 0, 0), RT | RS | SIMM},
[insn_ld] = {0, 0},
[insn_lh] = {M(mm_lh32_op, 0, 0, 0, 0, 0), RS | RS | SIMM},
[insn_lh] = {M(mm_lh32_op, 0, 0, 0, 0, 0), RT | RS | SIMM},
[insn_ll] = {M(mm_pool32c_op, 0, 0, (mm_ll_func << 1), 0, 0), RS | RT | SIMM},
[insn_lld] = {0, 0},
[insn_lui] = {M(mm_pool32i_op, mm_lui_op, 0, 0, 0, 0), RS | SIMM},
Expand Down
2 changes: 1 addition & 1 deletion arch/mips/net/ebpf_jit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1513,7 +1513,7 @@ static int build_one_insn(const struct bpf_insn *insn, struct jit_ctx *ctx,
}
src = ebpf_to_mips_reg(ctx, insn, src_reg_no_fp);
if (src < 0)
return dst;
return src;
if (BPF_MODE(insn->code) == BPF_XADD) {
switch (BPF_SIZE(insn->code)) {
case BPF_W:
Expand Down

0 comments on commit dab30d5

Please sign in to comment.