Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp359649imw; Tue, 12 Jul 2022 22:30:42 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t7UUKN+dJhS2UECH/PDw0NwQ9mbwPVJK1PC2LUvZpDyD7YuO35auGoMqbZVhYd1OfB+ETB X-Received: by 2002:a17:907:2848:b0:72b:5ba5:1db5 with SMTP id el8-20020a170907284800b0072b5ba51db5mr1726288ejc.703.1657690242795; Tue, 12 Jul 2022 22:30:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657690242; cv=none; d=google.com; s=arc-20160816; b=mPRihib6lzLfIfEGa4Xa+d9IDEZrcU0VqJPYV8vjtUatPrUBdmBpclaUkMsn5USkhR YAEq8DW5mgcjfKO5rqtSQcyK4Ny+9IEEpGVjD6EO+UKSn+6jFKBnb4H82kW7AmHFC0yc vqQgrK7UiRw5GIshr3oRnXBvwh0eqk0rhXFfulkXMuR17X6synXQUU8/AMNd59W9QWV4 RjM4QVieKijnDz1+l2ifXMKgVMnA0eXUdIZuNVPliTdxZXb0QvTdrrv2YJ2Ss0Nae68Q 6qICoEVGNMYD21RK4KD6nYmMvEISvbmLylAqHHOg7IAbIEqrOYx2uyBTEqRkUvBJ5Tha YVCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=jsIU21GxY0jw7A6ZuL2G44lOx42iYhHsc9FwP7Pd2+E=; b=AJMMtyG2y2WlGjo+l8VS3YMJTGjf5C8tp/egDWJcCBhifeoZ+GH8hiL0qxTzG4bMpz SzxW0zWb4+CRT8RWcJzW6TzOsxeY144/3MjfEX/P2jIRq+5VP4+HYeNLZ9uuI7HhMEAj T0D5fPNJw/+pFXaHWGlqhE1J3hcq+OwI0YMZtDby+P20DxZ6JkevM/6yPn4VYr3/rLXm hKPlwoB+sQTFJIziwHJU1sUp3Xuqq/bPONyyoOEI0TWZFvij3smKISYLwzrpavuSW5rp LjQOL43sCAnfMk5hiaw96cugChoBvOq+Nu4J21V7UHSMN+w5UVz0ef448In477ipgb8e BZNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BdmCytb6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p3-20020a50cd83000000b00437dce124fesi3477090edi.519.2022.07.12.22.30.17; Tue, 12 Jul 2022 22:30:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BdmCytb6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233927AbiGMF2Z (ORCPT + 99 others); Wed, 13 Jul 2022 01:28:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232641AbiGMF2C (ORCPT ); Wed, 13 Jul 2022 01:28:02 -0400 Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2AAF6DC887 for ; Tue, 12 Jul 2022 22:27:59 -0700 (PDT) Received: by mail-pg1-x535.google.com with SMTP id s206so9501301pgs.3 for ; Tue, 12 Jul 2022 22:27:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=jsIU21GxY0jw7A6ZuL2G44lOx42iYhHsc9FwP7Pd2+E=; b=BdmCytb6jqaYcl+01RLbP3+SQ2r+Tm1g5/hhbXs1xwXGdQmAG9BgbrFcBzX2Jpdf+r TALseKQqYevr3OWcUKDwUtngPrNC3bqioFe9KG8tMrYGOxNM+EfKq3q0UjmRsoHI8gVr aFIPyQx0abU6MLdDR9ed3FgbshXI9zGOKhBDBg+ZtH5UTTesu/PvZmmBYMcE8NtJFfBq 3BzH4tROg82AIn5ctWwAVIoFft5TfhibpqJINWeHLMj7gJY2C3BTOIxGZmwGyfM2lw/w BqmRMAWAS9K9VHzO51LyzLNVwP10PGmawwBhlju4mJqOu2mnd4YI2KiV1nwhOuwmewo3 5+VA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=jsIU21GxY0jw7A6ZuL2G44lOx42iYhHsc9FwP7Pd2+E=; b=YolAStEB7+8EH8nTJbgx1oIYEtmYNUIbPuw+ThSX1jOCpYidr8s9xWvZufeOpbZTNY Y/IJJ8rJBTbGsiAXk+/nCYbpnRbKpGe04S8xQEEILZUfBYvX7kC5TlydnnlDdC7EvH4Q okKQ2uqtOtUJIyjGwBWKwtFNuLt/7D5TwfArYRynFFv1xR/6euRfGtO39zeYn5cpwN/3 auTd9OHUxqC5d6cBvQAY5bHZFNCC2UwUIPgIIV6TtACWIyurCvGEIifOUpZr7kcBHjAs Gr2jkayHChERQM7RN9INrI3M1STAXMxeSNPfiZPBGjo8HhHK81yYXXyjt0IEN0vd+7h7 9pUA== X-Gm-Message-State: AJIora+591dNmbu4jsH1Ga7G0J96YLqs52O0kPDjP4/CQUIW7HXfo9F5 F5h3TRY1AeljRVcxcJz18uuSOA== X-Received: by 2002:a63:8441:0:b0:415:d595:a7d6 with SMTP id k62-20020a638441000000b00415d595a7d6mr1498052pgd.441.1657690078628; Tue, 12 Jul 2022 22:27:58 -0700 (PDT) Received: from localhost ([122.171.18.80]) by smtp.gmail.com with ESMTPSA id 31-20020a63165f000000b00416073ced8csm4430560pgw.73.2022.07.12.22.27.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jul 2022 22:27:58 -0700 (PDT) Date: Wed, 13 Jul 2022 10:57:54 +0530 From: Viresh Kumar To: Perry Yuan Cc: rafael.j.wysocki@intel.com, Ray.Huang@amd.com, Deepak.Sharma@amd.com, Mario.Limonciello@amd.com, Nathan.Fontenot@amd.com, Alexander.Deucher@amd.com, Jinzhou.Su@amd.com, Xinmei.Huang@amd.com, Xiaojian.Du@amd.com, Li.Meng@amd.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, "Rafael J. Wysocki" Subject: Re: [PATCH v3 06/13] cpufreq: amd_pstate: fix wrong lowest perf fetch Message-ID: <20220713052754.25grlxfrc5bow67p@vireshk-i7> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12-07-22, 11:41, Perry Yuan wrote: > Fix the wrong lowest perf value reading which is used for new > des_perf calculation by governor requested, the incorrect min_perf will > get incorrect des_perf to be set , that will cause the system frequency > changing unexpectedly. > > Signed-off-by: Perry Yuan > Signed-off-by: Su Jinzhou > --- > drivers/cpufreq/amd-pstate.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c > index fc0de9fd643b..7c51f4125263 100644 > --- a/drivers/cpufreq/amd-pstate.c > +++ b/drivers/cpufreq/amd-pstate.c > @@ -308,7 +308,7 @@ static int amd_pstate_target(struct cpufreq_policy *policy, > return -ENODEV; > > cap_perf = READ_ONCE(cpudata->highest_perf); > - min_perf = READ_ONCE(cpudata->lowest_nonlinear_perf); > + min_perf = READ_ONCE(cpudata->lowest_perf); > max_perf = cap_perf; > > freqs.old = policy->cur; Acked-by: Viresh Kumar -- viresh