Received: by 2002:a05:7412:2a8a:b0:fc:a2b0:25d7 with SMTP id u10csp328463rdh; Wed, 7 Feb 2024 06:08:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IHimPUIU/tKUtG1QFINJuemx+pi5wy4e6dn/oqNh6KqLOC7BUAhbGTo94n6knZFM4dyChCA X-Received: by 2002:a17:902:c403:b0:1d9:c876:b825 with SMTP id k3-20020a170902c40300b001d9c876b825mr6584568plk.56.1707314900418; Wed, 07 Feb 2024 06:08:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707314900; cv=pass; d=google.com; s=arc-20160816; b=puln0SZDYGSLR41FJAEt2YLk6++C4nvJrR2oFN79aBD+5D50zUhVOM1ice9zSa8NYl Nabck6IsqhH8aGKUoWS5O9sgSZNTmFZqyWipmqJbh1q+zEqpH20kb9B2z/y0htiHyH2c 1ATfHPKAGvbZE6YKlg6/ZK3k0G+773FQap5LZKBBcOx27PqP359+bHIKVMBLK8pQfX0n 0QxYXLBJGIhxXzvB9jjdaGtsyindYlvsPYF8LRe2eFWBA6Ze7+58PnzTv/CPwttu6Vnd /41Rgys1KT2OjRvSMn89SsxzTs+oHQzI9nmcBIkLzaGoFr3KmwJTieAMFrxtrof/Jeyg BftA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=mygFW8DQNLN8N1VOj6Z0gWqKQwdsT62VxC3nQxPrsFI=; fh=PI9oyGvDJgTdy8gtiLo1PNhKuLeFLsrxF46hWsdgJyM=; b=ZM33rSX+QJxedoRPcB3UcRZqk9J+QtaHh+ZLFo3Fd3IfO50Jf1uEHSvpg9YvFWhA2+ BpR2W3noDUfs7k3J4gPj6dIeWCrXO78HiFxYq56WM0mP2nDqqxDgNdQXRCCNqRXediEO evX9s7dmvXHHVg6SgFD2SIxfEmy2xPBlaVvZOIoZ3gsRImuORlUZL+QG0Tban6h06zXV ARdltH7ncce1IMhqk9CCaDbSPuEL7ZPp7klDC0eQp5t+/chWqwz7sFnyqslTL+r9CISd tzOx14rrhFJJ/ITvtu3g5EJjJAOtE4b80HXDIQVs0FiCZveikaymYVzP4kbyPGBjI8mN T0lQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@mailbox.org header.s=mail20150812 header.b=GsYPl0XL; arc=pass (i=1 spf=pass spfdomain=mailbox.org dkim=pass dkdomain=mailbox.org dmarc=pass fromdomain=mailbox.org); spf=pass (google.com: domain of linux-kernel+bounces-56597-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56597-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=mailbox.org X-Forwarded-Encrypted: i=2; AJvYcCXTyzikxc0+EkQB9MqZROEwCxOFE2PjVedNDuB+FgHrvp5MpIH2Jqfe61jy3jIMGImukNQPELAGPBSabFiYdkMWn8W9n0rDEwNjBASD5w== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id y14-20020a17090322ce00b001d94e3bdb0esi1815122plg.278.2024.02.07.06.08.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Feb 2024 06:08:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-56597-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@mailbox.org header.s=mail20150812 header.b=GsYPl0XL; arc=pass (i=1 spf=pass spfdomain=mailbox.org dkim=pass dkdomain=mailbox.org dmarc=pass fromdomain=mailbox.org); spf=pass (google.com: domain of linux-kernel+bounces-56597-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-56597-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=mailbox.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 9E1032869AF for ; Wed, 7 Feb 2024 14:08:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 733C97C08C; Wed, 7 Feb 2024 14:08:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="GsYPl0XL" Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org [80.241.56.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DAC8E77645; Wed, 7 Feb 2024 14:07:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.241.56.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707314880; cv=none; b=UyaBIuDeDH2GLh62rWbaMT6IzGiwjGebLmLqD7lnqamhfj8RFiAYAPZ6qbW0lT7tT/mK6b4nPYQQ5QUb249onKxZgtawuM58VdWmPOW0XjP2r2LVtOdaLLoRruaxMc6gfN6Z7GkoQQ0AB9MOitskduxkrX4eY58BLOtWN/nw0CY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707314880; c=relaxed/simple; bh=+p+eU04ku7I4pP82TK3gqGixe/qQLG+9fDNRE7WoiOA=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=XxIB0spKhnMOOltWlcMdHX6oLPFy1E12BczHeO5PXO3uhg4mKt7lpAEBoFkKhb7wDXhWQ5rPrltsCHtnyYENEk1njOMsmGaYIaeztRXyGBXk4Q9x5wjmyB4Qnq9jiQQQlTezQ1pGkT9IfOwKIGbRViF6t0IHYjCxWTCg5GufppI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mailbox.org; spf=pass smtp.mailfrom=mailbox.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b=GsYPl0XL; arc=none smtp.client-ip=80.241.56.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=mailbox.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=mailbox.org Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4TVMQL60wxz9sQ8; Wed, 7 Feb 2024 15:07:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1707314875; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mygFW8DQNLN8N1VOj6Z0gWqKQwdsT62VxC3nQxPrsFI=; b=GsYPl0XL+YrzBNZz/J2WxYh0ac5D7QtikEIGxSjr8KUcf3kYg6hGFlfu1F+Zo67Yz1Zozx yPQFuP+1Zatd23HPH2jSOYcYHpn32QjxnoypHZyUJRZUgNY0TSoDW3voUceGb6qZo/hWqe BAJLdULxXAJT5o1NpPUyFik0fGlg5Q+xiCjJBHU7KRdfnJkywE8uNbXg0JgYDWRTFbmCnc /KEuptF2Y7knP3GG8yf6E56+23QLKtqnQBJ+/ElLiwLtYXzh7WFPC+CkGgTrVKwFrmwetB ymy7G5oWSnTeMenpC8emM02DRrlwxQa+YAL5w/59pxgCrvzb21qOoYzit+R82Q== Message-ID: Date: Wed, 7 Feb 2024 15:07:47 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH][next] cpufreq: amd-pstate: Fix min_perf assignment in amd_pstate_adjust_perf() To: "Yuan, Perry" , "Huang, Ray" , "rafael@kernel.org" , "Limonciello, Mario" , "Shenoy, Gautham Ranjal" Cc: Linux Kernel Mailing List , "linux-pm@vger.kernel.org" , Oleksandr Natalenko References: <41f82085-8ea9-4ffa-a93a-8e39ce0f4c27@mailbox.org> Content-Language: en-US From: Tor Vic In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-MBO-RS-ID: d90a85803f43d76dbcf X-MBO-RS-META: fw9gmeojrw86kzuuzgzgqezcu4xjg95o On 2/7/24 14:54, Yuan, Perry wrote: > [AMD Official Use Only - General] > > Hi Tor, > >> -----Original Message----- >> From: Tor Vic >> Sent: Wednesday, February 7, 2024 9:09 PM >> To: Huang, Ray ; Yuan, Perry >> ; rafael@kernel.org >> Cc: Linux Kernel Mailing List ; linux- >> pm@vger.kernel.org; Oleksandr Natalenko >> Subject: [PATCH][next] cpufreq: amd-pstate: Fix min_perf assignment in >> amd_pstate_adjust_perf() >> >> In the function amd_pstate_adjust_perf(), the 'min_perf' variable is set to >> 'highest_perf' instead of 'lowest_perf'. >> >> Fixes: 1d215f0319c2 ("cpufreq: amd-pstate: Add fast switch function for AMD >> P-State") >> Reported-by: Oleksandr Natalenko >> Signed-off-by: Tor Vic >> --- >> IIRC, this was first reported by Oleksandr, hence the 'Reported-by' tag. >> --- >> 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 08e112444c27..aa5e57e27d2b 100644 >> --- a/drivers/cpufreq/amd-pstate.c >> +++ b/drivers/cpufreq/amd-pstate.c >> @@ -577,7 +577,7 @@ static void amd_pstate_adjust_perf(unsigned int cpu, >> if (target_perf < capacity) >> des_perf = DIV_ROUND_UP(cap_perf * target_perf, >> capacity); >> >> - min_perf = READ_ONCE(cpudata->highest_perf); >> + min_perf = READ_ONCE(cpudata->lowest_perf); >> if (_min_perf < capacity) >> min_perf = DIV_ROUND_UP(cap_perf * _min_perf, capacity); >> >> -- >> 2.43.0 > > Thanks for the fix! I think this is actually for stable and mainline too, not only for -next. Should I resend with 'Cc: stable' tag and your Reviewed-by? > > Reviewed-by: Perry Yuan