]> Git Repo - J-linux.git/commitdiff
powerpc/ppc-opcode: Fix PPC_RAW_TW()
authorChristophe Leroy <[email protected]>
Wed, 3 Aug 2022 11:47:33 +0000 (13:47 +0200)
committerMichael Ellerman <[email protected]>
Wed, 10 Aug 2022 05:39:37 +0000 (15:39 +1000)
PPC_RAW_TW() is erroneously defined with base code 0x7f000008
instead of 0x7c000008.

That's invisible because its only user is PPC_RAW_TRAP() which is
0x7fe00008, but fix it anyway to avoid any risk of future bug.

Fixes: d00d762daf12 ("powerpc/ppc-opcode: Define and use PPC_RAW_TRAP() and PPC_RAW_TW()")
Reported-by: Naveen N. Rao <[email protected]>
Signed-off-by: Christophe Leroy <[email protected]>
Reviewed-by: Naveen N. Rao <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: https://lore.kernel.org/r/eca9251f1e1f82c4c46ec6380ddb28356ab3fdfe.1659527244.git.christophe.leroy@csgroup.eu
arch/powerpc/include/asm/ppc-opcode.h

index d9703c5fd71347471a0982aae81a63961848405d..c6d724104ed1a08b24b0fa60a48305329afd5deb 100644 (file)
 
 #define PPC_RAW_BRANCH(offset)         (0x48000000 | PPC_LI(offset))
 #define PPC_RAW_BL(offset)             (0x48000001 | PPC_LI(offset))
-#define PPC_RAW_TW(t0, a, b)           (0x7f000008 | ___PPC_RS(t0) | ___PPC_RA(a) | ___PPC_RB(b))
+#define PPC_RAW_TW(t0, a, b)           (0x7c000008 | ___PPC_RS(t0) | ___PPC_RA(a) | ___PPC_RB(b))
 #define PPC_RAW_TRAP()                 PPC_RAW_TW(31, 0, 0)
 #define PPC_RAW_SETB(t, bfa)           (0x7c000100 | ___PPC_RT(t) | ___PPC_RA((bfa) << 2))
 
This page took 0.050973 seconds and 4 git commands to generate.