aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-10-14 06:49:15 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2017-10-14 06:49:15 -0400
commitbe1f16ba35d97aff4d85c0daba0a02da51b7c83c (patch)
treed56c1d021313e24973b828c8a112ae3da1878b56
parent9aa0d2dde6ebd14e9d16e28081a24721d5b41cc8 (diff)
parentca8eb05b5f332a9e1ab3e2ece498d49f4d683470 (diff)
Merge branch '4.14-fixes' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Pull MIPS fixes from Ralf Baechle: "More MIPS fixes for 4.14: - Loongson 1: Set the default number of RX and TX queues to accomodate for recent changes of stmmac driver. - BPF: Fix uninitialised target compiler error. - Fix cmpxchg on 32 bit signed ints for 64 bit kernels with !kernel_uses_llsc - Fix generic-board-config.sh for builds using O= - Remove pr_err() calls from fpu_emu() for a case which is not a kernel error" * '4.14-fixes' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: MIPS: math-emu: Remove pr_err() calls from fpu_emu() MIPS: Fix generic-board-config.sh for builds using O= MIPS: Fix cmpxchg on 32b signed ints for 64b kernel with !kernel_uses_llsc MIPS: loongson1: set default number of rx and tx queues for stmmac MIPS: bpf: Fix uninitialised target compiler error
-rw-r--r--arch/mips/include/asm/cmpxchg.h6
-rw-r--r--arch/mips/loongson32/common/platform.c38
-rw-r--r--arch/mips/math-emu/cp1emu.c2
-rw-r--r--arch/mips/net/ebpf_jit.c2
-rwxr-xr-xarch/mips/tools/generic-board-config.sh6
5 files changed, 28 insertions, 26 deletions
diff --git a/arch/mips/include/asm/cmpxchg.h b/arch/mips/include/asm/cmpxchg.h
index 903f3bf48419..7e25c5cc353a 100644
--- a/arch/mips/include/asm/cmpxchg.h
+++ b/arch/mips/include/asm/cmpxchg.h
@@ -155,14 +155,16 @@ static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
155 return __cmpxchg_small(ptr, old, new, size); 155 return __cmpxchg_small(ptr, old, new, size);
156 156
157 case 4: 157 case 4:
158 return __cmpxchg_asm("ll", "sc", (volatile u32 *)ptr, old, new); 158 return __cmpxchg_asm("ll", "sc", (volatile u32 *)ptr,
159 (u32)old, new);
159 160
160 case 8: 161 case 8:
161 /* lld/scd are only available for MIPS64 */ 162 /* lld/scd are only available for MIPS64 */
162 if (!IS_ENABLED(CONFIG_64BIT)) 163 if (!IS_ENABLED(CONFIG_64BIT))
163 return __cmpxchg_called_with_bad_pointer(); 164 return __cmpxchg_called_with_bad_pointer();
164 165
165 return __cmpxchg_asm("lld", "scd", (volatile u64 *)ptr, old, new); 166 return __cmpxchg_asm("lld", "scd", (volatile u64 *)ptr,
167 (u64)old, new);
166 168
167 default: 169 default:
168 return __cmpxchg_called_with_bad_pointer(); 170 return __cmpxchg_called_with_bad_pointer();
diff --git a/arch/mips/loongson32/common/platform.c b/arch/mips/loongson32/common/platform.c
index 100f23dfa438..ac584c5823d0 100644
--- a/arch/mips/loongson32/common/platform.c
+++ b/arch/mips/loongson32/common/platform.c
@@ -183,18 +183,20 @@ int ls1x_eth_mux_init(struct platform_device *pdev, void *priv)
183} 183}
184 184
185static struct plat_stmmacenet_data ls1x_eth0_pdata = { 185static struct plat_stmmacenet_data ls1x_eth0_pdata = {
186 .bus_id = 0, 186 .bus_id = 0,
187 .phy_addr = -1, 187 .phy_addr = -1,
188#if defined(CONFIG_LOONGSON1_LS1B) 188#if defined(CONFIG_LOONGSON1_LS1B)
189 .interface = PHY_INTERFACE_MODE_MII, 189 .interface = PHY_INTERFACE_MODE_MII,
190#elif defined(CONFIG_LOONGSON1_LS1C) 190#elif defined(CONFIG_LOONGSON1_LS1C)
191 .interface = PHY_INTERFACE_MODE_RMII, 191 .interface = PHY_INTERFACE_MODE_RMII,
192#endif 192#endif
193 .mdio_bus_data = &ls1x_mdio_bus_data, 193 .mdio_bus_data = &ls1x_mdio_bus_data,
194 .dma_cfg = &ls1x_eth_dma_cfg, 194 .dma_cfg = &ls1x_eth_dma_cfg,
195 .has_gmac = 1, 195 .has_gmac = 1,
196 .tx_coe = 1, 196 .tx_coe = 1,
197 .init = ls1x_eth_mux_init, 197 .rx_queues_to_use = 1,
198 .tx_queues_to_use = 1,
199 .init = ls1x_eth_mux_init,
198}; 200};
199 201
200static struct resource ls1x_eth0_resources[] = { 202static struct resource ls1x_eth0_resources[] = {
@@ -222,14 +224,16 @@ struct platform_device ls1x_eth0_pdev = {
222 224
223#ifdef CONFIG_LOONGSON1_LS1B 225#ifdef CONFIG_LOONGSON1_LS1B
224static struct plat_stmmacenet_data ls1x_eth1_pdata = { 226static struct plat_stmmacenet_data ls1x_eth1_pdata = {
225 .bus_id = 1, 227 .bus_id = 1,
226 .phy_addr = -1, 228 .phy_addr = -1,
227 .interface = PHY_INTERFACE_MODE_MII, 229 .interface = PHY_INTERFACE_MODE_MII,
228 .mdio_bus_data = &ls1x_mdio_bus_data, 230 .mdio_bus_data = &ls1x_mdio_bus_data,
229 .dma_cfg = &ls1x_eth_dma_cfg, 231 .dma_cfg = &ls1x_eth_dma_cfg,
230 .has_gmac = 1, 232 .has_gmac = 1,
231 .tx_coe = 1, 233 .tx_coe = 1,
232 .init = ls1x_eth_mux_init, 234 .rx_queues_to_use = 1,
235 .tx_queues_to_use = 1,
236 .init = ls1x_eth_mux_init,
233}; 237};
234 238
235static struct resource ls1x_eth1_resources[] = { 239static struct resource ls1x_eth1_resources[] = {
diff --git a/arch/mips/math-emu/cp1emu.c b/arch/mips/math-emu/cp1emu.c
index 192542dbd972..16d9ef5a78c5 100644
--- a/arch/mips/math-emu/cp1emu.c
+++ b/arch/mips/math-emu/cp1emu.c
@@ -2558,7 +2558,6 @@ dcopuop:
2558 break; 2558 break;
2559 default: 2559 default:
2560 /* Reserved R6 ops */ 2560 /* Reserved R6 ops */
2561 pr_err("Reserved MIPS R6 CMP.condn.S operation\n");
2562 return SIGILL; 2561 return SIGILL;
2563 } 2562 }
2564 } 2563 }
@@ -2719,7 +2718,6 @@ dcopuop:
2719 break; 2718 break;
2720 default: 2719 default:
2721 /* Reserved R6 ops */ 2720 /* Reserved R6 ops */
2722 pr_err("Reserved MIPS R6 CMP.condn.D operation\n");
2723 return SIGILL; 2721 return SIGILL;
2724 } 2722 }
2725 } 2723 }
diff --git a/arch/mips/net/ebpf_jit.c b/arch/mips/net/ebpf_jit.c
index 7646891c4e9b..01b7a87ea678 100644
--- a/arch/mips/net/ebpf_jit.c
+++ b/arch/mips/net/ebpf_jit.c
@@ -667,7 +667,7 @@ static int build_one_insn(const struct bpf_insn *insn, struct jit_ctx *ctx,
667{ 667{
668 int src, dst, r, td, ts, mem_off, b_off; 668 int src, dst, r, td, ts, mem_off, b_off;
669 bool need_swap, did_move, cmp_eq; 669 bool need_swap, did_move, cmp_eq;
670 unsigned int target; 670 unsigned int target = 0;
671 u64 t64; 671 u64 t64;
672 s64 t64s; 672 s64 t64s;
673 int bpf_op = BPF_OP(insn->code); 673 int bpf_op = BPF_OP(insn->code);
diff --git a/arch/mips/tools/generic-board-config.sh b/arch/mips/tools/generic-board-config.sh
index 5c4f93687039..654d652d7fa1 100755
--- a/arch/mips/tools/generic-board-config.sh
+++ b/arch/mips/tools/generic-board-config.sh
@@ -30,8 +30,6 @@ cfg="$4"
30boards_origin="$5" 30boards_origin="$5"
31shift 5 31shift 5
32 32
33cd "${srctree}"
34
35# Only print Skipping... lines if the user explicitly specified BOARDS=. In the 33# Only print Skipping... lines if the user explicitly specified BOARDS=. In the
36# general case it only serves to obscure the useful output about what actually 34# general case it only serves to obscure the useful output about what actually
37# was included. 35# was included.
@@ -48,7 +46,7 @@ environment*)
48esac 46esac
49 47
50for board in $@; do 48for board in $@; do
51 board_cfg="arch/mips/configs/generic/board-${board}.config" 49 board_cfg="${srctree}/arch/mips/configs/generic/board-${board}.config"
52 if [ ! -f "${board_cfg}" ]; then 50 if [ ! -f "${board_cfg}" ]; then
53 echo "WARNING: Board config '${board_cfg}' not found" 51 echo "WARNING: Board config '${board_cfg}' not found"
54 continue 52 continue
@@ -84,7 +82,7 @@ for board in $@; do
84 done || continue 82 done || continue
85 83
86 # Merge this board config fragment into our final config file 84 # Merge this board config fragment into our final config file
87 ./scripts/kconfig/merge_config.sh \ 85 ${srctree}/scripts/kconfig/merge_config.sh \
88 -m -O ${objtree} ${cfg} ${board_cfg} \ 86 -m -O ${objtree} ${cfg} ${board_cfg} \
89 | grep -Ev '^(#|Using)' 87 | grep -Ev '^(#|Using)'
90done 88done