Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3015597imm; Sun, 1 Jul 2018 10:20:37 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI1PdJcQXZPkiGBtPg4jqTYaqTyGDjDx1P501w6CQPZ4S4IBhJgzH7rXvcYnOzGjjy5Gyj9 X-Received: by 2002:a17:902:822:: with SMTP id 31-v6mr22539033plk.172.1530465637847; Sun, 01 Jul 2018 10:20:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530465637; cv=none; d=google.com; s=arc-20160816; b=0HySh91W2f/kN5xCcpBfpP36jdohe8ghydmGcaqzAJtRxWn6uNJiOFYzLachU3SJd/ TjjDUyUlKmBWcAV9IxCCYfBfXlSzXt8+vf0sNT636zVTFcCI/gCxNG246s88NSF83Xmw 0/grRC9t7U8quBWgY6kl76MgvVtjkFgcvn3Wrx4xCbvmded4dajfZGbfPCyTHA+N8HCE LDfD7BZMwU9BLRQgKNZE2F66R5VHkLa/Mb4kvf+515qK8CMXvL9o0hS/5i9L3w7RKrM/ 3QHdacGaM7F/JqSchxJNPWTfhIHtW87hKwabaaDHL3pIiTWGn/AFT3nLHhPb4CzDwnRh HB1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=iZJHZI+gRy2cCExyB+FBf3fso7rgrlHvIKQCGCDYkIw=; b=g0buMIy5E8wEDNcTOA9QK+Y2zfFmvMqBGfh4/2wbgESz6ODcJDRg7hjA1Sbu+YuG82 uS8lFoBlbxgJ+pVJGKIFwAeFl7Olmjd9qxxd5Itx1Tj90zeCMzOxXsa5dvBDkvhStfCH PX0odjeduZ4H8N4e9pVQxuM7e8KYYOg8APHSc1aA7mesP+OzbMtoOgaggai5sAMNZ/7m el29mVTM8TQTtifu93o4fPIwNSg2wOoGeF7pKqD7J7DexFjnw3rmzXhW76AejcHkXr1B GKMyGCZi9w3/xOimEywJ7nHOQ+3spFT1A0Z1i0Z62Qqp/kZLKuSH5O25M22i3XrXkxIM 0TAw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x1-v6si12663147pga.205.2018.07.01.10.20.23; Sun, 01 Jul 2018 10:20:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030392AbeGARSJ (ORCPT + 99 others); Sun, 1 Jul 2018 13:18:09 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:36862 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031375AbeGAQjM (ORCPT ); Sun, 1 Jul 2018 12:39:12 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 626F2A73; Sun, 1 Jul 2018 16:39:11 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Paul Mackerras , Michael Ellerman , Nicholas Piggin Subject: [PATCH 4.17 058/220] powerpc/64s: Fix DT CPU features Power9 DD2.1 logic Date: Sun, 1 Jul 2018 18:21:22 +0200 Message-Id: <20180701160910.776342717@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180701160908.272447118@linuxfoundation.org> References: <20180701160908.272447118@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.17-stable review patch. If anyone has any objections, please let me know. ------------------ From: Michael Ellerman commit 749a0278c2177b2d16da5d8b135ba7f940bb4199 upstream. In the device tree CPU features quirk code we want to set CPU_FTR_POWER9_DD2_1 on all Power9s that aren't DD2.0 or earlier. But we got the logic wrong and instead set it on all CPUs that aren't Power9 DD2.0 or earlier, ie. including Power8. Fix it by making sure we're on a Power9. This isn't a bug in practice because the only code that checks the feature is Power9 only to begin with. But we'll backport it anyway to avoid confusion. Fixes: 9e9626ed3a4a ("powerpc/64s: Fix POWER9 DD2.2 and above in DT CPU features") Cc: stable@vger.kernel.org # v4.17+ Reported-by: Paul Mackerras Signed-off-by: Michael Ellerman Acked-by: Nicholas Piggin Signed-off-by: Michael Ellerman Signed-off-by: Greg Kroah-Hartman --- arch/powerpc/kernel/dt_cpu_ftrs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/arch/powerpc/kernel/dt_cpu_ftrs.c +++ b/arch/powerpc/kernel/dt_cpu_ftrs.c @@ -711,7 +711,8 @@ static __init void cpufeatures_cpu_quirk cur_cpu_spec->cpu_features |= CPU_FTR_P9_TM_HV_ASSIST; cur_cpu_spec->cpu_features |= CPU_FTR_P9_TM_XER_SO_BUG; cur_cpu_spec->cpu_features |= CPU_FTR_POWER9_DD2_1; - } else /* DD2.1 and up have DD2_1 */ + } else if ((version & 0xffff0000) == 0x004e0000) + /* DD2.1 and up have DD2_1 */ cur_cpu_spec->cpu_features |= CPU_FTR_POWER9_DD2_1; if ((version & 0xffff0000) == 0x004e0000) {