[PATCH] powerpc: fix emulate_step std test

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

STALE2365d LANDED

Landed in mainline as 59ed2adf3931 on 2020-03-17.

3 messages, 3 authors, 2020-03-17 · open the first message on its own page

[PATCH] powerpc: fix emulate_step std test

From: Nicholas Piggin <npiggin@gmail.com>
Date: 2020-02-26 06:00:07

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 arch/powerpc/lib/test_emulate_step.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/lib/test_emulate_step.c b/arch/powerpc/lib/test_emulate_step.c
index 42347067739c..00d70253cb5b 100644
--- a/arch/powerpc/lib/test_emulate_step.c
+++ b/arch/powerpc/lib/test_emulate_step.c
@@ -160,7 +160,7 @@ static void __init test_std(void)
 
 	/* std r5, 0(r3) */
 	stepped = emulate_step(&regs, TEST_STD(5, 3, 0));
-	if (stepped == 1 || regs.gpr[5] == a)
+	if (stepped == 1 && regs.gpr[5] == a)
 		show_result("std", "PASS");
 	else
 		show_result("std", "FAIL");
-- 
2.23.0

Re: [PATCH] powerpc: fix emulate_step std test

From: Ravi Bangoria <hidden>
Date: 2020-02-27 07:40:53


On 2/26/20 11:23 AM, Nicholas Piggin wrote:
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Ravi Bangoria <redacted>
quoted hunk
---
  arch/powerpc/lib/test_emulate_step.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/lib/test_emulate_step.c b/arch/powerpc/lib/test_emulate_step.c
index 42347067739c..00d70253cb5b 100644
--- a/arch/powerpc/lib/test_emulate_step.c
+++ b/arch/powerpc/lib/test_emulate_step.c
@@ -160,7 +160,7 @@ static void __init test_std(void)
  
  	/* std r5, 0(r3) */
  	stepped = emulate_step(&regs, TEST_STD(5, 3, 0));
-	if (stepped == 1 || regs.gpr[5] == a)
+	if (stepped == 1 && regs.gpr[5] == a)
  		show_result("std", "PASS");
  	else
  		show_result("std", "FAIL");

Re: [PATCH] powerpc: fix emulate_step std test

From: Michael Ellerman <hidden>
Date: 2020-03-17 13:41:26

On Wed, 2020-02-26 at 05:53:02 UTC, Nicholas Piggin wrote:
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/59ed2adf393109c56d383e568f2e57bb5ad6d901

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