Subject: [PATCH 4/9] powerpc/64s: dt_cpu_ftrs fix POWER9 DD2.2 and above

From: Nicholas Piggin <[email-masked]>
Date: Wed, 21 Feb 2018 05:08:27 +1000

The CPU_FTR_POWER9_DD2_1 flag is intended to be set for DD2.1 and
above (which is what the cputable setup does). Fix dt_cpu_ftrs setup
to match.

Signed-off-by: Nicholas Piggin <[email-masked]>
---
 arch/powerpc/kernel/dt_cpu_ftrs.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/kernel/dt_cpu_ftrs.c b/arch/powerpc/kernel/dt_cpu_ftrs.c
index 945e2c29ad2d..cb6ae7b3cdd6 100644
--- a/arch/powerpc/kernel/dt_cpu_ftrs.c
+++ b/arch/powerpc/kernel/dt_cpu_ftrs.c
@@ -707,7 +707,9 @@ static __init void cpufeatures_cpu_quirks(void)
 	 */
 	if ((version & 0xffffff00) == 0x004e0100)
 		cur_cpu_spec->cpu_features |= CPU_FTR_POWER9_DD1;
-	else if ((version & 0xffffefff) == 0x004e0201)
+	else if ((version & 0xffffefff) == 0x004e0200)
+		; /* DD2.0 has no feature flag */
+	else /* DD2.1 and up have DD2_1 */
 		cur_cpu_spec->cpu_features |= CPU_FTR_POWER9_DD2_1;
 }
 
-- 
2.16.1