Skip to contentSkip to conversation

Patch "MIPS: head: Reorder instructions missing a delay slot" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Jul 3, 2017

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

MIPS: head: Reorder instructions missing a delay slot

to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
mips-head-reorder-instructions-missing-a-delay-slot.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 25d8b92e0af75d72ce8b99e63e5a449cc0888efa Mon Sep 17 00:00:00 2001

From: Karl Beldan <[email protected]>
Date: Tue, 27 Jun 2017 19:22:16 +0000
Subject: MIPS: head: Reorder instructions missing a delay slot

From: Karl Beldan <[email protected]>

commit 25d8b92e0af75d72ce8b99e63e5a449cc0888efa upstream.

In this sequence the 'move' is assumed in the delay slot of the 'beq', but head.S is in reorder mode and the former gets pushed one 'nop' farther by the assembler.

The corrected behavior made booting with an UHI supplied dtb erratic.

Fixes 15f37e158892 ("MIPS: store the appended dtb address in a variable")
Cc Jonas Gorski <[email protected]>

Patchwork: https://patchwork.linux-mips.org/patch/16614/

---
 arch/mips/kernel/head.S |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/kernel/head.S +1 -1
@@ -106,8 +106,8 @@ NESTED(kernel_entry, 16, sp)			# kernel
 	beq		t0, t1, dtb_found
 #endif
 	li		t1, -2
-	beq		a0, t1, dtb_found
 	move		t2, a1
+	beq		a0, t1, dtb_found
 
 	li		t2, 0
 dtb_found:

Patches currently in stable-queue which might be from [email protected] are

queue-4.9/mips-head-reorder-instructions-missing-a-delay-slot.patch