diff mbox series

powerpc/64s: Fix Power9 DD2.1 logic in DT CPU features

Message ID 20171122122852.20078-1-mpe@ellerman.id.au (mailing list archive)
State Accepted
Commit 4d6c51b107cc73b15a377224549aa5593f90df89
Headers show
Series powerpc/64s: Fix Power9 DD2.1 logic in DT CPU features | expand

Commit Message

Michael Ellerman Nov. 22, 2017, 12:28 p.m. UTC
I got the logic wrong in the DT CPU features code when I added the
Power9 DD2.1 feature. We should be setting the bit if we detect a
DD2.1, not clearing it if we detect a DD2.0.

This code isn't actually exercised at the moment so nothing is
actually broken.

Fixes: 3ffa9d9e2a7c ("powerpc/64s: Fix Power9 DD2.0 workarounds by adding DD2.1 feature")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/kernel/dt_cpu_ftrs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Michael Ellerman Nov. 24, 2017, 9:46 a.m. UTC | #1
On Wed, 2017-11-22 at 12:28:52 UTC, Michael Ellerman wrote:
> I got the logic wrong in the DT CPU features code when I added the
> Power9 DD2.1 feature. We should be setting the bit if we detect a
> DD2.1, not clearing it if we detect a DD2.0.
> 
> This code isn't actually exercised at the moment so nothing is
> actually broken.
> 
> Fixes: 3ffa9d9e2a7c ("powerpc/64s: Fix Power9 DD2.0 workarounds by adding DD2.1 feature")
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

Applied to powerpc fixes.

https://git.kernel.org/powerpc/c/4d6c51b107cc73b15a377224549aa5

cheers
diff mbox series

Patch

diff --git a/arch/powerpc/kernel/dt_cpu_ftrs.c b/arch/powerpc/kernel/dt_cpu_ftrs.c
index 602e0fde19b4..8bdc2f96c5d6 100644
--- a/arch/powerpc/kernel/dt_cpu_ftrs.c
+++ b/arch/powerpc/kernel/dt_cpu_ftrs.c
@@ -735,8 +735,8 @@  static __init void cpufeatures_cpu_quirks(void)
 	 */
 	if ((version & 0xffffff00) == 0x004e0100)
 		cur_cpu_spec->cpu_features |= CPU_FTR_POWER9_DD1;
-	else if ((version & 0xffffefff) == 0x004e0200)
-		cur_cpu_spec->cpu_features &= ~CPU_FTR_POWER9_DD2_1;
+	else if ((version & 0xffffefff) == 0x004e0201)
+		cur_cpu_spec->cpu_features |= CPU_FTR_POWER9_DD2_1;
 }
 
 static void __init cpufeatures_setup_finished(void)