Received: by 2002:ab2:4b90:0:b0:1f7:4b62:435 with SMTP id z16csp297328lqj; Fri, 26 Apr 2024 07:11:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVv+TYHN++w7guGft6C2oAewMUxf5V6BAxE/wpJ8W9+QJkcV27cUkq4kDaAyR/49QXbaDiW+2tKsgMaDR6uL4pVSr7zGhqO9bxf3Z6F2w== X-Google-Smtp-Source: AGHT+IH5yTLdKkczLPY4XYCw2TzyVrSdYSVP6TBwxbifQNynfKtminBYDyQtOeCKvQNT4L5Qpe7Z X-Received: by 2002:a05:6808:1b11:b0:3c8:2ce9:da35 with SMTP id bx17-20020a0568081b1100b003c82ce9da35mr4256842oib.6.1714140694304; Fri, 26 Apr 2024 07:11:34 -0700 (PDT) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id t6-20020ab04ac6000000b007e1170ca506si3187532uae.177.2024.04.26.07.11.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 07:11:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-160129-linux.lists.archive=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=@amd.com header.s=selector1 header.b=ViHS9ISC; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-160129-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160129-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com 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 CC5061C23D3E for ; Fri, 26 Apr 2024 14:11:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8951B148820; Fri, 26 Apr 2024 14:11:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="ViHS9ISC" Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2055.outbound.protection.outlook.com [40.107.244.55]) (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 E1AB27E573; Fri, 26 Apr 2024 14:11:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.244.55 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714140682; cv=fail; b=Nk53y/KUuP8dcsjus/xVZqSCNHkrX56Pecm3A3ii7hc4g3awS3RFJwpIveiI5eNlBhZJjcVQccsUkIlQcIXKj9T5/gL0Z6uz3m77W6zVAWYXoPRs7yMPAOvg/Iqwx2FrIfqnmOvRxC6gqUXICkDvY8pu+3tpuXpvHRbmUTtWZ5c= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714140682; c=relaxed/simple; bh=P1imC3OyUwG5gj2e7JGBYPsqIH5YPOoNnG5AjNJCDaM=; h=Message-ID:Date:Subject:To:Cc:References:From:In-Reply-To: Content-Type:MIME-Version; b=jnCFTBn/tcSyxZfnXFtcRVzv+3SIomlD6mbGZDlSv+4FZ2lKBFa+krtYb/BF/FUwGcwOzzvMGP3HNcpTZFlXr1L6kLQZ3rh3Ulq8QoX+NDRS4xIIajumXqDSXaBgZIqiPr73Ocxfle9Dh1uc530YQFDYavOM13xmkJwQYswyYcs= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=ViHS9ISC; arc=fail smtp.client-ip=40.107.244.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VGiNRByy6qTlJl2ewT+M+FCm8KGEIfS1WvvpRfbPnLvL10nsSRUZhgpCUM7g4QAwMC+4Vn13dUbAGYI1Tgak9pST3ZT+Oi7bPwwINNz1zPqk7aDFlvX1ezvrLeRMFehvlzytjRD+V/pQ/Ac7cVvZ5c+TcPHTHA1zH1/ptMgXZYwR3C7l/GKP3N09UqQJapH76lBOLn6UzI/lsmKohao5e++5ZM9wrFkTdWGzLnOc9dhAgvuhQHozQhCo7md3q4k5ySzlYuRnCtFMEX0xOZ6l2Zx9D4mpYSieGV/yBzRnb0/he3rgGsVzkyV50bNdZKCGOqFvk1T6v2EdbPqOOLNUWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=dm3vFCnIe9mk3koDe+qOx2RlmmTUUiMNEH0VwXyJ3SI=; b=GGznpndSbQyBkZR4Jl9YQrOr4MlYa2Zy0Q7/RUAg8mC7dhuPtRZ99EctRbLl2EQw4AK+h+Cdk6VVNbulTfZY8IH00PlFcQ4voex2StQFFJFSBBdJNAZoOrlyf6ahfEiuYlvQ0HXN3twB1YqzWqlooNb4XzjVijSTpj4lJGEwHMiuJFeB44ZS9Tac18+n4IknQJy3N6lQZMkKKGbjM87qIGyN//zcJV7waQ9ikN5UsHZLarYgIpU2C4xUaVyzDSGgoMwBEUWb/IG/OKZaDxC28o4k9F94nVE+0RERkPHR0kcqa4HO5sLtNTOiK4OvCWQ0JzObq1OaEHKyw9vM9f20ew== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dm3vFCnIe9mk3koDe+qOx2RlmmTUUiMNEH0VwXyJ3SI=; b=ViHS9ISCOEua85kLJCCqywzdeXwbyfVlai2Xh4eKOoUHfA+q/lgdLWythcYXKFQINVThSNkXAY764iCEGgoI1jk/tKzRvWEKrc0NOiWCUsIq/tuvRXLQj5Ak2PH1Uu8TJ/jQDmMVWO7qvaacutws6kzftFVg5xEHUjmFu3p/TUI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from MN0PR12MB6101.namprd12.prod.outlook.com (2603:10b6:208:3cb::10) by CH3PR12MB7667.namprd12.prod.outlook.com (2603:10b6:610:14f::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.44; Fri, 26 Apr 2024 14:11:17 +0000 Received: from MN0PR12MB6101.namprd12.prod.outlook.com ([fe80::37ee:a763:6d04:81ca]) by MN0PR12MB6101.namprd12.prod.outlook.com ([fe80::37ee:a763:6d04:81ca%4]) with mapi id 15.20.7519.021; Fri, 26 Apr 2024 14:11:17 +0000 Message-ID: Date: Fri, 26 Apr 2024 09:11:15 -0500 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v8 4/6] cpufreq: amd-pstate: fix the MSR highest perf will be reset issue while cpb boost off To: Perry Yuan , rafael.j.wysocki@intel.com, viresh.kumar@linaro.org, Ray.Huang@amd.com, gautham.shenoy@amd.com, Borislav.Petkov@amd.com Cc: Alexander.Deucher@amd.com, Xinmei.Huang@amd.com, Xiaojian.Du@amd.com, Li.Meng@amd.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org References: <1d623d592548c7349254cb7dbea8826bb8a99eb3.1714112854.git.perry.yuan@amd.com> Content-Language: en-US From: Mario Limonciello In-Reply-To: <1d623d592548c7349254cb7dbea8826bb8a99eb3.1714112854.git.perry.yuan@amd.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SN4PR0501CA0115.namprd05.prod.outlook.com (2603:10b6:803:42::32) To MN0PR12MB6101.namprd12.prod.outlook.com (2603:10b6:208:3cb::10) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN0PR12MB6101:EE_|CH3PR12MB7667:EE_ X-MS-Office365-Filtering-Correlation-Id: 554f8827-b79b-4930-2279-08dc65fabd83 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: =?utf-8?B?MnIyWXhObXBCemNCUnpnRzFoNGY1QS9GWkNIMzMrbmxoQVZHRXVZMFFhMFIv?= =?utf-8?B?amQwcjVoWjdwK3piUEZtMFJPS09pdnMvZ29nQkZRNFhxZHpzN1l2NSt1Q2NV?= =?utf-8?B?VS9KUjh0aVhEUXpHdkw1SVBTeHlOQ3VYamwrVWM2RHhzbG9nbDBQSXVjMUdv?= =?utf-8?B?R1c1VVB4c0JJcGJ2M292MVNFNVY2MlI4eXdaS3NQU3ltbzdlU04vZ2JRWkgr?= =?utf-8?B?OGJWNlJCNzZBTUdwVjJFeXVHd0FtMTVXUTNrclhNeWFvZFlSbzZHTGQzQ2tV?= =?utf-8?B?ZlVycDRvWjZ0eklCVHdBKytrUDJUTk80b1dmNXdhK3QwSGl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XdIWVJKRVM3S3lUV2N0MGpIcjNXbWFEbTM1dVdrQUkwL0Er?= =?utf-8?B?d2tQY0E0U2o3MzNzenowekZGeUcxVnptWU1PeEEwUG5oU3M5UU5DK3R5U1Zo?= =?utf-8?B?dmFnNzduS1M4NUVSZkdBVEpGemZnaGV1V043V3VWZXVCcmM5NXNYd2lQQTFs?= =?utf-8?B?TWRhMGVzWVI5U2lLdXg4cnZaOTZOOWFSZlFMdkQ1azFKVmZ1UVhDTk00L0Mr?= =?utf-8?B?MjNpdTdlanY2OU1WSTZGcUZTOG5kQ2VwMlV6S3hiVklCOWl1aTNPVXhRWFh5?= =?utf-8?B?OFJpcktEb3hrMjZUQVovOXFabXhTV0o4MVBsZ0FTemZ4MmN5Zko2TDRmVVhZ?= =?utf-8?B?aFZQUUhKSG55aW5LNWFyOUlGdmhjZ0VVM1ZwU3VvSVNwTTY4TDFqbHROK091?= =?utf-8?B?RVdpd1k0WnZVc0dYMWJsU2hnYkNONHpjWElLbklRSTZTM3JkWlFmaVkrZUxR?= =?utf-8?B?eFBCZVI5UzRSTnRIdXh0L2Q0cTVPYmNCVHNIaVhkTm1xMXJXa2JNb2l3PT0=?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN0PR12MB6101.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(366007)(376005)(1800799015);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TkxtTTNZakI0dEE1THFzbnN1cUJGcmd1SFBFMGRSeW5YTHpMZFV5bDQvM0Vm?= =?utf-8?B?SjJEak44WllDNlZFMXhmMW1KL2d2eGxkdlhKcFFMWDFXZm9rN2dRNVE4RHRk?= =?utf-8?B?b2hVWitYd3FuODJTVkNtSnZDK3JLakhjbXBuaVMvYVRLblpQcHZJcWRkSWF4?= =?utf-8?B?ZTg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NU1gvREVTK1N6ejBlc2dJZDZpZHAy?= =?utf-8?B?UjdaTXhzUitYZlkwZXY2TjR2WjdUZ3lZa2RaNlJaYUh6SVRad2JPNkpyVnZh?= =?utf-8?B?VFNlaTRwb3FOcWQrUFBzellmUFMxN3JOZXhEQkw5WUFDaGpXMWZWZkFPQjYw?= =?utf-8?Q?gOY5QBGcZwaPaMO6CXR6OawKV?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 554f8827-b79b-4930-2279-08dc65fabd83 X-MS-Exchange-CrossTenant-AuthSource: MN0PR12MB6101.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Apr 2024 14:11:17.7215 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 0Cd3uhezxufpDEvRpCaVZ8TQaWJZzmSN63qrJPIvdLs3DeSwbwsj2EiwsmfcaecU+TbCUnNgaz1yc7qjEbO55A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB7667 On 4/26/2024 01:34, Perry Yuan wrote: > From: Perry Yuan > > Select the min perf to fix the highest perf value while update pstate > CPPC request MSR register, here we need to limit the max perf value when don't use we in a commit message > CPU boost is disabled in case of that highest perf value in the MSR will be > reset to original highest perf value which cause the BOOST control > failed. > > Signed-off-by: Perry Yuan > Acked-by: Huang Rui With minor nit fixed in commit message. Reviewed-by: Mario Limonciello > --- > drivers/cpufreq/amd-pstate.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c > index 53ef39c6dbfa..993e3e6b6609 100644 > --- a/drivers/cpufreq/amd-pstate.c > +++ b/drivers/cpufreq/amd-pstate.c > @@ -476,6 +476,7 @@ static void amd_pstate_update(struct amd_cpudata *cpudata, u32 min_perf, > u32 des_perf, u32 max_perf, bool fast_switch, int gov_flags) > { > u64 prev = READ_ONCE(cpudata->cppc_req_cached); > + u32 nominal_perf = READ_ONCE(cpudata->nominal_perf); > u64 value = prev; > > min_perf = clamp_t(unsigned long, min_perf, cpudata->min_limit_perf, > @@ -495,6 +496,10 @@ static void amd_pstate_update(struct amd_cpudata *cpudata, u32 min_perf, > value &= ~AMD_CPPC_DES_PERF(~0L); > value |= AMD_CPPC_DES_PERF(des_perf); > > + /* limit the max perf when core performance boost feature is disabled */ > + if (!amd_pstate_global_params.cpb_boost) > + max_perf = min_t(unsigned long, nominal_perf, max_perf); > + > value &= ~AMD_CPPC_MAX_PERF(~0L); > value |= AMD_CPPC_MAX_PERF(max_perf); >