Skip to content

Commit be1f16b

Browse files
committed
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
2 parents 9aa0d2d + ca8eb05 commit be1f16b

5 files changed

Lines changed: 28 additions & 26 deletions

File tree

‎arch/mips/include/asm/cmpxchg.h‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,14 +155,16 @@ static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
155155
return __cmpxchg_small(ptr, old, new, size);
156156

157157
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);
159160

160161
case 8:
161162
/* lld/scd are only available for MIPS64 */
162163
if (!IS_ENABLED(CONFIG_64BIT))
163164
return __cmpxchg_called_with_bad_pointer();
164165

165-
return __cmpxchg_asm("lld", "scd", (volatile u64 *)ptr, old, new);
166+
return __cmpxchg_asm("lld", "scd", (volatile u64 *)ptr,
167+
(u64)old, new);
166168

167169
default:
168170
return __cmpxchg_called_with_bad_pointer();

‎arch/mips/loongson32/common/platform.c‎

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -183,18 +183,20 @@ int ls1x_eth_mux_init(struct platform_device *pdev, void *priv)
183183
}
184184

185185
static struct plat_stmmacenet_data ls1x_eth0_pdata = {
186-
.bus_id = 0,
187-
.phy_addr = -1,
186+
.bus_id = 0,
187+
.phy_addr = -1,
188188
#if defined(CONFIG_LOONGSON1_LS1B)
189-
.interface = PHY_INTERFACE_MODE_MII,
189+
.interface = PHY_INTERFACE_MODE_MII,
190190
#elif defined(CONFIG_LOONGSON1_LS1C)
191-
.interface = PHY_INTERFACE_MODE_RMII,
191+
.interface = PHY_INTERFACE_MODE_RMII,
192192
#endif
193-
.mdio_bus_data = &ls1x_mdio_bus_data,
194-
.dma_cfg = &ls1x_eth_dma_cfg,
195-
.has_gmac = 1,
196-
.tx_coe = 1,
197-
.init = ls1x_eth_mux_init,
193+
.mdio_bus_data = &ls1x_mdio_bus_data,
194+
.dma_cfg = &ls1x_eth_dma_cfg,
195+
.has_gmac = 1,
196+
.tx_coe = 1,
197+
.rx_queues_to_use = 1,
198+
.tx_queues_to_use = 1,
199+
.init = ls1x_eth_mux_init,
198200
};
199201

200202
static struct resource ls1x_eth0_resources[] = {
@@ -222,14 +224,16 @@ struct platform_device ls1x_eth0_pdev = {
222224

223225
#ifdef CONFIG_LOONGSON1_LS1B
224226
static struct plat_stmmacenet_data ls1x_eth1_pdata = {
225-
.bus_id = 1,
226-
.phy_addr = -1,
227-
.interface = PHY_INTERFACE_MODE_MII,
228-
.mdio_bus_data = &ls1x_mdio_bus_data,
229-
.dma_cfg = &ls1x_eth_dma_cfg,
230-
.has_gmac = 1,
231-
.tx_coe = 1,
232-
.init = ls1x_eth_mux_init,
227+
.bus_id = 1,
228+
.phy_addr = -1,
229+
.interface = PHY_INTERFACE_MODE_MII,
230+
.mdio_bus_data = &ls1x_mdio_bus_data,
231+
.dma_cfg = &ls1x_eth_dma_cfg,
232+
.has_gmac = 1,
233+
.tx_coe = 1,
234+
.rx_queues_to_use = 1,
235+
.tx_queues_to_use = 1,
236+
.init = ls1x_eth_mux_init,
233237
};
234238

235239
static struct resource ls1x_eth1_resources[] = {

‎arch/mips/math-emu/cp1emu.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2558,7 +2558,6 @@ static int fpu_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx,
25582558
break;
25592559
default:
25602560
/* Reserved R6 ops */
2561-
pr_err("Reserved MIPS R6 CMP.condn.S operation\n");
25622561
return SIGILL;
25632562
}
25642563
}
@@ -2719,7 +2718,6 @@ static int fpu_emu(struct pt_regs *xcp, struct mips_fpu_struct *ctx,
27192718
break;
27202719
default:
27212720
/* Reserved R6 ops */
2722-
pr_err("Reserved MIPS R6 CMP.condn.D operation\n");
27232721
return SIGILL;
27242722
}
27252723
}

‎arch/mips/net/ebpf_jit.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ static int build_one_insn(const struct bpf_insn *insn, struct jit_ctx *ctx,
667667
{
668668
int src, dst, r, td, ts, mem_off, b_off;
669669
bool need_swap, did_move, cmp_eq;
670-
unsigned int target;
670+
unsigned int target = 0;
671671
u64 t64;
672672
s64 t64s;
673673
int bpf_op = BPF_OP(insn->code);

‎arch/mips/tools/generic-board-config.sh‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ cfg="$4"
3030
boards_origin="$5"
3131
shift 5
3232

33-
cd "${srctree}"
34-
3533
# Only print Skipping... lines if the user explicitly specified BOARDS=. In the
3634
# general case it only serves to obscure the useful output about what actually
3735
# was included.
@@ -48,7 +46,7 @@ environment*)
4846
esac
4947

5048
for board in $@; do
51-
board_cfg="arch/mips/configs/generic/board-${board}.config"
49+
board_cfg="${srctree}/arch/mips/configs/generic/board-${board}.config"
5250
if [ ! -f "${board_cfg}" ]; then
5351
echo "WARNING: Board config '${board_cfg}' not found"
5452
continue
@@ -84,7 +82,7 @@ for board in $@; do
8482
done || continue
8583

8684
# Merge this board config fragment into our final config file
87-
./scripts/kconfig/merge_config.sh \
85+
${srctree}/scripts/kconfig/merge_config.sh \
8886
-m -O ${objtree} ${cfg} ${board_cfg} \
8987
| grep -Ev '^(#|Using)'
9088
done

0 commit comments

Comments
 (0)