]> git.karo-electronics.de Git - linux-beck.git/commitdiff
powerpc/8xx: Optimize verification in FixupDAR
authorLEROY Christophe <christophe.leroy@c-s.fr>
Fri, 29 Aug 2014 09:14:38 +0000 (11:14 +0200)
committerScott Wood <scottwood@freescale.com>
Fri, 5 Sep 2014 00:26:54 +0000 (19:26 -0500)
By XORing the upper part of the instruction code, we get a value that can
directly be verified with the second test and we can remove the first test.

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Scott Wood <scottwood@freescale.com>
arch/powerpc/kernel/head_8xx.S

index 6f544eab983eebd5f41d65c83bca2f6e9bc58e5b..1bdd7c13ddc17c9e028edef6e6b5a1f7384756b8 100644 (file)
@@ -548,10 +548,8 @@ FixupDAR:/* Entry point for dcbx workaround. */
 /* Check if it really is a dcbx instruction. */
 /* dcbt and dcbtst does not generate DTLB Misses/Errors,
  * no need to include them here */
-       srwi    r10, r11, 26    /* check if major OP code is 31 */
-       cmpwi   cr0, r10, 31
-       bne-    141f
-       rlwinm  r10, r11, 0, 21, 30
+       xoris   r10, r11, 0x7c00        /* check if major OP code is 31 */
+       rlwinm  r10, r10, 0, 21, 5
        cmpwi   cr0, r10, 2028  /* Is dcbz? */
        beq+    142f
        cmpwi   cr0, r10, 940   /* Is dcbi? */