[PATCH] powerpc/40x: Clear MSR_DR in one insn instead of two

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE3349d

2 messages, 2 authors, 2017-06-05 · open the first message on its own page

[PATCH] powerpc/40x: Clear MSR_DR in one insn instead of two

From: Christophe Leroy <hidden>
Date: 2016-08-05 11:50:46

Signed-off-by: Christophe Leroy <redacted>
---
 arch/powerpc/kernel/misc_32.S | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S
index d9c912b..e025230 100644
--- a/arch/powerpc/kernel/misc_32.S
+++ b/arch/powerpc/kernel/misc_32.S
@@ -243,8 +243,7 @@ _GLOBAL(_nmask_and_or_msr)
  */
 _GLOBAL(real_readb)
 	mfmsr	r7
-	ori	r0,r7,MSR_DR
-	xori	r0,r0,MSR_DR
+	rlwinm	r0,r7,0,~MSR_DR
 	sync
 	mtmsr	r0
 	sync
@@ -261,8 +260,7 @@ _GLOBAL(real_readb)
  */
 _GLOBAL(real_writeb)
 	mfmsr	r7
-	ori	r0,r7,MSR_DR
-	xori	r0,r0,MSR_DR
+	rlwinm	r0,r7,0,~MSR_DR
 	sync
 	mtmsr	r0
 	sync
-- 
2.1.0

Re: powerpc/40x: Clear MSR_DR in one insn instead of two

From: Michael Ellerman <hidden>
Date: 2017-06-05 10:21:49

On Fri, 2016-08-05 at 11:28:05 UTC, Christophe Leroy wrote:
Signed-off-by: Christophe Leroy <redacted>
Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/362957c27ed0d9ff485d3266ed22d9

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help