* [PATCH] powerpc/ppc-opcode: Fix PPC_RAW_TW()
@ 2022-08-03 11:47 ` Christophe Leroy
0 siblings, 0 replies; 5+ messages in thread
From: Christophe Leroy @ 2022-08-03 11:47 UTC (permalink / raw)
To: Michael Ellerman, Nicholas Piggin
Cc: Christophe Leroy, linux-kernel, linuxppc-dev, Naveen N . Rao
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.
Reported-by: Naveen N. Rao <naveen.n.rao@linux.ibm.com>
Fixes: d00d762daf12 ("powerpc/ppc-opcode: Define and use PPC_RAW_TRAP() and PPC_RAW_TW()")
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
arch/powerpc/include/asm/ppc-opcode.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/include/asm/ppc-opcode.h b/arch/powerpc/include/asm/ppc-opcode.h
index d9703c5fd713..c6d724104ed1 100644
--- a/arch/powerpc/include/asm/ppc-opcode.h
+++ b/arch/powerpc/include/asm/ppc-opcode.h
@@ -571,7 +571,7 @@
#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))
--
2.36.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] powerpc/ppc-opcode: Fix PPC_RAW_TW()
@ 2022-08-03 11:47 ` Christophe Leroy
0 siblings, 0 replies; 5+ messages in thread
From: Christophe Leroy @ 2022-08-03 11:47 UTC (permalink / raw)
To: Michael Ellerman, Nicholas Piggin
Cc: Naveen N . Rao, linuxppc-dev, linux-kernel
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.
Reported-by: Naveen N. Rao <naveen.n.rao@linux.ibm.com>
Fixes: d00d762daf12 ("powerpc/ppc-opcode: Define and use PPC_RAW_TRAP() and PPC_RAW_TW()")
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
arch/powerpc/include/asm/ppc-opcode.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/include/asm/ppc-opcode.h b/arch/powerpc/include/asm/ppc-opcode.h
index d9703c5fd713..c6d724104ed1 100644
--- a/arch/powerpc/include/asm/ppc-opcode.h
+++ b/arch/powerpc/include/asm/ppc-opcode.h
@@ -571,7 +571,7 @@
#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))
--
2.36.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] powerpc/ppc-opcode: Fix PPC_RAW_TW()
2022-08-03 11:47 ` Christophe Leroy
@ 2022-08-03 15:45 ` Naveen N. Rao
-1 siblings, 0 replies; 5+ messages in thread
From: Naveen N. Rao @ 2022-08-03 15:45 UTC (permalink / raw)
To: Christophe Leroy, Michael Ellerman, Nicholas Piggin
Cc: linux-kernel, linuxppc-dev
Christophe Leroy wrote:
> 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.
>
> Reported-by: Naveen N. Rao <naveen.n.rao@linux.ibm.com>
> Fixes: d00d762daf12 ("powerpc/ppc-opcode: Define and use PPC_RAW_TRAP() and PPC_RAW_TW()")
> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
> ---
> arch/powerpc/include/asm/ppc-opcode.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks.
Reviewed-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
>
> diff --git a/arch/powerpc/include/asm/ppc-opcode.h b/arch/powerpc/include/asm/ppc-opcode.h
> index d9703c5fd713..c6d724104ed1 100644
> --- a/arch/powerpc/include/asm/ppc-opcode.h
> +++ b/arch/powerpc/include/asm/ppc-opcode.h
> @@ -571,7 +571,7 @@
>
> #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))
>
> --
> 2.36.1
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] powerpc/ppc-opcode: Fix PPC_RAW_TW()
@ 2022-08-03 15:45 ` Naveen N. Rao
0 siblings, 0 replies; 5+ messages in thread
From: Naveen N. Rao @ 2022-08-03 15:45 UTC (permalink / raw)
To: Christophe Leroy, Michael Ellerman, Nicholas Piggin
Cc: linuxppc-dev, linux-kernel
Christophe Leroy wrote:
> 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.
>
> Reported-by: Naveen N. Rao <naveen.n.rao@linux.ibm.com>
> Fixes: d00d762daf12 ("powerpc/ppc-opcode: Define and use PPC_RAW_TRAP() and PPC_RAW_TW()")
> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
> ---
> arch/powerpc/include/asm/ppc-opcode.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Thanks.
Reviewed-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
>
> diff --git a/arch/powerpc/include/asm/ppc-opcode.h b/arch/powerpc/include/asm/ppc-opcode.h
> index d9703c5fd713..c6d724104ed1 100644
> --- a/arch/powerpc/include/asm/ppc-opcode.h
> +++ b/arch/powerpc/include/asm/ppc-opcode.h
> @@ -571,7 +571,7 @@
>
> #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))
>
> --
> 2.36.1
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] powerpc/ppc-opcode: Fix PPC_RAW_TW()
2022-08-03 11:47 ` Christophe Leroy
(?)
(?)
@ 2022-08-13 22:38 ` Michael Ellerman
-1 siblings, 0 replies; 5+ messages in thread
From: Michael Ellerman @ 2022-08-13 22:38 UTC (permalink / raw)
To: Michael Ellerman, Christophe Leroy, Nicholas Piggin
Cc: Naveen N . Rao, linuxppc-dev, linux-kernel
On Wed, 3 Aug 2022 13:47:33 +0200, Christophe Leroy wrote:
> 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.
>
>
> [...]
Applied to powerpc/fixes.
[1/1] powerpc/ppc-opcode: Fix PPC_RAW_TW()
https://git.kernel.org/powerpc/c/59bab33a4f57f886c5f8a4d1f2bed728ec185d16
cheers
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-08-13 22:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-03 11:47 [PATCH] powerpc/ppc-opcode: Fix PPC_RAW_TW() Christophe Leroy
2022-08-03 11:47 ` Christophe Leroy
2022-08-03 15:45 ` Naveen N. Rao
2022-08-03 15:45 ` Naveen N. Rao
2022-08-13 22:38 ` Michael Ellerman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.