Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2090703rwb; Thu, 17 Nov 2022 06:28:22 -0800 (PST) X-Google-Smtp-Source: AA0mqf6us+C2rV5KpS4gKFBSs+Ur+dhMoPpe3JcgxH4tTfTHUTfiZ+sIGbTEm8g3NA6vqIjsjm5L X-Received: by 2002:a63:5946:0:b0:470:3fc0:3d8c with SMTP id j6-20020a635946000000b004703fc03d8cmr2213285pgm.446.1668695302486; Thu, 17 Nov 2022 06:28:22 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1668695302; cv=pass; d=google.com; s=arc-20160816; b=aWFmBeVL4pLInYQRJ7vIUBcEcU/ic4c/dru4Ayx0eBlG1Kd7rRYGVK62Lb90HExCE8 Qy/wioj1GErkuId4kNbs4Rkiir/Q4jeONRGhLu+xAyVwS5JYMd88wLww1VhxpKfTIZbD lEfTGVDybxvkesIted9KEt8qrpsOv38Y1rt9mADfowWdNogPHUNkP3Z1cyGN4dWR2RXL YacuCyJ+UtgcUbs39a9EWLQ46iy0zCPjnciFYQylbN7Tvi1+O90LkpSj9UswwceXe8zt u60Vj1kEDN6LLaHr+VDf/Chgy9IQRtK9wepM7M9JcdtyabpwfRAnRWVW0IR0q3zw+RfS r6ag== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=ipGd5NRC4uFvPinzrCBtOymxkxOzrYLEi4ImmJnx4M8=; b=s1y0px7oiQo42KduohcOUnqkqqCMCiZjCI0VnVT9HtUNWBjs8CU6u1z0giJ8fj/I2d ZDRTqYKsq7UJIp++N3oojVTACPgp2CoZwa9SyM3IGYLwxfxYkkOfvGlDmmN5hwTueiWC LrifpQ5Ijxx/jlKY3/VfG3lLhGS9RXVEgLnRFbDukVu0PZAGYbcLTfmC/uX2WUzgV2YW x0IAYOzt4FyglSiegoNvaD6FAMcQx90gcN594CDEWwCi47dooH8dEeBADc/RBJnnTDI9 c9iI3hC9RX5pOPTk7/cQuwYL1lagO7/ZuyTQUyUpaHerm7Y0tA40Tpa9cJza8HModRWO kxbA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=yH645eGs; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j22-20020a056a00235600b00561741403adsi1048554pfj.182.2022.11.17.06.28.10; Thu, 17 Nov 2022 06:28:22 -0800 (PST) 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=@amd.com header.s=selector1 header.b=yH645eGs; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240096AbiKQOC7 (ORCPT + 93 others); Thu, 17 Nov 2022 09:02:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239876AbiKQOCw (ORCPT ); Thu, 17 Nov 2022 09:02:52 -0500 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2044.outbound.protection.outlook.com [40.107.102.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 166C876142; Thu, 17 Nov 2022 06:02:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SwVIG6T0omLm4yjJJXWN4nkQThnum4jasbFAVWCIiCHOD2/LB9V48u3Ec11/TvBub50RtmA5i9iAoZeDsuymnLav+2cQDbkFLlp08sXBcswDmKlg0NOEVP2q84v4thp8wVlH8ch6yr/wdGQ8ntY/xiw17EIKe3lsAuVn08IzY+sBBkgi0zvSz7Xm3ONUlqbqbeGQ3Bea/JTZdnKE6DwepuptM07mL9mrsDhu390mjYVMr+NLsX47+gC4XzlHzXNPS7x5JXjSOm3oTciCJcgdrF4P+qlVLNKeB4svqhRA/owENcIKN6dytoYdz5NdnzbyaJBPWbZBmGS8RL5o6dD4sw== 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=ipGd5NRC4uFvPinzrCBtOymxkxOzrYLEi4ImmJnx4M8=; b=UTDxcwNTYpRRUuj/lixCAej97Br9I48VHN1CiZAfEtkRvT76rvOhecLsWzGOsebjU8SvznQ8Bx7tBOCcv6Wt7du7UzUA3eFybayRZy0cf0dct1uXpWxRUf343SThCStwbSRSLPq+fHqUAWHH+bIpYydvBkb54fGVFUTooM9a/bRYkv47TXdKUcbqDEwFG5/w7mca33LQ8JvEYkalBL+RrT+nXMN09bz/IAThMAr3bILUaYwkHhyh2P4jJrevorLx7Gam7JVvY2eOjnLMbG4Ij0EVp9k20VFJM57+PiYbEt0XIkFEyew0ckPI6AVs4wknfv6wXdkZJ35lMX0jiPel8w== 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=ipGd5NRC4uFvPinzrCBtOymxkxOzrYLEi4ImmJnx4M8=; b=yH645eGsuNVeWslwe/TGMnh6bUX9nfKBRbzCrvExC+/qOSe9WIj33bov2qX/ZoE+CeRE1WscWSQRg0AuUcjeGZv6gQ4YOM4+AZUMfksGxdTGKJCMs6b8zAncs8roH41tTUgBaECVoo8kMV4Q3GEKlfYG2OBBtsPh5IR3U8SQJcY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from BY5PR12MB3876.namprd12.prod.outlook.com (2603:10b6:a03:1a7::26) by SJ1PR12MB6265.namprd12.prod.outlook.com (2603:10b6:a03:458::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.19; Thu, 17 Nov 2022 14:02:48 +0000 Received: from BY5PR12MB3876.namprd12.prod.outlook.com ([fe80::b6f2:3174:a1c2:44b5]) by BY5PR12MB3876.namprd12.prod.outlook.com ([fe80::b6f2:3174:a1c2:44b5%7]) with mapi id 15.20.5813.013; Thu, 17 Nov 2022 14:02:48 +0000 Message-ID: <5db2e4b8-cff4-8aed-a3ac-e26d0668d996@amd.com> Date: Thu, 17 Nov 2022 19:32:36 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH v4 4/9] cpufreq: amd_pstate: implement Pstate EPP support for the AMD processors Content-Language: en-US To: Perry Yuan , rafael.j.wysocki@intel.com, Mario.Limonciello@amd.com, ray.huang@amd.com, viresh.kumar@linaro.org Cc: Deepak.Sharma@amd.com, Nathan.Fontenot@amd.com, Alexander.Deucher@amd.com, Shimmer.Huang@amd.com, Xiaojian.Du@amd.com, Li.Meng@amd.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20221110175847.3098728-1-Perry.Yuan@amd.com> <20221110175847.3098728-5-Perry.Yuan@amd.com> From: Wyes Karny In-Reply-To: <20221110175847.3098728-5-Perry.Yuan@amd.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: PN2PR01CA0133.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:6::18) To BY5PR12MB3876.namprd12.prod.outlook.com (2603:10b6:a03:1a7::26) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR12MB3876:EE_|SJ1PR12MB6265:EE_ X-MS-Office365-Filtering-Correlation-Id: e1b016c6-a00d-4481-107b-08dac8a46855 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TBtFRMlLOBy5RayyA9H4khvogfY8ShfoVSEhMsd5A17g0zA+Gf3vz+i+xxpN9RuNJrYZuLn8QgniVamSG8Prec/teKxb0MkAnK//udRgtFrRsVgOmUE/xqCLFUFfxT741aEiwW3nFySj0YVwxb9ftFNSmG3gXzs+iMxu+AJAwp1/qOQXwBDZZPFY5mjxIOkqF36XHv4PMyfzXlNWowg6zIbgvzVxCB2M+hxXvxy9NEixnJQiqFg72ySbAVmlSpQ6eWxYbR/UCDPXO3wYUBHCS+skqHsIecI2KT1J6EqWEGnt4ST+52cTxKjKclEFITOSdgodRttpuxR0Mk1U4aLA4XnrvM2NFOfVHkKtPqxsc155B4BbkTvDTnHFOb9I/dNRye7Uieib3CanclYDtn3R78mZTWE8XtX7qVdekzhkZVaj6oH6Q8m3VCROCjJBiYMBkev13/iw0gNXGsoKUGq8sRLsgP3EBxLuuseYui7tJRnxjUTbX2LsF2WdQ5Oq9V7O+M4Wj3+gH7F32ZNEWsSIIYKFu7jMGw/Oply6904hkUP77J3gj6ofOn3+7UO+l867xjB5THaOmpQLxbwxzEVly/qX+5Sw9dqC7QYex9pqlxig/pLnSk4CSAwFIUAK6JAnJDVecC23FgVSMh8q+lgJeWUniDV3yV5aBB2jzUiDOY7n4qcnjir5oPjMh4He69aSEoRzdfN1XsUM46qCPZ6sMhkMeiR4UcHuS13/Jx/qymg= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BY5PR12MB3876.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(39860400002)(396003)(136003)(366004)(346002)(376002)(451199015)(31686004)(44832011)(8936002)(2906002)(86362001)(31696002)(36756003)(66556008)(6486002)(316002)(2616005)(478600001)(186003)(38100700002)(66946007)(5660300002)(8676002)(4326008)(41300700001)(66476007)(6506007)(6512007)(6666004)(53546011)(26005)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?OExLT2NLWHdFTnRHcEtQN2F3K25kYmdsRFVRT1Q3Zzk4SnpEL09jZ2dQYmdP?= =?utf-8?B?S2IvY00xWmIyZWpVR09mbE1nRWg0cjE0MnUvWW5NRXdwWGt3QnZNcER6bkdX?= =?utf-8?B?QnJwRHNoUVltWW1hWEw5V1dISEZIMjBuVnVpdnErMW92SGJqamswaFp0d0pD?= =?utf-8?B?MmJBdEd0MmpyRFB1M3V6T1JTNzFqZTd6blErek9CeFZkbGdrWGtJYTdYREtr?= =?utf-8?B?VUsrc0hOZDdBL3dJeTc4WjI3bDc1MWZYNTl3cGgvU0VqRUFCc3I0WldDZ2V3?= =?utf-8?B?MWdiUjVGWW1KdHZxaDJSY1FqV2R6YXlFSkVLSG80K1JpOWo4K1pTbnBub3FL?= =?utf-8?B?N2ZKd2hGam5jeHJaSFBSREdCdm5PcGlLZHJWckVOaDRaS2R0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6-a00d-4481-107b-08dac8a46855 X-MS-Exchange-CrossTenant-AuthSource: BY5PR12MB3876.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Nov 2022 14:02:48.0849 (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: f9dHxwBo5IQ1EtUX74Zzk0wnYBz5uR8tWFFhQ6xGXJeKOOjfKoz7Py6re4TIneePsANLUTLJelFymHc611mSKA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ1PR12MB6265 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham 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 Hi Perry, On 11/10/2022 11:28 PM, Perry Yuan wrote: [snip] > + > +static ssize_t store_energy_performance_preference( > + struct cpufreq_policy *policy, const char *buf, size_t count) > +{ > + struct amd_cpudata *cpudata = policy->driver_data; > + char str_preference[21]; > + ssize_t ret; > + u32 epp = 0; Here `epp` is a unused variable. [snip] > @@ -657,6 +1281,20 @@ static int __init amd_pstate_param(char *str) > if (!str) > return -EINVAL; > > + /* > + * Disable amd-pstate driver by default for now > + * append amd-pstate=active or amd-pstate=active > + * to enable driver loaded > + */ > + if (!strcmp(str, "active")) { > + cppc_load = 1; > + default_pstate_driver = &amd_pstate_epp_driver; > + } else if (!strcmp(str, "passive")) { > + epp_off = 1; > + cppc_load = 1; > + default_pstate_driver = &amd_pstate_driver; > + } > + > /* > * support shared memory type CPPC which has no MSR function. > * enable amd-pstate on processors with shared memory solution In the shared memory support section also `cppc_load` has to be set otherwise amd_pstate=legacy_cppc will not work. if (!strcmp(str, "legacy_cppc")) { shared_mem = true; cppc_load = 1; } -- Thanks & Regards, Wyes