Message ID | 8eefeeb7-f8e8-49f4-b83c-e67a9e728f41@mailbox.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-57814-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp61747dyd; Thu, 8 Feb 2024 02:06:48 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXicK1s6v7giuVL37g6ivDITTaAVMKfPZX+GQwhlthOn4GQIAE+0yL6PxcZBdFS4XaLwTv69Y4lbP6+SWBLlBEQc1dT/A== X-Google-Smtp-Source: AGHT+IFXRIxyXxwkntgadmxhk1CId/uqLlygIpm9joWleG5mEMhDYBuiKZefY2H1MbXgO2fQPNgx X-Received: by 2002:a25:8212:0:b0:dc6:d574:9371 with SMTP id q18-20020a258212000000b00dc6d5749371mr6457951ybk.47.1707386808090; Thu, 08 Feb 2024 02:06:48 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707386808; cv=pass; d=google.com; s=arc-20160816; b=PnpUqnpQKDilRZN1M4EzuQ7ozw0RKGtneE0eVGMwD+lKmVzFXT1VnujSjRJMEpY2OG LWUTzsPhHRPZj5aODmG4TYXSCASthDNB7Sbjax+lClM/I581dDvbR/NbEMoV6HEGIO9z kzylUYI3Q3OTmNqJ/l9xODBQQvCyEeFl/rpSY1mbog2AN1xBVTERt/VAVc3tBfsuvlnO E9xk2b9nVOnY2guWVyIyMXKkziEBDlzmY7nicvnIkveJHlNZXOrvTSazUkobhDxcnTs7 wI2GzD++xno17CQUgbS3iHFmuV848XtQAH2mck71C+6TvRl5Pl+HkmjgpR11LLflyWIU LZ0w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:subject:from:cc:to:content-language :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :date:message-id:dkim-signature; bh=Barut0WbxR8ZK4VaiV9eTXhumtMeDqIqqbIXK0ewMac=; fh=ngbUHUz3Hgcl8uTB3ROgkl2Uyw+SUj3i9HEyKreDVtE=; b=tcFqmmjfWFIfUuZXa8Z7T/8LmLOYIkwX78GPpcaAlNFoqSv9SPtPVJ+/EOow/0E8HR kU4s4505GhYN5+R92YUsgftiodY48Ag21qUg+ciI2IGnmaRdZ9lS0he71kEfLFLJxvul ESEBsLSu1oXx3U1hzSe8X7KEHHpdKcXOSGumUJlhwf19dYY5TGPTeMIxVbM9Ch9idHnj gjGcF9X9KTTxzPfO4HVzVRiOmIX6imlg1C6I8ruVm7Rl3DnxjERqm8mpg6kYldoxy2Ae R0lSqZ1Am3nGS/aLq3aSEM2n/2Jv1cuaBnRc++BnKKMXfMIx5KSKRZfpU06rZy2daKJ2 IG7w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@mailbox.org header.s=mail20150812 header.b=fGePYv3t; 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-57814-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57814-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=mailbox.org X-Forwarded-Encrypted: i=2; AJvYcCX3P7WT2zRhYpFUM8hZVW2AuNpNoFHtMFToZJ2/CB1Mkig/CVWFansS9+gS5405EwxLIuK5KFmGUl2P0jqpx1NvvhUNdg== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id e14-20020ac85dce000000b0042bf2f699fasi3003994qtx.756.2024.02.08.02.06.47 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 02:06:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-57814-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@mailbox.org header.s=mail20150812 header.b=fGePYv3t; 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-57814-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-57814-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id DAD1C1C27E25 for <ouuuleilei@gmail.com>; Thu, 8 Feb 2024 10:06:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D2E676DD15; Thu, 8 Feb 2024 10:01:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="fGePYv3t" 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 EDEDC6A8BB; Thu, 8 Feb 2024 10:01:01 +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=1707386465; cv=none; b=uK5AQbxPuavSsD/OhNhpMjMoaddAIPCAgyg80bAqhguB81zVpXl+1SLKiKi1VjYAktHKYh3r6DxXTW5llgqcFCeOKjudKZ4EP8UcyL4aDBfEUfsR/Q3NizWAaWBjNWpaVAr06C2pD8kPkScsyrH9NKjEM91MK79aLvDp8ymkmtk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707386465; c=relaxed/simple; bh=QdAtsmJAqD21B3GWv8/xJXnL6FFTkI21JTQdzVgWRPA=; h=Message-ID:Date:MIME-Version:To:Cc:From:Subject:Content-Type; b=W7aSDGSkBYCAaYjzQ6igrTaGbkzaBUOTj09C9Z+8sk3ggj+zaJk1z2tsRJMF+M9OyTDO4KFH7fkOVMazkVA4WAmn6xzDWT1n2uq+daHba3RWgdHyUIakAQGbT8+Rb9/j0W8GIpHkH4PpHEhJkI33BQ2KUnotp3yLsudDmFKTiyQ= 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=fGePYv3t; 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 smtp1.mailbox.org (smtp1.mailbox.org [10.196.197.1]) (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 4TVstx73VXz9svQ; Thu, 8 Feb 2024 11:00:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1707386458; 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; bh=Barut0WbxR8ZK4VaiV9eTXhumtMeDqIqqbIXK0ewMac=; b=fGePYv3ttH/RDbDWXPu1vUWKmRBKZee+sonviJghwd/dIEfo1MRnefu3DlYcG5VpO7Mx6Q FUIE+Il+xQVUMGYNSpDRiwaJP+V15RcuUEFe6Bm06Qn9FHrBR1d90PNEcLIo0og/9AVWzt iSdVV3I7L2e6fTT2VUjfYZBQkfE6+yslsspmJUbHVoSbWWUhcdSKdJ2FXsL6/H0ijkqSXb gGii79eWD/rrj1LWGrIPXbT3PJBS3SHxVwjWoVUmTW9B2+uyr/9iMErMF40PdOX6DV8N2C TMP+ZY+54z4sU101e4JOV2fTcNPLhx1yAhIJFlDJCSbI5xPLHpSJcaWJmj67RQ== Message-ID: <8eefeeb7-f8e8-49f4-b83c-e67a9e728f41@mailbox.org> Date: Thu, 8 Feb 2024 11:00:50 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Language: en-US To: Perry Yuan <Perry.Yuan@amd.com>, Huang Rui <ray.huang@amd.com>, "Rafael J . Wysocki" <rafael.j.wysocki@intel.com>, Mario Limonciello <mario.limonciello@amd.com>, "Shenoy, Gautham Ranjal" <gautham.shenoy@amd.com> Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, "linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>, Oleksandr Natalenko <oleksandr@natalenko.name> From: Tor Vic <torvic9@mailbox.org> Subject: [PATCH v2] cpufreq: amd-pstate: Fix min_perf assignment in amd_pstate_adjust_perf() Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-MBO-RS-ID: e587f8e7f120ffd8bfa X-MBO-RS-META: nq6zerw71rdaaxdbo5g7f95humxm8hnk X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790324829601038092 X-GMAIL-MSGID: 1790324829601038092 |
Series |
[v2] cpufreq: amd-pstate: Fix min_perf assignment in amd_pstate_adjust_perf()
|
|
Commit Message
Tor Vic
Feb. 8, 2024, 10 a.m. UTC
In the function amd_pstate_adjust_perf(), the 'min_perf' variable is set to 'highest_perf' instead of 'lowest_perf'. Cc: stable@vger.kernel.org # 6.1+ Fixes: 1d215f0319c2 ("cpufreq: amd-pstate: Add fast switch function for AMD P-State") Reported-by: Oleksandr Natalenko <oleksandr@natalenko.name> Reviewed-by: Perry Yuan <Perry.Yuan@amd.com> Signed-off-by: Tor Vic <torvic9@mailbox.org> --- v1->v2: Add Perry's 'Reviewed-by' and 'Cc: stable' 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);