Received: by 10.223.185.116 with SMTP id b49csp973655wrg; Wed, 21 Feb 2018 09:55:53 -0800 (PST) X-Google-Smtp-Source: AH8x227gfu2nReNg4OEQbQHgKAFF1Rdb17PxIjK86YjuSjNnjyCMTiH5W/RHShSEvO1C35GM+4id X-Received: by 10.101.81.2 with SMTP id f2mr3316250pgq.361.1519235753110; Wed, 21 Feb 2018 09:55:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519235753; cv=none; d=google.com; s=arc-20160816; b=DwkDDWugm5eVETKYR+L9QEF1XQZujWvKinpM/Pw4DfPEKDpsMJc5rhzM6yfZqtEgq9 RtXiJT+lheL3m0j5b5M0HT2QA/jbDR4VLtybiEuUsXpCixJ83ysX/DUGHdeuRjINk2Tc e4ECoV5137b/UXyvxIWzmhfsN+w1ahMZeRoKufj7kc0NraIdcYMlrz0CZWW/lXXAAa35 c4cfvXfQOIp8EARaavOq6XSH9qaI3z2K2q164HCsLHI/QK8gy1cvRhYVulJtbQAqlHT9 YXMn6K5YY2m3lAb+/T1KKu7bWVxWn8B78Icj1jfw/FJYOfouVYwBrQVtLihTXNopKyES BSFw== 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=k8ESBR9WPVcqm8BbzUZUdzbqjNw5cK72eM9hEP2ZViI=; b=wONOZyDOqLR9R7FAgCDTK7JpsjFPHOxrrOdNeAKyye/vZe2Xsdq70SBz+EoojbVvaB V4RMPLrF8mOiZw3sS265u2cByyW1YHW+p/txyRTsXNpg9a2d55eXAckLYlFr+8u4SWtu ZHEv0s5yd4WXovrTE8iWQfZVTzVg/DZB6LPHoIdZqr+73bfvHEchROjhqA9x9nhWHZ8B yrJ6Hc6SSeT2wB0udL7un3KTJcvTlG6uT2zK5ug6LW1beubh0cwD9ShDaujmlaO1kGQ/ 2Iv9a/WdFOEKKYucsTEfNbGNMEz9IT5+/SZ7OBwEQ4WWOFvuO2e/1L+14Ujm9eVy9zab V/Dw== 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 64si941230pgi.67.2018.02.21.09.55.38; Wed, 21 Feb 2018 09:55:53 -0800 (PST) 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 S934862AbeBUM6M (ORCPT + 99 others); Wed, 21 Feb 2018 07:58:12 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:36028 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934849AbeBUM6I (ORCPT ); Wed, 21 Feb 2018 07:58:08 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 45652F32; Wed, 21 Feb 2018 12:58:07 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alvin Wang , Shilpasri G Bhat , Viresh Kumar , "Rafael J. Wysocki" Subject: [PATCH 4.14 014/167] cpufreq: powernv: Dont assume distinct pstate values for nominal and pmin Date: Wed, 21 Feb 2018 13:47:05 +0100 Message-Id: <20180221124525.390995429@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180221124524.639039577@linuxfoundation.org> References: <20180221124524.639039577@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.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Shilpasri G Bhat commit 3fa4680b860bf48b437d6a2c039789c4abe202ae upstream. Some OpenPOWER boxes can have same pstate values for nominal and pmin pstates. In these boxes the current code will not initialize 'powernv_pstate_info.min' variable and result in erroneous CPU frequency reporting. This patch fixes this problem. Fixes: 09ca4c9b5958 (cpufreq: powernv: Replacing pstate_id with frequency table index) Reported-by: Alvin Wang Signed-off-by: Shilpasri G Bhat Acked-by: Viresh Kumar Cc: 4.8+ # 4.8+ Signed-off-by: Rafael J. Wysocki Signed-off-by: Greg Kroah-Hartman --- drivers/cpufreq/powernv-cpufreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/cpufreq/powernv-cpufreq.c +++ b/drivers/cpufreq/powernv-cpufreq.c @@ -287,9 +287,9 @@ next: if (id == pstate_max) powernv_pstate_info.max = i; - else if (id == pstate_nominal) + if (id == pstate_nominal) powernv_pstate_info.nominal = i; - else if (id == pstate_min) + if (id == pstate_min) powernv_pstate_info.min = i; if (powernv_pstate_info.wof_enabled && id == pstate_turbo) {