]> git.baikalelectronics.ru Git - kernel.git/commitdiff
powerpc/inst: Remove PPC_INST_BRANCH
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Mon, 9 May 2022 05:36:20 +0000 (07:36 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 22 May 2022 05:58:27 +0000 (15:58 +1000)
Convert last users of PPC_INST_BRANCH to PPC_RAW_BRANCH()

And remove PPC_INST_BRANCH.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/fa8807108a2ef2287a2c9651d6e1ff7c051923d9.1652074503.git.christophe.leroy@csgroup.eu
arch/powerpc/include/asm/ppc-opcode.h
arch/powerpc/lib/feature-fixups.c

index de6534d561f7e51e2ab6c53226178ad0c7b2a8ae..87e42289573a5ad5ee84a1dd951b21cac64ca9b4 100644 (file)
 #define PPC_INST_ADDIS                 0x3c000000
 #define PPC_INST_ADD                   0x7c000214
 #define PPC_INST_DIVD                  0x7c0003d2
-#define PPC_INST_BRANCH                        0x48000000
 #define PPC_INST_BL                    0x48000001
 #define PPC_INST_BRANCH_COND           0x40800000
 
 #define PPC_RAW_MTSPR(spr, d)          (0x7c0003a6 | ___PPC_RS(d) | __PPC_SPR(spr))
 #define PPC_RAW_EIEIO()                        (0x7c0006ac)
 
-#define PPC_RAW_BRANCH(addr)           (PPC_INST_BRANCH | ((addr) & 0x03fffffc))
+#define PPC_RAW_BRANCH(offset)         (0x48000000 | PPC_LI(offset))
 #define PPC_RAW_BL(offset)             (0x48000001 | PPC_LI(offset))
 
 /* Deal with instructions that older assemblers aren't aware of */
index 343a78826035e8cb9f530725ded9f85496e6a2ba..993d3f31832af676303ace05ff3443e4cbe930f6 100644 (file)
@@ -451,7 +451,7 @@ static int __do_rfi_flush_fixups(void *data)
 
        if (types & L1D_FLUSH_FALLBACK)
                /* b .+16 to fallback flush */
-               instrs[0] = PPC_INST_BRANCH | 16;
+               instrs[0] = PPC_RAW_BRANCH(16);
 
        i = 0;
        if (types & L1D_FLUSH_ORI) {